)]}'
{"nova/api/openstack/compute/contrib/baremetal_nodes.py":[{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"a5294db812ad64ddf4c37f634751f92621ade6a9","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    if not s:"},{"line_number":64,"context_line":"        return False"},{"line_number":65,"context_line":"    return re.match(\u0027^([0-9a-f]{2}:){5}[0-9a-f]{2}$\u0027, s,"},{"line_number":66,"context_line":"                    flags\u003dre.IGNORECASE) is not None"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class NodeTemplate(xmlutil.TemplateBuilder):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2FW6E%3D","line":66,"updated":"2013-10-17 09:28:17.000000000","message":"Based on the conventions of  the standard (IEEE 802) format for printing MAC-48 addresses in human-friendly form is six groups of two hexadecimal digits, separated by hyphens (-) or colons (:)  - http://en.wikipedia.org/wiki/MAC_address \n\nSo, it should be \u0027^([0-9A-F]{2}[:-]){5}[0-9A-F]{2}$\u0027 Please have a try, thank you.","commit_id":"fb6cf449ca9a0c4907a1943ef704e42b82e681f9"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"8cd768737ce735640968195599a424a59f2edddd","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        authorize(context)"},{"line_number":141,"context_line":"        values \u003d body[\u0027node\u0027].copy()"},{"line_number":142,"context_line":"        prov_mac_address \u003d values.pop(\u0027prov_mac_address\u0027, None)"},{"line_number":143,"context_line":"        if (prov_mac_address is not None"},{"line_number":144,"context_line":"                and not _is_valid_mac_address(prov_mac_address)):"},{"line_number":145,"context_line":"            raise webob.exc.HTTPBadRequest("},{"line_number":146,"context_line":"                    explanation\u003d_(\"Must specify address \""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2FpS4%3D","line":143,"updated":"2013-10-11 19:56:16.000000000","message":"isn\u0027t this \u0027is not none\u0027 case covered in _is_valid_mac_address already?","commit_id":"fb6cf449ca9a0c4907a1943ef704e42b82e681f9"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"748230564d22c44c3ab586c45cbbe1ec5f7111b4","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        authorize(context)"},{"line_number":141,"context_line":"        values \u003d body[\u0027node\u0027].copy()"},{"line_number":142,"context_line":"        prov_mac_address \u003d values.pop(\u0027prov_mac_address\u0027, None)"},{"line_number":143,"context_line":"        if (prov_mac_address is not None"},{"line_number":144,"context_line":"                and not _is_valid_mac_address(prov_mac_address)):"},{"line_number":145,"context_line":"            raise webob.exc.HTTPBadRequest("},{"line_number":146,"context_line":"                    explanation\u003d_(\"Must specify address \""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2FbNM%3D","line":143,"in_reply_to":"AAAATH%2F%2FpS4%3D","updated":"2013-10-16 11:25:54.000000000","message":"In this method, prov_mac_address is optional. So None is a valid value and we don\u0027t call _is_valid_mac_address.","commit_id":"fb6cf449ca9a0c4907a1943ef704e42b82e681f9"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"f77f7e0a9cca2cc3ec8d4ec376d608475d4f8ca4","unresolved":false,"context_lines":[{"line_number":60,"context_line":"# Ported from Ironic (ironic/common/utils.py)"},{"line_number":61,"context_line":"def is_valid_mac(address):"},{"line_number":62,"context_line":"    \"\"\"Verify the format of a MAC addres.\"\"\""},{"line_number":63,"context_line":"    m \u003d \"[0-9a-f]{2}(:[0-9a-f]{2}){5}$\""},{"line_number":64,"context_line":"    if isinstance(address, six.string_types) and re.match(m, address.lower()):"},{"line_number":65,"context_line":"        return True"},{"line_number":66,"context_line":"    return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FHDQ%3D","line":63,"updated":"2013-11-14 10:23:44.000000000","message":"We should have a ^ at the start of the match string to prevent spurious leading chars.","commit_id":"df88efa71082d252950e6e0a538917965b3d77a7"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"f24f5dc68aaacb2e884166b05d77eb192f8438eb","unresolved":false,"context_lines":[{"line_number":60,"context_line":"# Ported from Ironic (ironic/common/utils.py)"},{"line_number":61,"context_line":"def is_valid_mac(address):"},{"line_number":62,"context_line":"    \"\"\"Verify the format of a MAC addres.\"\"\""},{"line_number":63,"context_line":"    m \u003d \"[0-9a-f]{2}(:[0-9a-f]{2}){5}$\""},{"line_number":64,"context_line":"    if isinstance(address, six.string_types) and re.match(m, address.lower()):"},{"line_number":65,"context_line":"        return True"},{"line_number":66,"context_line":"    return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FCms%3D","line":63,"in_reply_to":"AAAATn%2F%2FHDQ%3D","updated":"2013-11-15 09:31:49.000000000","message":"Done","commit_id":"df88efa71082d252950e6e0a538917965b3d77a7"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"a3fcdf86977fa5ab6de51a40ca83e7f96a113b01","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    if isinstance(address, six.string_types) and re.match(m, address.lower()):"},{"line_number":65,"context_line":"        return True"},{"line_number":66,"context_line":"    return False"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class NodeTemplate(xmlutil.TemplateBuilder):"},{"line_number":70,"context_line":"    def construct(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FHEQ%3D","line":67,"updated":"2013-11-14 10:20:46.000000000","message":"Small suggestion for improvement: I know this is a port from ironic, but wouldn\u0027t this be better as\n\nreturn (isinstance(address, six.string_types) and \n          re.match(m, address.lower()))","commit_id":"df88efa71082d252950e6e0a538917965b3d77a7"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"f24f5dc68aaacb2e884166b05d77eb192f8438eb","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    if isinstance(address, six.string_types) and re.match(m, address.lower()):"},{"line_number":65,"context_line":"        return True"},{"line_number":66,"context_line":"    return False"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class NodeTemplate(xmlutil.TemplateBuilder):"},{"line_number":70,"context_line":"    def construct(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FCmk%3D","line":67,"in_reply_to":"AAAATn%2F%2FHEQ%3D","updated":"2013-11-15 09:31:49.000000000","message":"Done","commit_id":"df88efa71082d252950e6e0a538917965b3d77a7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d90ecf8d445fd319153e0bce7e46d9c4ba3a343a","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"# Ported from Ironic (ironic/common/utils.py)"},{"line_number":61,"context_line":"def is_valid_mac(address):"},{"line_number":62,"context_line":"    \"\"\"Verify the format of a MAC addres.\"\"\""},{"line_number":63,"context_line":"    m \u003d \"^[0-9a-f]{2}(:[0-9a-f]{2}){5}$\""},{"line_number":64,"context_line":"    return isinstance(address, six.string_types) and \\"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2B83c%3D","line":61,"updated":"2013-11-18 07:47:57.000000000","message":"why not use the netaddr.EUI to do the validation. Please see https://github.com/openstack/neutron/blob/master/neutron/api/v2/attributes.py#L139 for an example.","commit_id":"074ca52b26ec63abceccc77082a29b0d47a9ec77"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"b29eae270b6f76d9f847fd435071b7b794e4f7e3","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"# Ported from Ironic (ironic/common/utils.py)"},{"line_number":61,"context_line":"def is_valid_mac(address):"},{"line_number":62,"context_line":"    \"\"\"Verify the format of a MAC addres.\"\"\""},{"line_number":63,"context_line":"    m \u003d \"^[0-9a-f]{2}(:[0-9a-f]{2}){5}$\""},{"line_number":64,"context_line":"    return isinstance(address, six.string_types) and \\"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2BhRU%3D","line":61,"in_reply_to":"AAAATn%2F%2B7RY%3D","updated":"2013-11-25 07:41:14.000000000","message":"Done","commit_id":"074ca52b26ec63abceccc77082a29b0d47a9ec77"},{"author":{"_account_id":360,"name":"Dan Prince","email":"dprince@redhat.com","username":"dan-prince"},"change_message_id":"4860e8dd67067e6bab758b52f2c218ae9ed3ecf1","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"# Ported from Ironic (ironic/common/utils.py)"},{"line_number":61,"context_line":"def is_valid_mac(address):"},{"line_number":62,"context_line":"    \"\"\"Verify the format of a MAC addres.\"\"\""},{"line_number":63,"context_line":"    m \u003d \"^[0-9a-f]{2}(:[0-9a-f]{2}){5}$\""},{"line_number":64,"context_line":"    return isinstance(address, six.string_types) and \\"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2B7RY%3D","line":61,"in_reply_to":"AAAATn%2F%2B83c%3D","updated":"2013-11-18 14:13:19.000000000","message":"Yeah. I like the neutron validation better here I think.","commit_id":"074ca52b26ec63abceccc77082a29b0d47a9ec77"}],"nova/tests/api/openstack/compute/contrib/test_baremetal_nodes.py":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"8cd768737ce735640968195599a424a59f2edddd","unresolved":false,"context_lines":[{"line_number":304,"context_line":"                \u002712:34:56:78:90:aBc\u0027))"},{"line_number":305,"context_line":"        self.assertFalse(baremetal_nodes._is_valid_mac_address("},{"line_number":306,"context_line":"                \u00272:34:56:78:90:aB\u0027))"},{"line_number":307,"context_line":"        self.assertTrue(baremetal_nodes._is_valid_mac_address("},{"line_number":308,"context_line":"                \u002712:34:56:78:90:aB\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2FpS8%3D","line":307,"updated":"2013-10-11 19:56:16.000000000","message":"I am always paranoid about regex, so can you add more cases here.","commit_id":"fb6cf449ca9a0c4907a1943ef704e42b82e681f9"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"748230564d22c44c3ab586c45cbbe1ec5f7111b4","unresolved":false,"context_lines":[{"line_number":304,"context_line":"                \u002712:34:56:78:90:aBc\u0027))"},{"line_number":305,"context_line":"        self.assertFalse(baremetal_nodes._is_valid_mac_address("},{"line_number":306,"context_line":"                \u00272:34:56:78:90:aB\u0027))"},{"line_number":307,"context_line":"        self.assertTrue(baremetal_nodes._is_valid_mac_address("},{"line_number":308,"context_line":"                \u002712:34:56:78:90:aB\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2FbNE%3D","line":307,"in_reply_to":"AAAATH%2F%2FpS8%3D","updated":"2013-10-16 11:25:54.000000000","message":"Will do","commit_id":"fb6cf449ca9a0c4907a1943ef704e42b82e681f9"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"a5294db812ad64ddf4c37f634751f92621ade6a9","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        self.assertFalse(baremetal_nodes._is_valid_mac_address("},{"line_number":306,"context_line":"                \u00272:34:56:78:90:aB\u0027))"},{"line_number":307,"context_line":"        self.assertTrue(baremetal_nodes._is_valid_mac_address("},{"line_number":308,"context_line":"                \u002712:34:56:78:90:aB\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2FW4o%3D","line":308,"updated":"2013-10-17 09:28:17.000000000","message":"Please add case to test the MAC address separated by hyphens.","commit_id":"fb6cf449ca9a0c4907a1943ef704e42b82e681f9"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"a3fcdf86977fa5ab6de51a40ca83e7f96a113b01","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            \u0027interfaces\u0027: [],"},{"line_number":168,"context_line":"        }"},{"line_number":169,"context_line":"        intf \u003d {"},{"line_number":170,"context_line":"            \u0027address\u0027: \u002711:11:11:11:11:11\u0027,"},{"line_number":171,"context_line":"            \u0027datapath_id\u0027: None,"},{"line_number":172,"context_line":"            \u0027id\u0027: None,"},{"line_number":173,"context_line":"            \u0027port_no\u0027: None,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FHDw%3D","line":170,"updated":"2013-11-14 10:20:46.000000000","message":"Would it be better to use something that tests when the mac address is in [1-9a-f] and/or [1-9A-F] rather than just 1\u0027s?","commit_id":"df88efa71082d252950e6e0a538917965b3d77a7"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"f24f5dc68aaacb2e884166b05d77eb192f8438eb","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            \u0027interfaces\u0027: [],"},{"line_number":168,"context_line":"        }"},{"line_number":169,"context_line":"        intf \u003d {"},{"line_number":170,"context_line":"            \u0027address\u0027: \u002711:11:11:11:11:11\u0027,"},{"line_number":171,"context_line":"            \u0027datapath_id\u0027: None,"},{"line_number":172,"context_line":"            \u0027id\u0027: None,"},{"line_number":173,"context_line":"            \u0027port_no\u0027: None,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FCmg%3D","line":170,"in_reply_to":"AAAATn%2F%2FHDw%3D","updated":"2013-11-15 09:31:49.000000000","message":"Done","commit_id":"df88efa71082d252950e6e0a538917965b3d77a7"}]}
