)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"929cceec8fbfcecb161f43200ccedc4021941f8e","unresolved":true,"context_lines":[{"line_number":19,"context_line":"- This sanitization won\u0027t change the MAC address value."},{"line_number":20,"context_line":"- This sanitization will be always enabled (no extension needed)."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-Bug: #1926273"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I95d596c84716835076365981376fb23166c6b23c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"88d3dce7_3aea8040","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":6},"updated":"2021-04-27 14:00:51.000000000","message":"Will mac validator be added to main neutron? This should be Partial then","commit_id":"056165d354bdd7836382ab7451c2468ef0bd3c7c"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b627c5e0ae5214d4d1fea65e36a07190f121fdd3","unresolved":true,"context_lines":[{"line_number":19,"context_line":"- This sanitization won\u0027t change the MAC address value."},{"line_number":20,"context_line":"- This sanitization will be always enabled (no extension needed)."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-Bug: #1926273"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I95d596c84716835076365981376fb23166c6b23c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"993b26cb_c707b97e","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":6},"in_reply_to":"88d3dce7_3aea8040","updated":"2021-04-27 15:59:19.000000000","message":"The added method is not a validator but a converter, to sanitize the MAC address string.\n\nOnce we have a valid (this check is already in place) and sanitized MAC address string, we don\u0027t need to add anything else in Neutron code.","commit_id":"056165d354bdd7836382ab7451c2468ef0bd3c7c"}],"neutron_lib/api/converters.py":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"1b96e96f538b7ed4d49846b7618196f51deaf6b2","unresolved":true,"context_lines":[{"line_number":330,"context_line":"             of this method is not to validate it."},{"line_number":331,"context_line":"    \"\"\""},{"line_number":332,"context_line":"    try:"},{"line_number":333,"context_line":"        _mac \u003d netaddr.EUI(mac_address, dialect\u003dnetaddr.mac_eui48)"},{"line_number":334,"context_line":"        return str(_mac).lower().replace(\u0027-\u0027, \u0027:\u0027)"},{"line_number":335,"context_line":"    except netaddr.core.AddrFormatError:"},{"line_number":336,"context_line":"        return mac_address"}],"source_content_type":"text/x-python","patch_set":2,"id":"ccbb077d_393fe060","line":333,"range":{"start_line":333,"start_character":48,"end_line":333,"end_character":65},"updated":"2021-04-28 07:19:34.000000000","message":"You can use mac_unix_expanded and there\u0027s no need for the string operations","commit_id":"4da661cf7eb0408ddb32c3d3c40d7ef15557ab94"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"0d030e38b5c8dd5529613d8f1d884efc2992096b","unresolved":true,"context_lines":[{"line_number":330,"context_line":"             of this method is not to validate it."},{"line_number":331,"context_line":"    \"\"\""},{"line_number":332,"context_line":"    try:"},{"line_number":333,"context_line":"        _mac \u003d netaddr.EUI(mac_address, dialect\u003dnetaddr.mac_eui48)"},{"line_number":334,"context_line":"        return str(_mac).lower().replace(\u0027-\u0027, \u0027:\u0027)"},{"line_number":335,"context_line":"    except netaddr.core.AddrFormatError:"},{"line_number":336,"context_line":"        return mac_address"}],"source_content_type":"text/x-python","patch_set":2,"id":"b47fed2a_10b33c71","line":333,"range":{"start_line":333,"start_character":48,"end_line":333,"end_character":65},"in_reply_to":"ccbb077d_393fe060","updated":"2021-04-28 13:19:03.000000000","message":"Right! Thanks!","commit_id":"4da661cf7eb0408ddb32c3d3c40d7ef15557ab94"}],"neutron_lib/tests/unit/api/test_conversions.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"18960be237612fa6b8131bb733a7a13046238497","unresolved":true,"context_lines":[{"line_number":369,"context_line":"            converters.convert_to_sanitized_mac_address(\u00270:1:2:3:4:5\u0027))"},{"line_number":370,"context_line":"        self.assertEqual("},{"line_number":371,"context_line":"            \u0027ca:fe:ca:fe:0a:0e\u0027,"},{"line_number":372,"context_line":"            converters.convert_to_sanitized_mac_address(\u0027ca:FE:cA:Fe:a:E\u0027))"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        # Not converted, those MAC address will fail in the validation step."},{"line_number":375,"context_line":"        self.assertEqual("}],"source_content_type":"text/x-python","patch_set":3,"id":"9ab743b2_8f35005c","line":372,"updated":"2021-04-28 17:03:09.000000000","message":"So this is a change in the API since lower() is essentially being done when it wasn\u0027t previously.  And in the other cases as well where \u00275\u0027 is changed to \u002705\u0027.  At a minimum we should add a release note and/or a change to the API ref doc to denote the format change in the POST and GET, since it will be noticed by someone.  It\u0027s potentially breaking the API \"contract\" so Slawek\u0027s comment is maybe apropos.","commit_id":"0ea96885747cfc4f60db97451fa3ad023dc3d0ab"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"87cabc4c0662705c918c02e85ad8961f2243500a","unresolved":true,"context_lines":[{"line_number":369,"context_line":"            converters.convert_to_sanitized_mac_address(\u00270:1:2:3:4:5\u0027))"},{"line_number":370,"context_line":"        self.assertEqual("},{"line_number":371,"context_line":"            \u0027ca:fe:ca:fe:0a:0e\u0027,"},{"line_number":372,"context_line":"            converters.convert_to_sanitized_mac_address(\u0027ca:FE:cA:Fe:a:E\u0027))"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        # Not converted, those MAC address will fail in the validation step."},{"line_number":375,"context_line":"        self.assertEqual("}],"source_content_type":"text/x-python","patch_set":3,"id":"2ce33053_da0c2ced","line":372,"in_reply_to":"858a7ef2_98d9250b","updated":"2021-04-30 19:43:39.000000000","message":"The \"dashed\" address you mention is almost a bug, and I wonder if the port is actually usable.  I guess we should have always been enforcing a format from Day 1, or sanitizing as you\u0027re doing here.","commit_id":"0ea96885747cfc4f60db97451fa3ad023dc3d0ab"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"30bfe3b37fbacde4ee783e38fd7dfe260e8bcf36","unresolved":true,"context_lines":[{"line_number":369,"context_line":"            converters.convert_to_sanitized_mac_address(\u00270:1:2:3:4:5\u0027))"},{"line_number":370,"context_line":"        self.assertEqual("},{"line_number":371,"context_line":"            \u0027ca:fe:ca:fe:0a:0e\u0027,"},{"line_number":372,"context_line":"            converters.convert_to_sanitized_mac_address(\u0027ca:FE:cA:Fe:a:E\u0027))"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        # Not converted, those MAC address will fail in the validation step."},{"line_number":375,"context_line":"        self.assertEqual("}],"source_content_type":"text/x-python","patch_set":3,"id":"858a7ef2_98d9250b","line":372,"in_reply_to":"9ab743b2_8f35005c","updated":"2021-04-30 07:45:31.000000000","message":"About the MAC format, there is nothing in the API referred to the formatting. The value should be valid but no format is specified.\n\n1) About the format of each octect, if \"5\" is stored in the DB instead of \"05\", that won\u0027t work (as reported in the LP). This is the goal of this patch.\n\nIf \"5\" is passed to the API, it will be converted to \"05\" and compared to \"05\", that should be stored in the DB.\n\n2) About comparing lower or upper cases, as you mentioned, we are safe because all comparisons are done between strings converted to lower.\n\n3) There is another case not commented: the xx-xx-xx-xx-xx-xx format. This is valid and accepted by Neutron: http://paste.openstack.org/show/804876/\nThis patch will sanitize both what is stored in the DB and the API input for, for example, listing and filter a port.\n\nWe are safe in 1) and 2) cases. If someone has xx-xx-xx-xx-xx-xx values stored in the DB, this patch will break this compatibility. This is why I\u0027ll propose a patch to fix that. BTW, this is not a common way to defined MAC addreses.","commit_id":"0ea96885747cfc4f60db97451fa3ad023dc3d0ab"}],"releasenotes/notes/port-mac-sanitization-d2b6ee77b66cb815.yaml":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"87cabc4c0662705c918c02e85ad8961f2243500a","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Improved ``port`` API with a MAC address convertion method that sanitizes"},{"line_number":5,"context_line":"    the value. The output format will be EUI-48, represented with colons and"},{"line_number":6,"context_line":"    lower cases (01:23:45:67:89:ab)."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"13c0a2c1_d1046473","line":4,"range":{"start_line":4,"start_character":45,"end_line":4,"end_character":55},"updated":"2021-04-30 19:43:39.000000000","message":"s/conversion","commit_id":"a688b4b8176b6fbd9fdc76942a6823e9f2198679"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"87cabc4c0662705c918c02e85ad8961f2243500a","unresolved":true,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Improved ``port`` API with a MAC address convertion method that sanitizes"},{"line_number":5,"context_line":"    the value. The output format will be EUI-48, represented with colons and"},{"line_number":6,"context_line":"    lower cases (01:23:45:67:89:ab)."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"fc15b8d6_5b5c1471","line":6,"range":{"start_line":6,"start_character":4,"end_line":6,"end_character":35},"updated":"2021-04-30 19:43:39.000000000","message":"s/in lower case, for example, 01:23:45:67:89:ab.","commit_id":"a688b4b8176b6fbd9fdc76942a6823e9f2198679"}]}
