)]}'
{"nova/tests/functional/integrated_helpers.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb2c15fa4aadd8f2942837ff9610d2d8158710f6","unresolved":false,"context_lines":[{"line_number":502,"context_line":"            \u0027/resource_providers/%s/aggregates\u0027 % rp_uuid, version\u003d\u00271.19\u0027,"},{"line_number":503,"context_line":"            body\u003dpost_agg_req).body"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    def _get_all_rp_uuids_in_a_tree(self, root_rp_uuid):"},{"line_number":506,"context_line":"        rps \u003d self.placement_api.get("},{"line_number":507,"context_line":"            \u0027/resource_providers?in_tree\u003d%s\u0027 % root_rp_uuid,"},{"line_number":508,"context_line":"            version\u003d\u00271.20\u0027).body[\u0027resource_providers\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_aa06171a","line":505,"range":{"start_line":505,"start_character":42,"end_line":505,"end_character":54},"updated":"2018-10-03 17:05:00.000000000","message":"nit: pretty sure the API allows this to be any provider in the tree, not just the root.","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9aadf6a3b87a3c9d79fbf0d134afecc6b5181f2b","unresolved":false,"context_lines":[{"line_number":502,"context_line":"            \u0027/resource_providers/%s/aggregates\u0027 % rp_uuid, version\u003d\u00271.19\u0027,"},{"line_number":503,"context_line":"            body\u003dpost_agg_req).body"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    def _get_all_rp_uuids_in_a_tree(self, root_rp_uuid):"},{"line_number":506,"context_line":"        rps \u003d self.placement_api.get("},{"line_number":507,"context_line":"            \u0027/resource_providers?in_tree\u003d%s\u0027 % root_rp_uuid,"},{"line_number":508,"context_line":"            version\u003d\u00271.20\u0027).body[\u0027resource_providers\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_3ff0f2fb","line":505,"range":{"start_line":505,"start_character":42,"end_line":505,"end_character":54},"in_reply_to":"3f79a3b5_aa06171a","updated":"2018-10-04 13:32:17.000000000","message":"good point. this util does not need to restrict the passed in rp_uuid to the root. I would still keep the assert functions requesting the root_rp_uuid for test readability.\nDone.","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb2c15fa4aadd8f2942837ff9610d2d8158710f6","unresolved":false,"context_lines":[{"line_number":505,"context_line":"    def _get_all_rp_uuids_in_a_tree(self, root_rp_uuid):"},{"line_number":506,"context_line":"        rps \u003d self.placement_api.get("},{"line_number":507,"context_line":"            \u0027/resource_providers?in_tree\u003d%s\u0027 % root_rp_uuid,"},{"line_number":508,"context_line":"            version\u003d\u00271.20\u0027).body[\u0027resource_providers\u0027]"},{"line_number":509,"context_line":"        return [rp[\u0027uuid\u0027] for rp in rps]"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"    def assertRequestMatchesUsage(self, requested_resources, root_rp_uuid):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_8a51db0f","line":508,"range":{"start_line":508,"start_character":28,"end_line":508,"end_character":32},"updated":"2018-10-03 17:05:00.000000000","message":"remind me why this is .body and not .json(). Is the API not returning a real Request object?","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9aadf6a3b87a3c9d79fbf0d134afecc6b5181f2b","unresolved":false,"context_lines":[{"line_number":505,"context_line":"    def _get_all_rp_uuids_in_a_tree(self, root_rp_uuid):"},{"line_number":506,"context_line":"        rps \u003d self.placement_api.get("},{"line_number":507,"context_line":"            \u0027/resource_providers?in_tree\u003d%s\u0027 % root_rp_uuid,"},{"line_number":508,"context_line":"            version\u003d\u00271.20\u0027).body[\u0027resource_providers\u0027]"},{"line_number":509,"context_line":"        return [rp[\u0027uuid\u0027] for rp in rps]"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"    def assertRequestMatchesUsage(self, requested_resources, root_rp_uuid):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_5f8dae27","line":508,"range":{"start_line":508,"start_character":28,"end_line":508,"end_character":32},"in_reply_to":"3f79a3b5_8a51db0f","updated":"2018-10-04 13:32:17.000000000","message":"the fixture returns instances of nova.tests.functional.api.client.APIResponse I guess we could get rid of that wrapper at some point.","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb2c15fa4aadd8f2942837ff9610d2d8158710f6","unresolved":false,"context_lines":[{"line_number":519,"context_line":"            usage \u003d self._get_provider_usages(rp)"},{"line_number":520,"context_line":"            for rc, amount in usage.items():"},{"line_number":521,"context_line":"                total_usage[rc] +\u003d amount"},{"line_number":522,"context_line":"        # Cannot simply do an assertEqual(expected, actual) as usages always"},{"line_number":523,"context_line":"        # contain every RC even if the usage is 0 and the flavor could also"},{"line_number":524,"context_line":"        # contain explicit 0 request for some resources."},{"line_number":525,"context_line":"        # So if the flavor contains an explicit 0 resource request (e.g. in"},{"line_number":526,"context_line":"        # case of ironic resources:VCPU\u003d0) then this code needs to assert that"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_4aa18394","line":523,"range":{"start_line":522,"start_character":63,"end_line":523,"end_character":49},"updated":"2018-10-03 17:05:00.000000000","message":"Say what? \"every RC\"? This can\u0027t be right.\n\n[later] Ohh, okay - this is /resource_provider/{u}/usages not /usages, and it contains every RC *for which that provider has inventory*. Confusion allayed.","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb2c15fa4aadd8f2942837ff9610d2d8158710f6","unresolved":false,"context_lines":[{"line_number":520,"context_line":"            for rc, amount in usage.items():"},{"line_number":521,"context_line":"                total_usage[rc] +\u003d amount"},{"line_number":522,"context_line":"        # Cannot simply do an assertEqual(expected, actual) as usages always"},{"line_number":523,"context_line":"        # contain every RC even if the usage is 0 and the flavor could also"},{"line_number":524,"context_line":"        # contain explicit 0 request for some resources."},{"line_number":525,"context_line":"        # So if the flavor contains an explicit 0 resource request (e.g. in"},{"line_number":526,"context_line":"        # case of ironic resources:VCPU\u003d0) then this code needs to assert that"},{"line_number":527,"context_line":"        # such resource has 0 usage in the tree. In the other hand if the usage"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_4a7c231f","line":524,"range":{"start_line":523,"start_character":58,"end_line":524,"end_character":28},"updated":"2018-10-03 17:05:00.000000000","message":"eh? It can?","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb2c15fa4aadd8f2942837ff9610d2d8158710f6","unresolved":false,"context_lines":[{"line_number":522,"context_line":"        # Cannot simply do an assertEqual(expected, actual) as usages always"},{"line_number":523,"context_line":"        # contain every RC even if the usage is 0 and the flavor could also"},{"line_number":524,"context_line":"        # contain explicit 0 request for some resources."},{"line_number":525,"context_line":"        # So if the flavor contains an explicit 0 resource request (e.g. in"},{"line_number":526,"context_line":"        # case of ironic resources:VCPU\u003d0) then this code needs to assert that"},{"line_number":527,"context_line":"        # such resource has 0 usage in the tree. In the other hand if the usage"},{"line_number":528,"context_line":"        # contains 0 value for some resources that the flavor does not request"},{"line_number":529,"context_line":"        # then that is totally fine."}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_6a779f3c","line":526,"range":{"start_line":525,"start_character":68,"end_line":526,"end_character":41},"updated":"2018-10-03 17:05:00.000000000","message":"oh","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"4cd9cf2ff50cac10099b7f95c4a9637cd2f689ce","unresolved":false,"context_lines":[{"line_number":522,"context_line":"        # Cannot simply do an assertEqual(expected, actual) as usages always"},{"line_number":523,"context_line":"        # contain every RC even if the usage is 0 and the flavor could also"},{"line_number":524,"context_line":"        # contain explicit 0 request for some resources."},{"line_number":525,"context_line":"        # So if the flavor contains an explicit 0 resource request (e.g. in"},{"line_number":526,"context_line":"        # case of ironic resources:VCPU\u003d0) then this code needs to assert that"},{"line_number":527,"context_line":"        # such resource has 0 usage in the tree. In the other hand if the usage"},{"line_number":528,"context_line":"        # contains 0 value for some resources that the flavor does not request"},{"line_number":529,"context_line":"        # then that is totally fine."}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_fac6016a","line":526,"range":{"start_line":525,"start_character":68,"end_line":526,"end_character":41},"in_reply_to":"3f79a3b5_5fdb6e1f","updated":"2018-10-04 16:40:49.000000000","message":"Yeah, I remember that now. Weird one.","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9aadf6a3b87a3c9d79fbf0d134afecc6b5181f2b","unresolved":false,"context_lines":[{"line_number":522,"context_line":"        # Cannot simply do an assertEqual(expected, actual) as usages always"},{"line_number":523,"context_line":"        # contain every RC even if the usage is 0 and the flavor could also"},{"line_number":524,"context_line":"        # contain explicit 0 request for some resources."},{"line_number":525,"context_line":"        # So if the flavor contains an explicit 0 resource request (e.g. in"},{"line_number":526,"context_line":"        # case of ironic resources:VCPU\u003d0) then this code needs to assert that"},{"line_number":527,"context_line":"        # such resource has 0 usage in the tree. In the other hand if the usage"},{"line_number":528,"context_line":"        # contains 0 value for some resources that the flavor does not request"},{"line_number":529,"context_line":"        # then that is totally fine."}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_5fdb6e1f","line":526,"range":{"start_line":525,"start_character":68,"end_line":526,"end_character":41},"in_reply_to":"3f79a3b5_6a779f3c","updated":"2018-10-04 13:32:17.000000000","message":"yeah, flavor extra spec can be used to overwrite the amount of vcpu a flavor request.","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb2c15fa4aadd8f2942837ff9610d2d8158710f6","unresolved":false,"context_lines":[{"line_number":545,"context_line":"                    \u0027The requested resource amount does not match with the \u0027"},{"line_number":546,"context_line":"                    \u0027total resource usage of the RP tree\u0027)"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"    def assertFlavorMatchesUsage(self, flavor, root_rp_uuid):"},{"line_number":549,"context_line":"        self.assertRequestMatchesUsage(self._resources_from_flavor(flavor),"},{"line_number":550,"context_line":"                                       root_rp_uuid)"},{"line_number":551,"context_line":""},{"line_number":552,"context_line":"    def assertFlavorsMatchesUsage(self, flavor1, flavor2, root_rp_uuid):"},{"line_number":553,"context_line":"        resources1 \u003d self._resources_from_flavor(flavor1)"},{"line_number":554,"context_line":"        resources2 \u003d self._resources_from_flavor(flavor2)"},{"line_number":555,"context_line":"        resources \u003d collections.defaultdict(int)"},{"line_number":556,"context_line":"        for rc, value in itertools.chain("},{"line_number":557,"context_line":"                resources1.items(), resources2.items()):"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"            resources[rc] +\u003d value"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        self.assertRequestMatchesUsage(resources, root_rp_uuid)"},{"line_number":562,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_6abf9ffb","line":559,"range":{"start_line":548,"start_character":0,"end_line":559,"end_character":34},"updated":"2018-10-03 17:05:00.000000000","message":"nit: Since we\u0027re factoring/DRYing...\n\nThis could be a single method with a signature like\n\n def assertFlavorsMatchUsage(self, root_rp_uuid, *flavors)","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"4cd9cf2ff50cac10099b7f95c4a9637cd2f689ce","unresolved":false,"context_lines":[{"line_number":545,"context_line":"                    \u0027The requested resource amount does not match with the \u0027"},{"line_number":546,"context_line":"                    \u0027total resource usage of the RP tree\u0027)"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"    def assertFlavorMatchesUsage(self, flavor, root_rp_uuid):"},{"line_number":549,"context_line":"        self.assertRequestMatchesUsage(self._resources_from_flavor(flavor),"},{"line_number":550,"context_line":"                                       root_rp_uuid)"},{"line_number":551,"context_line":""},{"line_number":552,"context_line":"    def assertFlavorsMatchesUsage(self, flavor1, flavor2, root_rp_uuid):"},{"line_number":553,"context_line":"        resources1 \u003d self._resources_from_flavor(flavor1)"},{"line_number":554,"context_line":"        resources2 \u003d self._resources_from_flavor(flavor2)"},{"line_number":555,"context_line":"        resources \u003d collections.defaultdict(int)"},{"line_number":556,"context_line":"        for rc, value in itertools.chain("},{"line_number":557,"context_line":"                resources1.items(), resources2.items()):"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"            resources[rc] +\u003d value"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        self.assertRequestMatchesUsage(resources, root_rp_uuid)"},{"line_number":562,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_fafa8142","line":559,"range":{"start_line":548,"start_character":0,"end_line":559,"end_character":34},"in_reply_to":"3f79a3b5_1d7dfee4","updated":"2018-10-04 16:40:49.000000000","message":"Thanks for doing that, looks like the refactor was kind of a PITA.\n\nHaving said that... nit: I would name it assertFlavorsMatchUsage :)","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9aadf6a3b87a3c9d79fbf0d134afecc6b5181f2b","unresolved":false,"context_lines":[{"line_number":545,"context_line":"                    \u0027The requested resource amount does not match with the \u0027"},{"line_number":546,"context_line":"                    \u0027total resource usage of the RP tree\u0027)"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"    def assertFlavorMatchesUsage(self, flavor, root_rp_uuid):"},{"line_number":549,"context_line":"        self.assertRequestMatchesUsage(self._resources_from_flavor(flavor),"},{"line_number":550,"context_line":"                                       root_rp_uuid)"},{"line_number":551,"context_line":""},{"line_number":552,"context_line":"    def assertFlavorsMatchesUsage(self, flavor1, flavor2, root_rp_uuid):"},{"line_number":553,"context_line":"        resources1 \u003d self._resources_from_flavor(flavor1)"},{"line_number":554,"context_line":"        resources2 \u003d self._resources_from_flavor(flavor2)"},{"line_number":555,"context_line":"        resources \u003d collections.defaultdict(int)"},{"line_number":556,"context_line":"        for rc, value in itertools.chain("},{"line_number":557,"context_line":"                resources1.items(), resources2.items()):"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"            resources[rc] +\u003d value"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        self.assertRequestMatchesUsage(resources, root_rp_uuid)"},{"line_number":562,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_1d7dfee4","line":559,"range":{"start_line":548,"start_character":0,"end_line":559,"end_character":34},"in_reply_to":"3f79a3b5_6abf9ffb","updated":"2018-10-04 13:32:17.000000000","message":"good point.\nDone.","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb2c15fa4aadd8f2942837ff9610d2d8158710f6","unresolved":false,"context_lines":[{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        self.assertRequestMatchesUsage(resources, root_rp_uuid)"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"    def _resources_from_flavor(self, flavor):"},{"line_number":564,"context_line":"        resources \u003d collections.defaultdict(int)"},{"line_number":565,"context_line":"        resources[\u0027VCPU\u0027] \u003d flavor[\u0027vcpus\u0027]"},{"line_number":566,"context_line":"        resources[\u0027MEMORY_MB\u0027] \u003d flavor[\u0027ram\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_8a78fb7d","line":563,"range":{"start_line":563,"start_character":8,"end_line":563,"end_character":30},"updated":"2018-10-03 17:05:00.000000000","message":"Why aren\u0027t we using nova.scheduler.utils.resources_from_flavor?","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"4cd9cf2ff50cac10099b7f95c4a9637cd2f689ce","unresolved":false,"context_lines":[{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        self.assertRequestMatchesUsage(resources, root_rp_uuid)"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"    def _resources_from_flavor(self, flavor):"},{"line_number":564,"context_line":"        resources \u003d collections.defaultdict(int)"},{"line_number":565,"context_line":"        resources[\u0027VCPU\u0027] \u003d flavor[\u0027vcpus\u0027]"},{"line_number":566,"context_line":"        resources[\u0027MEMORY_MB\u0027] \u003d flavor[\u0027ram\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_3ad0f9c8","line":563,"range":{"start_line":563,"start_character":8,"end_line":563,"end_character":30},"in_reply_to":"3f79a3b5_1ffad675","updated":"2018-10-04 16:40:49.000000000","message":"I get your point, though I\u0027m not completely sure I agree.\n\nI don\u0027t feel like the intent of these tests suites is to validate the resources_from_flavor method. I would think we want to rely on unit tests to do that. And then here we get to assume that guy works, rather than pretty much (but not exactly) duplicating the algorithm, and introducing a whole new source of potential bugs.\n\nNot going to hold up on this.","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9aadf6a3b87a3c9d79fbf0d134afecc6b5181f2b","unresolved":false,"context_lines":[{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        self.assertRequestMatchesUsage(resources, root_rp_uuid)"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"    def _resources_from_flavor(self, flavor):"},{"line_number":564,"context_line":"        resources \u003d collections.defaultdict(int)"},{"line_number":565,"context_line":"        resources[\u0027VCPU\u0027] \u003d flavor[\u0027vcpus\u0027]"},{"line_number":566,"context_line":"        resources[\u0027MEMORY_MB\u0027] \u003d flavor[\u0027ram\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_1ffad675","line":563,"range":{"start_line":563,"start_character":8,"end_line":563,"end_character":30},"in_reply_to":"3f79a3b5_8a78fb7d","updated":"2018-10-04 13:32:17.000000000","message":"This function is used to assert that the nova code works properly. So if it relies on the same nova code during the assert then a fault in resources_from_flavor would not be found by these tests. (e.g. if resources_from_flavor misses VCPU resource then this assert won\u0027t detect that as it would generate the expected resources in the same way, calling resources_from_flavor which would leave out VCPU)","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb2c15fa4aadd8f2942837ff9610d2d8158710f6","unresolved":false,"context_lines":[{"line_number":576,"context_line":"        allocations \u003d self._get_allocations_by_server_uuid(consumer_uuid)"},{"line_number":577,"context_line":"        # NOTE(gibi): flattening the placement allocation means we cannot"},{"line_number":578,"context_line":"        # verify the structure here. However I don\u0027t see any way to define this"},{"line_number":579,"context_line":"        # function for nested and non-nested trees in a generic way."},{"line_number":580,"context_line":"        total_allocation \u003d collections.defaultdict(int)"},{"line_number":581,"context_line":"        for rp, alloc in allocations.items():"},{"line_number":582,"context_line":"            self.assertIn(rp, expected_rps, \u0027Unexpected, out of tree RP in the\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_2abf67ca","line":579,"updated":"2018-10-03 17:05:00.000000000","message":"Mm, yeah, without duplicating group_policy logic and other horribleness...","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9aadf6a3b87a3c9d79fbf0d134afecc6b5181f2b","unresolved":false,"context_lines":[{"line_number":576,"context_line":"        allocations \u003d self._get_allocations_by_server_uuid(consumer_uuid)"},{"line_number":577,"context_line":"        # NOTE(gibi): flattening the placement allocation means we cannot"},{"line_number":578,"context_line":"        # verify the structure here. However I don\u0027t see any way to define this"},{"line_number":579,"context_line":"        # function for nested and non-nested trees in a generic way."},{"line_number":580,"context_line":"        total_allocation \u003d collections.defaultdict(int)"},{"line_number":581,"context_line":"        for rp, alloc in allocations.items():"},{"line_number":582,"context_line":"            self.assertIn(rp, expected_rps, \u0027Unexpected, out of tree RP in the\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_dff77e8b","line":579,"in_reply_to":"3f79a3b5_2abf67ca","updated":"2018-10-04 13:32:17.000000000","message":"I agree.","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb2c15fa4aadd8f2942837ff9610d2d8158710f6","unresolved":false,"context_lines":[{"line_number":579,"context_line":"        # function for nested and non-nested trees in a generic way."},{"line_number":580,"context_line":"        total_allocation \u003d collections.defaultdict(int)"},{"line_number":581,"context_line":"        for rp, alloc in allocations.items():"},{"line_number":582,"context_line":"            self.assertIn(rp, expected_rps, \u0027Unexpected, out of tree RP in the\u0027"},{"line_number":583,"context_line":"                                            \u0027 allocation\u0027)"},{"line_number":584,"context_line":"            for rc, value in alloc[\u0027resources\u0027].items():"},{"line_number":585,"context_line":"                total_allocation[rc] +\u003d value"},{"line_number":586,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_eaa2cfac","line":583,"range":{"start_line":582,"start_character":0,"end_line":583,"end_character":58},"updated":"2018-10-03 17:05:00.000000000","message":"This is okay for now I think, but will be bogus once sharing works. Perhaps TODO-worthy?","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9aadf6a3b87a3c9d79fbf0d134afecc6b5181f2b","unresolved":false,"context_lines":[{"line_number":579,"context_line":"        # function for nested and non-nested trees in a generic way."},{"line_number":580,"context_line":"        total_allocation \u003d collections.defaultdict(int)"},{"line_number":581,"context_line":"        for rp, alloc in allocations.items():"},{"line_number":582,"context_line":"            self.assertIn(rp, expected_rps, \u0027Unexpected, out of tree RP in the\u0027"},{"line_number":583,"context_line":"                                            \u0027 allocation\u0027)"},{"line_number":584,"context_line":"            for rc, value in alloc[\u0027resources\u0027].items():"},{"line_number":585,"context_line":"                total_allocation[rc] +\u003d value"},{"line_number":586,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_1f2f36f5","line":583,"range":{"start_line":582,"start_character":0,"end_line":583,"end_character":58},"in_reply_to":"3f79a3b5_eaa2cfac","updated":"2018-10-04 13:32:17.000000000","message":"Yeah, I\u0027ve added a NOTE at the top of the function.","commit_id":"f16ea1626a5c060c54850aec2319a655226e1d19"}]}
