anishmehta24 opened a new pull request, #2224: URL: https://github.com/apache/libcloud/pull/2224
## Route53: keep MX priority and SRV weight/port when updating or deleting records ### Description `_to_record` splits the MX priority and the SRV priority, weight and port out of the value Route53 stores, but they are not all put back when a record is written: - `update_record` on a record that is part of a multi value set (e.g. one of the MX values) sends every value without its priority, so the DELETE doesn't match what Route53 stores and the CREATE values are invalid. - `update_record` and `delete_record` on SRV records send `priority target` instead of `priority weight port target`. With the `list_records` fixture, deleting the SRV record sends `1 xmpp-server.example.com.` instead of `1 10 5269 xmpp-server.example.com.`. #2177 fixed this for multi value MX deletes. This uses its `_to_record_value` helper in the update path and in `_post_changeset` as well, and makes it restore the SRV weight and port. Three new tests check the posted changeset (multi value MX update, multi value SRV delete, single value SRV update), plus an SRV case in `test_to_record_value`; they fail on trunk and pass with the fix. `libcloud/test/dns` passes (541 tests), and black, isort, flake8 and pylint -E pass. I couldn't run it against real Route53. ### Status done, ready for review ### Checklist (tick everything that applies) - [x] [Code linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide) (required, can be done after the PR checks) - [ ] Documentation - [x] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html) - [ ] [ICLA](http://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes) (required for bigger changes) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
