)]}'
{"neutron/tests/tools.py":[{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"58a01d16433ad254806b693a37c285551e29c2fe","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        return \u002710.%d.%d.0/%d\u0027 % (random.randint(3, 254),"},{"line_number":249,"context_line":"                                  random.randint(3, 254),"},{"line_number":250,"context_line":"                                  24)"},{"line_number":251,"context_line":"    return \u00272001:db8:%x::/%d\u0027 % (random.getrandbits(16), 64)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"def get_random_mac():"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_4b30f201","line":251,"range":{"start_line":251,"start_character":23,"end_line":251,"end_character":27},"updated":"2016-04-18 07:03:27.000000000","message":"The tests were passing with the earlier code?","commit_id":"072cc888e2d5a2b1da2a7dc6506925e7a3133fd8"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"8f84898f798fb6d05d4ac037559f72e5c4dc7666","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        return \u002710.%d.%d.0/%d\u0027 % (random.randint(3, 254),"},{"line_number":249,"context_line":"                                  random.randint(3, 254),"},{"line_number":250,"context_line":"                                  24)"},{"line_number":251,"context_line":"    return \u00272001:db8:%x::/%d\u0027 % (random.getrandbits(16), 64)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"def get_random_mac():"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_c69fd901","line":251,"range":{"start_line":251,"start_character":23,"end_line":251,"end_character":27},"in_reply_to":"1a122d0e_4b30f201","updated":"2016-04-18 07:30:44.000000000","message":"Yes, the IPv6 was not used apparently...","commit_id":"072cc888e2d5a2b1da2a7dc6506925e7a3133fd8"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"7e7fc99855ae0be003feea40f978e1bd02e00971","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        return \u002710.%d.%d.0/%d\u0027 % (random.randint(3, 254),"},{"line_number":249,"context_line":"                                  random.randint(3, 254),"},{"line_number":250,"context_line":"                                  24)"},{"line_number":251,"context_line":"    return \u00272001:db8:%x::/%d\u0027 % (random.getrandbits(16), 64)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"def get_random_mac():"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_9869ac28","line":251,"range":{"start_line":251,"start_character":23,"end_line":251,"end_character":27},"in_reply_to":"1a122d0e_a6729de3","updated":"2016-04-18 13:36:12.000000000","message":"Done. I have added the randomly generated IPv4 or IPv6 invocation of get_random_cidr, as well as other tool function that have choice of v4/v6.\nThis function is mainly used in Neutron object test_base.py.","commit_id":"072cc888e2d5a2b1da2a7dc6506925e7a3133fd8"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"47ed3bd6594afc5fe303997d028403ce0e145297","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        return \u002710.%d.%d.0/%d\u0027 % (random.randint(3, 254),"},{"line_number":249,"context_line":"                                  random.randint(3, 254),"},{"line_number":250,"context_line":"                                  24)"},{"line_number":251,"context_line":"    return \u00272001:db8:%x::/%d\u0027 % (random.getrandbits(16), 64)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"def get_random_mac():"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_a6729de3","line":251,"range":{"start_line":251,"start_character":23,"end_line":251,"end_character":27},"in_reply_to":"1a122d0e_c69fd901","updated":"2016-04-18 07:33:35.000000000","message":"Means we are missing a test case.\nCould you please write a unit test case for this?\nIt will help improve the test coverage...","commit_id":"072cc888e2d5a2b1da2a7dc6506925e7a3133fd8"}],"neutron/tests/unit/objects/test_base.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"5ecdcdead67a8b585f073989bbc9441d7393e66e","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        for field, field_obj in obj_cls.fields.items():"},{"line_number":292,"context_line":"            if field not in obj_cls.synthetic_fields:"},{"line_number":293,"context_line":"                generator \u003d FIELD_TYPE_VALUE_GENERATOR_MAP[type(field_obj)]"},{"line_number":294,"context_line":"                fields[field] \u003d generator(version\u003dversion) if \u0027version\u0027 in \\"},{"line_number":295,"context_line":"                    generator.__code__.co_varnames else generator()"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"        obj \u003d obj_cls(None, **fields)"},{"line_number":298,"context_line":"        return obj.modify_fields_to_db(fields)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_b315a69c","line":295,"range":{"start_line":294,"start_character":59,"end_line":295,"end_character":50},"updated":"2016-04-18 13:58:14.000000000","message":"wow. please don\u0027t.\n\nInstead, make the generator randomly picking up the version for you. Meaning, there would be a test only helper used as a generator instead of a tool from neutron.tests.tools directly.","commit_id":"631a606bcebf8d932cf077dda3731583cb3bf448"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"e6939be105b5aae95705add2934fa07b9d928030","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        for field, field_obj in obj_cls.fields.items():"},{"line_number":292,"context_line":"            if field not in obj_cls.synthetic_fields:"},{"line_number":293,"context_line":"                generator \u003d FIELD_TYPE_VALUE_GENERATOR_MAP[type(field_obj)]"},{"line_number":294,"context_line":"                fields[field] \u003d generator(version\u003dversion) if \u0027version\u0027 in \\"},{"line_number":295,"context_line":"                    generator.__code__.co_varnames else generator()"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"        obj \u003d obj_cls(None, **fields)"},{"line_number":298,"context_line":"        return obj.modify_fields_to_db(fields)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_f686ecd9","line":295,"range":{"start_line":294,"start_character":59,"end_line":295,"end_character":50},"in_reply_to":"1a122d0e_b315a69c","updated":"2016-04-18 14:14:33.000000000","message":"You mean like static mapping which generator has \u0027version\u0027 argument and which doesn\u0027t?","commit_id":"631a606bcebf8d932cf077dda3731583cb3bf448"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e9411680e487fc3d541454ea2dc2f7eebce93396","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        for field, field_obj in obj_cls.fields.items():"},{"line_number":292,"context_line":"            if field not in obj_cls.synthetic_fields:"},{"line_number":293,"context_line":"                generator \u003d FIELD_TYPE_VALUE_GENERATOR_MAP[type(field_obj)]"},{"line_number":294,"context_line":"                fields[field] \u003d generator(version\u003dversion) if \u0027version\u0027 in \\"},{"line_number":295,"context_line":"                    generator.__code__.co_varnames else generator()"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"        obj \u003d obj_cls(None, **fields)"},{"line_number":298,"context_line":"        return obj.modify_fields_to_db(fields)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_fcab6b87","line":295,"range":{"start_line":294,"start_character":59,"end_line":295,"end_character":50},"in_reply_to":"1a122d0e_f686ecd9","updated":"2016-04-18 14:37:33.000000000","message":"No. Just write a small generator that will choose a random version for you. Inside, it will use the generator that we currently use, but will also pass a random version into it.","commit_id":"631a606bcebf8d932cf077dda3731583cb3bf448"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"04e32c9a2101fb3cf2de47a7e99d1bd80510d0b9","unresolved":false,"context_lines":[{"line_number":235,"context_line":"    obj_fields.ObjectField: lambda: None,"},{"line_number":236,"context_line":"    obj_fields.ListOfObjectsField: lambda: [],"},{"line_number":237,"context_line":"    common_types.DscpMarkField: get_random_dscp_mark,"},{"line_number":238,"context_line":"    obj_fields.IPNetworkField: tools.get_random_ip_network,"},{"line_number":239,"context_line":"    common_types.IPNetworkPrefixLenField: tools.get_random_prefixlen,"},{"line_number":240,"context_line":"    common_types.ListOfIPNetworksField: get_list_of_random_networks,"},{"line_number":241,"context_line":"    common_types.IPVersionEnumField: tools.get_random_ip_version,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_12f0a2fd","line":238,"range":{"start_line":238,"start_character":31,"end_line":238,"end_character":58},"updated":"2016-04-19 12:43:34.000000000","message":"I am sorry if I can\u0027t express myself clearly. My suggestion was to replace this generator here with something like:\n\ndef get_random_ip_network():\n    ip_version \u003d tools.get_random_ip_version()\n    return tools.get_random_ip_network(ip_version)","commit_id":"6ffa41185e2ec0aa2f50836044bccbdc1bb7fe04"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"9c2721ca4882a499217baa608ae127c48c7d1d97","unresolved":false,"context_lines":[{"line_number":235,"context_line":"    obj_fields.ObjectField: lambda: None,"},{"line_number":236,"context_line":"    obj_fields.ListOfObjectsField: lambda: [],"},{"line_number":237,"context_line":"    common_types.DscpMarkField: get_random_dscp_mark,"},{"line_number":238,"context_line":"    obj_fields.IPNetworkField: tools.get_random_ip_network,"},{"line_number":239,"context_line":"    common_types.IPNetworkPrefixLenField: tools.get_random_prefixlen,"},{"line_number":240,"context_line":"    common_types.ListOfIPNetworksField: get_list_of_random_networks,"},{"line_number":241,"context_line":"    common_types.IPVersionEnumField: tools.get_random_ip_version,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_327b1ef7","line":238,"range":{"start_line":238,"start_character":31,"end_line":238,"end_character":58},"in_reply_to":"1a122d0e_12f0a2fd","updated":"2016-04-19 12:54:16.000000000","message":"I was thinking about one IP version per object, because you will get inconsistent state of object when you will generate different IP version for every field...\nBut I guess that we do not keep consistency for random fields in the first place so I may do it your way.","commit_id":"6ffa41185e2ec0aa2f50836044bccbdc1bb7fe04"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"92b6119301081c6df804acfae39ba4a4a7bdf3ff","unresolved":false,"context_lines":[{"line_number":235,"context_line":"    obj_fields.ObjectField: lambda: None,"},{"line_number":236,"context_line":"    obj_fields.ListOfObjectsField: lambda: [],"},{"line_number":237,"context_line":"    common_types.DscpMarkField: get_random_dscp_mark,"},{"line_number":238,"context_line":"    obj_fields.IPNetworkField: tools.get_random_ip_network,"},{"line_number":239,"context_line":"    common_types.IPNetworkPrefixLenField: tools.get_random_prefixlen,"},{"line_number":240,"context_line":"    common_types.ListOfIPNetworksField: get_list_of_random_networks,"},{"line_number":241,"context_line":"    common_types.IPVersionEnumField: tools.get_random_ip_version,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_5d718ba7","line":238,"range":{"start_line":238,"start_character":31,"end_line":238,"end_character":58},"in_reply_to":"1a122d0e_327b1ef7","updated":"2016-04-19 12:57:56.000000000","message":"That\u0027s interesting actually. If that\u0027s the goal, then your solution is worth a shot indeed.","commit_id":"6ffa41185e2ec0aa2f50836044bccbdc1bb7fe04"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"04e32c9a2101fb3cf2de47a7e99d1bd80510d0b9","unresolved":false,"context_lines":[{"line_number":237,"context_line":"    common_types.DscpMarkField: get_random_dscp_mark,"},{"line_number":238,"context_line":"    obj_fields.IPNetworkField: tools.get_random_ip_network,"},{"line_number":239,"context_line":"    common_types.IPNetworkPrefixLenField: tools.get_random_prefixlen,"},{"line_number":240,"context_line":"    common_types.ListOfIPNetworksField: get_list_of_random_networks,"},{"line_number":241,"context_line":"    common_types.IPVersionEnumField: tools.get_random_ip_version,"},{"line_number":242,"context_line":"    obj_fields.DateTimeField: timeutils.utcnow,"},{"line_number":243,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_32d2fe5c","line":240,"range":{"start_line":240,"start_character":40,"end_line":240,"end_character":67},"updated":"2016-04-19 12:43:34.000000000","message":"probably same here.","commit_id":"6ffa41185e2ec0aa2f50836044bccbdc1bb7fe04"}]}
