)]}'
{"neutron/api/v2/attributes.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3d1a8af2bf969982424893d4d3a5a38f28a6be6e","unresolved":false,"context_lines":[{"line_number":291,"context_line":"    msg \u003d None"},{"line_number":292,"context_line":"    try:"},{"line_number":293,"context_line":"        net \u003d netaddr.IPNetwork(_validate_no_whitespace(data))"},{"line_number":294,"context_line":"        if (\u0027/\u0027 not in data or net.prefixlen !\u003d int(data.split(\u0027/\u0027)[-1])):"},{"line_number":295,"context_line":"            msg \u003d _(\"\u0027%(data)s\u0027 isn\u0027t a recognized IP subnet cidr,\""},{"line_number":296,"context_line":"                    \" \u0027%(cidr)s\u0027 is recommended\") % {\"data\": data,"},{"line_number":297,"context_line":"                                                     \"cidr\": net.cidr}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FSQs%3D","line":294,"updated":"2014-03-18 21:33:35.000000000","message":"What is a case which matches the second condition?","commit_id":"a4e9652d61a9f6282371878018e5393080dc9d33"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a0968390259458bb8bc221a38b6a91b39303ef91","unresolved":false,"context_lines":[{"line_number":291,"context_line":"    msg \u003d None"},{"line_number":292,"context_line":"    try:"},{"line_number":293,"context_line":"        net \u003d netaddr.IPNetwork(_validate_no_whitespace(data))"},{"line_number":294,"context_line":"        if (\u0027/\u0027 not in data or net.prefixlen !\u003d int(data.split(\u0027/\u0027)[-1])):"},{"line_number":295,"context_line":"            msg \u003d _(\"\u0027%(data)s\u0027 isn\u0027t a recognized IP subnet cidr,\""},{"line_number":296,"context_line":"                    \" \u0027%(cidr)s\u0027 is recommended\") % {\"data\": data,"},{"line_number":297,"context_line":"                                                     \"cidr\": net.cidr}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FSG4%3D","line":294,"in_reply_to":"AAAAWH%2F%2FSQs%3D","updated":"2014-03-18 22:09:16.000000000","message":"None. I was originally thinking the netaddr.IPNetwork method would discard poorly formatted prefixes, but I just tested and netaddr.IPNetwork raises exceptions on prefixes it doesn\u0027t understand so that will handle it.","commit_id":"a4e9652d61a9f6282371878018e5393080dc9d33"}],"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3d1a8af2bf969982424893d4d3a5a38f28a6be6e","unresolved":false,"context_lines":[{"line_number":1062,"context_line":""},{"line_number":1063,"context_line":"    def create_subnet(self, context, subnet):"},{"line_number":1064,"context_line":""},{"line_number":1065,"context_line":"        net \u003d netaddr.IPNetwork(subnet[\u0027subnet\u0027][\u0027cidr\u0027])"},{"line_number":1066,"context_line":"        # turn the CIDR into a proper subnet"},{"line_number":1067,"context_line":"        subnet[\u0027subnet\u0027][\u0027cidr\u0027] \u003d \u0027%s/%s\u0027 % (net.network, net.prefixlen)"},{"line_number":1068,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FSUk%3D","line":1065,"updated":"2014-03-18 21:33:35.000000000","message":"How about converting CIDR format in convert_into in attribute_map?","commit_id":"a4e9652d61a9f6282371878018e5393080dc9d33"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"0e34c3b5847c116dd9d1d95778c18cf3d15f176d","unresolved":false,"context_lines":[{"line_number":1062,"context_line":""},{"line_number":1063,"context_line":"    def create_subnet(self, context, subnet):"},{"line_number":1064,"context_line":""},{"line_number":1065,"context_line":"        net \u003d netaddr.IPNetwork(subnet[\u0027subnet\u0027][\u0027cidr\u0027])"},{"line_number":1066,"context_line":"        # turn the CIDR into a proper subnet"},{"line_number":1067,"context_line":"        subnet[\u0027subnet\u0027][\u0027cidr\u0027] \u003d \u0027%s/%s\u0027 % (net.network, net.prefixlen)"},{"line_number":1068,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FPjY%3D","line":1065,"in_reply_to":"AAAAWH%2F%2FSAc%3D","updated":"2014-03-19 06:33:55.000000000","message":"No problem with the current implementation. I wondered if there is a common way to convert attribute between create and update (though cidr is not allowed to update). It is a difficult question whether conversion is done in API layer or plugin layer.","commit_id":"a4e9652d61a9f6282371878018e5393080dc9d33"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a0968390259458bb8bc221a38b6a91b39303ef91","unresolved":false,"context_lines":[{"line_number":1062,"context_line":""},{"line_number":1063,"context_line":"    def create_subnet(self, context, subnet):"},{"line_number":1064,"context_line":""},{"line_number":1065,"context_line":"        net \u003d netaddr.IPNetwork(subnet[\u0027subnet\u0027][\u0027cidr\u0027])"},{"line_number":1066,"context_line":"        # turn the CIDR into a proper subnet"},{"line_number":1067,"context_line":"        subnet[\u0027subnet\u0027][\u0027cidr\u0027] \u003d \u0027%s/%s\u0027 % (net.network, net.prefixlen)"},{"line_number":1068,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FSAc%3D","line":1065,"in_reply_to":"AAAAWH%2F%2FSUk%3D","updated":"2014-03-18 22:09:16.000000000","message":"All of the convert_to methods are pretty generic. This function would be pretty specific to subnets since it\u0027s looking for a specific key in a nested dictionary. Do you think it should still be up in the attributes file?","commit_id":"a4e9652d61a9f6282371878018e5393080dc9d33"}],"neutron/tests/unit/test_attributes.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1093343b56a74043b7ba43bd8dfd01212e477e00","unresolved":false,"context_lines":[{"line_number":460,"context_line":"        self.assertEqual(msg, error)"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"        # Valid - IPv4 with non-zero masked bits is ok"},{"line_number":463,"context_line":"        for i in range(1, 254):"},{"line_number":464,"context_line":"            cidr \u003d \"192.168.1.%s/24\" % i"},{"line_number":465,"context_line":"            msg \u003d validator(cidr, None)"},{"line_number":466,"context_line":"            self.assertIsNone(msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FWYg%3D","line":463,"updated":"2014-03-18 13:08:45.000000000","message":"is it needed to test the whole range?","commit_id":"a4e9652d61a9f6282371878018e5393080dc9d33"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a0968390259458bb8bc221a38b6a91b39303ef91","unresolved":false,"context_lines":[{"line_number":460,"context_line":"        self.assertEqual(msg, error)"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"        # Valid - IPv4 with non-zero masked bits is ok"},{"line_number":463,"context_line":"        for i in range(1, 254):"},{"line_number":464,"context_line":"            cidr \u003d \"192.168.1.%s/24\" % i"},{"line_number":465,"context_line":"            msg \u003d validator(cidr, None)"},{"line_number":466,"context_line":"            self.assertIsNone(msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FSEs%3D","line":463,"in_reply_to":"AAAAWH%2F%2FSRU%3D","updated":"2014-03-18 22:09:16.000000000","message":"Yes, I have updated to include the broadcast. That\u0027s technically part of the subnet. :)","commit_id":"a4e9652d61a9f6282371878018e5393080dc9d33"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3d1a8af2bf969982424893d4d3a5a38f28a6be6e","unresolved":false,"context_lines":[{"line_number":460,"context_line":"        self.assertEqual(msg, error)"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"        # Valid - IPv4 with non-zero masked bits is ok"},{"line_number":463,"context_line":"        for i in range(1, 254):"},{"line_number":464,"context_line":"            cidr \u003d \"192.168.1.%s/24\" % i"},{"line_number":465,"context_line":"            msg \u003d validator(cidr, None)"},{"line_number":466,"context_line":"            self.assertIsNone(msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FSRU%3D","line":463,"in_reply_to":"AAAAWH%2F%2FU9M%3D","updated":"2014-03-18 21:33:35.000000000","message":"I wonder if .255 is accepted or not. Is it valid to specify broadcast address? According to the code, it is also accepted.","commit_id":"a4e9652d61a9f6282371878018e5393080dc9d33"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ec178b84c91a450e42becc10ee231ad7d44aa56c","unresolved":false,"context_lines":[{"line_number":460,"context_line":"        self.assertEqual(msg, error)"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"        # Valid - IPv4 with non-zero masked bits is ok"},{"line_number":463,"context_line":"        for i in range(1, 254):"},{"line_number":464,"context_line":"            cidr \u003d \"192.168.1.%s/24\" % i"},{"line_number":465,"context_line":"            msg \u003d validator(cidr, None)"},{"line_number":466,"context_line":"            self.assertIsNone(msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FU9M%3D","line":463,"in_reply_to":"AAAAWH%2F%2FWYg%3D","updated":"2014-03-18 15:48:12.000000000","message":"Better safe than sorry. :-) \nIn reading the discussion around how this feature went away, it was because there wasn\u0027t a UT that was explicitly exercising the functionality. There can be no mistake here. :-)","commit_id":"a4e9652d61a9f6282371878018e5393080dc9d33"}],"neutron/tests/unit/test_db_plugin.py":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"2a4e16350e93476e1af897d5cf082ec2500c54e1","unresolved":false,"context_lines":[{"line_number":2506,"context_line":"    def test_create_subnet_nonzero_cidr(self):"},{"line_number":2507,"context_line":"        with self.subnet(cidr\u003d\u002710.0.2.5/24\u0027) as s:"},{"line_number":2508,"context_line":"            # the API should accept and correct this for users"},{"line_number":2509,"context_line":"            self.assertEqual(s[\u0027subnet\u0027][\u0027cidr\u0027], \u002710.0.2.0/24\u0027)"},{"line_number":2510,"context_line":""},{"line_number":2511,"context_line":"    def test_create_subnet_bad_ip_version(self):"},{"line_number":2512,"context_line":"        with self.network() as network:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FP8g%3D","line":2509,"updated":"2014-03-19 05:54:48.000000000","message":"could we also get some more tests in here for /23, /16 /8 etc: \n\n1.2.3.4/16 \u003d 1.2.0.0","commit_id":"bfdb1f3af178d49f86ac0ebbaf81c7f422887ba2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"242e01d3f72afd8b35f3ba2770e0be457c040cb5","unresolved":false,"context_lines":[{"line_number":2506,"context_line":"    def test_create_subnet_nonzero_cidr(self):"},{"line_number":2507,"context_line":"        with self.subnet(cidr\u003d\u002710.0.2.5/24\u0027) as s:"},{"line_number":2508,"context_line":"            # the API should accept and correct this for users"},{"line_number":2509,"context_line":"            self.assertEqual(s[\u0027subnet\u0027][\u0027cidr\u0027], \u002710.0.2.0/24\u0027)"},{"line_number":2510,"context_line":""},{"line_number":2511,"context_line":"    def test_create_subnet_bad_ip_version(self):"},{"line_number":2512,"context_line":"        with self.network() as network:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FPus%3D","line":2509,"in_reply_to":"AAAAWH%2F%2FP8g%3D","updated":"2014-03-19 06:25:05.000000000","message":"certainly!","commit_id":"bfdb1f3af178d49f86ac0ebbaf81c7f422887ba2"}]}
