)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ab8b6b81f3c84ee555f8b670bbb9f9a2036dbf7e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"SchedulerReportClient.get_provider_tree_and_ensure_root retrieves from"},{"line_number":10,"context_line":"the placement API all providers associated with a specified provider via"},{"line_number":11,"context_line":"its nested tree or aggregates.  It returns a fresh ProviderTree"},{"line_number":12,"context_line":"populated with these providers and their inventory.  This is the data"},{"line_number":13,"context_line":"structure which will be passed into the virt driver\u0027s"},{"line_number":14,"context_line":"update_provider_tree method."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"7f96bb07_7b818d4a","line":11,"range":{"start_line":11,"start_character":4,"end_line":11,"end_character":15},"updated":"2018-01-19 20:35:30.000000000","message":"s/nested tree/tree/","commit_id":"5d7d3a63ba19aa38115f64daec3fcb26f7a71889"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ab8b6b81f3c84ee555f8b670bbb9f9a2036dbf7e","unresolved":false,"context_lines":[{"line_number":18,"context_line":"already present.  This is because the resource tracker is currently"},{"line_number":19,"context_line":"structured to handle init and update in the same code path.  At some"},{"line_number":20,"context_line":"point in the future we may want to split that out and make this method"},{"line_number":21,"context_line":"*just* return a deepcopy of the cache."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: I9469dec80c2b357185645ef1705f098f25dcb8c8"},{"line_number":24,"context_line":"blueprint: nested-resource-providers"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"7f96bb07_db8f8173","line":21,"updated":"2018-01-19 20:35:30.000000000","message":"++","commit_id":"5d7d3a63ba19aa38115f64daec3fcb26f7a71889"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"88ac7086e6aa638b524df3ec502c8fec6187af87","unresolved":false,"context_lines":[{"line_number":15,"context_line":"In its current incarnation, this method will create and/or load into"},{"line_number":16,"context_line":"cache the root provider (associated with the compute node) if not"},{"line_number":17,"context_line":"already present.  This is because the resource tracker is currently"},{"line_number":18,"context_line":"structured to handle init and update in the same code path.  At some"},{"line_number":19,"context_line":"point in the future we may want to split that out and make this method"},{"line_number":20,"context_line":"*just* return a deepcopy of the cache."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: I9469dec80c2b357185645ef1705f098f25dcb8c8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"7f96bb07_0b5ed0e5","line":19,"range":{"start_line":18,"start_character":61,"end_line":19,"end_character":49},"updated":"2018-01-22 15:48:43.000000000","message":"yep.","commit_id":"2276b7e005d62d9cb232ecbf0b14ca534fd6247a"}],"nova/scheduler/client/report.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6cca6ef0fd39248d9a16c1fce0938997c1cb6a3e","unresolved":false,"context_lines":[{"line_number":971,"context_line":"                                     which must have been previously _ensured."},{"line_number":972,"context_line":"        :return: A new ProviderTree object."},{"line_number":973,"context_line":"        \"\"\""},{"line_number":974,"context_line":"        # (Re)populate the local ProviderTree"},{"line_number":975,"context_line":"        self._ensure_resource_provider("},{"line_number":976,"context_line":"            rp_uuid, name\u003dname, parent_provider_uuid\u003dparent_provider_uuid)"},{"line_number":977,"context_line":"        # Ensure inventories are up to date (for *all* cached RPs)"},{"line_number":978,"context_line":"        for uuid in self._provider_tree.get_provider_uuids():"},{"line_number":979,"context_line":"            self._refresh_and_get_inventory(uuid)"},{"line_number":980,"context_line":"        # Return a *copy* of the tree."},{"line_number":981,"context_line":"        return copy.deepcopy(self._provider_tree)"},{"line_number":982,"context_line":""},{"line_number":983,"context_line":"    def set_inventory_for_provider(self, rp_uuid, rp_name, inv_data,"},{"line_number":984,"context_line":"                                   parent_provider_uuid\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"df87a7cf_f0d75ced","line":981,"range":{"start_line":974,"start_character":0,"end_line":981,"end_character":49},"updated":"2017-12-08 21:08:02.000000000","message":"It\u0027s possible we need to do more refreshing of \"associated\" providers here.  See notes in test_report_client.  The delta I\u0027ve been playing with locally looks like this:\n\n          # (Re)populate the local ProviderTree\n          self._ensure_resource_provider(\n              rp_uuid, name\u003dname, parent_provider_uuid\u003dparent_provider_uuid)\n -        # Ensure inventories are up to date (for *all* cached RPs)\n          for uuid in self._provider_tree.get_provider_uuids():\n +            # The above will ensure associations (traits, aggs) are fresh for\n +            # the providers in rp_uuid\u0027s subtree; but the other (e.g. ancestor\n +            # or sharing) providers may have never been populated.  The below\n +            # will be a no-op for anything we already refreshed above, but is\n +            # necessary to refresh these outliers.\n +            self._refresh_associations(uuid, refresh_sharing\u003dFalse)\n +            # Ensure inventories are up to date (for *all* cached RPs)\n              self._refresh_and_get_inventory(uuid)\n          # Return a *copy* of the tree.\n          return copy.deepcopy(self._provider_tree)","commit_id":"8408ffa9bad4ca357f1d2246786ad92c62683772"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"0d2375db110f6feb5ba733b3cc3225da85976b9f","unresolved":false,"context_lines":[{"line_number":990,"context_line":"            rp_uuid, name\u003dname, parent_provider_uuid\u003dparent_provider_uuid)"},{"line_number":991,"context_line":"        # Ensure inventories are up to date (for *all* cached RPs)"},{"line_number":992,"context_line":"        for uuid in self._provider_tree.get_provider_uuids():"},{"line_number":993,"context_line":"            self._refresh_and_get_inventory(uuid)"},{"line_number":994,"context_line":"        # Return a *copy* of the tree."},{"line_number":995,"context_line":"        return copy.deepcopy(self._provider_tree)"},{"line_number":996,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"7f96bb07_07d7dcc1","line":993,"updated":"2018-01-10 17:44:51.000000000","message":"Do we also need to refresh traits and aggregates?","commit_id":"215acc8180aa90badefe2e8fbed67dc276ef2136"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"58228f0873b030c349dc06936105099974b6a6ac","unresolved":false,"context_lines":[{"line_number":990,"context_line":"            rp_uuid, name\u003dname, parent_provider_uuid\u003dparent_provider_uuid)"},{"line_number":991,"context_line":"        # Ensure inventories are up to date (for *all* cached RPs)"},{"line_number":992,"context_line":"        for uuid in self._provider_tree.get_provider_uuids():"},{"line_number":993,"context_line":"            self._refresh_and_get_inventory(uuid)"},{"line_number":994,"context_line":"        # Return a *copy* of the tree."},{"line_number":995,"context_line":"        return copy.deepcopy(self._provider_tree)"},{"line_number":996,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"7f96bb07_0b63491c","line":993,"in_reply_to":"7f96bb07_07d7dcc1","updated":"2018-01-11 19:14:24.000000000","message":"That\u0027s done via _ensure_resource_provider.\n\nConfusing, I know.  But the comment on L693-5 explains why they\u0027re split up.\n\nEventually I think they should all be refreshed together, as you say.  But not yet.","commit_id":"215acc8180aa90badefe2e8fbed67dc276ef2136"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c124aab29b1a79a92f1b446e490d69b9cc4d2dc9","unresolved":false,"context_lines":[{"line_number":981,"context_line":"                                     which must have been previously _ensured."},{"line_number":982,"context_line":"        :return: A new ProviderTree object."},{"line_number":983,"context_line":"        \"\"\""},{"line_number":984,"context_line":"        # (Re)populate the local ProviderTree"},{"line_number":985,"context_line":"        self._ensure_resource_provider("},{"line_number":986,"context_line":"            rp_uuid, name\u003dname, parent_provider_uuid\u003dparent_provider_uuid)"},{"line_number":987,"context_line":"        # Ensure inventories are up to date (for *all* cached RPs)"},{"line_number":988,"context_line":"        for uuid in self._provider_tree.get_provider_uuids():"},{"line_number":989,"context_line":"            self._refresh_and_get_inventory(uuid)"}],"source_content_type":"text/x-python","patch_set":26,"id":"7f96bb07_7981c7c2","line":986,"range":{"start_line":984,"start_character":0,"end_line":986,"end_character":74},"updated":"2018-01-18 14:00:12.000000000","message":"I don\u0027t care to do the _ensure_resource_provider() call here. I would much prefer to remove the name and parent_provider_uuid parameters to get_provider_tree() and return None if no such provider could be found in the cached _provider_tree.\n\nCallers to get_provider_tree() that get a None response could call create_resource_provider() if that is indeed what is necessary (or log an error since this situation just simply shouldn\u0027t occur in normal operation of the resource tracker and reportclient.","commit_id":"dab362d6f7a7a7cc9551ec6569470af585b06d99"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1a11723b2b119519f3def592110c501829f4890b","unresolved":false,"context_lines":[{"line_number":981,"context_line":"                                     which must have been previously _ensured."},{"line_number":982,"context_line":"        :return: A new ProviderTree object."},{"line_number":983,"context_line":"        \"\"\""},{"line_number":984,"context_line":"        # (Re)populate the local ProviderTree"},{"line_number":985,"context_line":"        self._ensure_resource_provider("},{"line_number":986,"context_line":"            rp_uuid, name\u003dname, parent_provider_uuid\u003dparent_provider_uuid)"},{"line_number":987,"context_line":"        # Ensure inventories are up to date (for *all* cached RPs)"},{"line_number":988,"context_line":"        for uuid in self._provider_tree.get_provider_uuids():"},{"line_number":989,"context_line":"            self._refresh_and_get_inventory(uuid)"}],"source_content_type":"text/x-python","patch_set":26,"id":"7f96bb07_c4dfce0a","line":986,"range":{"start_line":984,"start_character":0,"end_line":986,"end_character":74},"in_reply_to":"7f96bb07_7981c7c2","updated":"2018-01-18 14:21:59.000000000","message":"On second thought, after reading further up the patch series, I don\u0027t think get_provider_tree() should have *any* parameters. Instead, just return the deep-copy of the cached _provider_tree object.","commit_id":"dab362d6f7a7a7cc9551ec6569470af585b06d99"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e66d401e0a6411f5d15d6a486f41ca60a69d08e5","unresolved":false,"context_lines":[{"line_number":981,"context_line":"                                     which must have been previously _ensured."},{"line_number":982,"context_line":"        :return: A new ProviderTree object."},{"line_number":983,"context_line":"        \"\"\""},{"line_number":984,"context_line":"        # (Re)populate the local ProviderTree"},{"line_number":985,"context_line":"        self._ensure_resource_provider("},{"line_number":986,"context_line":"            rp_uuid, name\u003dname, parent_provider_uuid\u003dparent_provider_uuid)"},{"line_number":987,"context_line":"        # Ensure inventories are up to date (for *all* cached RPs)"},{"line_number":988,"context_line":"        for uuid in self._provider_tree.get_provider_uuids():"},{"line_number":989,"context_line":"            self._refresh_and_get_inventory(uuid)"}],"source_content_type":"text/x-python","patch_set":26,"id":"7f96bb07_d1fb0f44","line":986,"range":{"start_line":984,"start_character":0,"end_line":986,"end_character":74},"in_reply_to":"7f96bb07_c4dfce0a","updated":"2018-01-18 15:19:30.000000000","message":"It takes parameters for the bootstrap path.  We still want the resource tracker - not the virt driver - to have control over the compute RP\u0027s UUID, so the scheduler can correctly identify it as the target for spawns.  So the first time we call this from the resource tracker, when there is no provider registered for this host, we need to create it.  And on compute restart or other cache-clearing events, we need to repopulate our local cache.\n\nWe could do that from the resource tracker as you suggest, but we would have to publicize _ensure_resource_provider/_refresh_and_get_inventory.  Is that what you would prefer?","commit_id":"dab362d6f7a7a7cc9551ec6569470af585b06d99"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b6643ab97e139f6a9e5a5d0dc662cdab74c2ea3a","unresolved":false,"context_lines":[{"line_number":981,"context_line":"                                     which must have been previously _ensured."},{"line_number":982,"context_line":"        :return: A new ProviderTree object."},{"line_number":983,"context_line":"        \"\"\""},{"line_number":984,"context_line":"        # (Re)populate the local ProviderTree"},{"line_number":985,"context_line":"        self._ensure_resource_provider("},{"line_number":986,"context_line":"            rp_uuid, name\u003dname, parent_provider_uuid\u003dparent_provider_uuid)"},{"line_number":987,"context_line":"        # Ensure inventories are up to date (for *all* cached RPs)"},{"line_number":988,"context_line":"        for uuid in self._provider_tree.get_provider_uuids():"},{"line_number":989,"context_line":"            self._refresh_and_get_inventory(uuid)"}],"source_content_type":"text/x-python","patch_set":26,"id":"7f96bb07_9b8cc036","line":986,"range":{"start_line":984,"start_character":0,"end_line":986,"end_character":74},"in_reply_to":"7f96bb07_d1fb0f44","updated":"2018-01-18 17:58:05.000000000","message":"Per discussion:\n\n- Leave the params\n- Leave the _ensuring\n- Rename the method to get_provider_tree_and_ensure_root\n- Add words indicating that this awkwardness is because rt currently makes no distinction between init and update, so we have to bootstrap through the same path.","commit_id":"dab362d6f7a7a7cc9551ec6569470af585b06d99"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c124aab29b1a79a92f1b446e490d69b9cc4d2dc9","unresolved":false,"context_lines":[{"line_number":988,"context_line":"        for uuid in self._provider_tree.get_provider_uuids():"},{"line_number":989,"context_line":"            self._refresh_and_get_inventory(uuid)"},{"line_number":990,"context_line":"        # Return a *copy* of the tree."},{"line_number":991,"context_line":"        return copy.deepcopy(self._provider_tree)"},{"line_number":992,"context_line":""},{"line_number":993,"context_line":"    def set_inventory_for_provider(self, rp_uuid, rp_name, inv_data,"},{"line_number":994,"context_line":"                                   parent_provider_uuid\u003dNone):"}],"source_content_type":"text/x-python","patch_set":26,"id":"7f96bb07_b9d50f1e","line":991,"range":{"start_line":991,"start_character":15,"end_line":991,"end_character":49},"updated":"2018-01-18 14:00:12.000000000","message":"so here, I was expecting to see us return just the slice of the provider tree that has a single root node (matching the asked-for rp_uuid). No other roots (like sharing providers or other compute node providers). That would eliminate the need to have the update_provider_tree() virt driver API method accept only the provider_tree parameter and not the nodename parameter.","commit_id":"dab362d6f7a7a7cc9551ec6569470af585b06d99"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1a11723b2b119519f3def592110c501829f4890b","unresolved":false,"context_lines":[{"line_number":988,"context_line":"        for uuid in self._provider_tree.get_provider_uuids():"},{"line_number":989,"context_line":"            self._refresh_and_get_inventory(uuid)"},{"line_number":990,"context_line":"        # Return a *copy* of the tree."},{"line_number":991,"context_line":"        return copy.deepcopy(self._provider_tree)"},{"line_number":992,"context_line":""},{"line_number":993,"context_line":"    def set_inventory_for_provider(self, rp_uuid, rp_name, inv_data,"},{"line_number":994,"context_line":"                                   parent_provider_uuid\u003dNone):"}],"source_content_type":"text/x-python","patch_set":26,"id":"7f96bb07_a401626c","line":991,"range":{"start_line":991,"start_character":15,"end_line":991,"end_character":49},"in_reply_to":"7f96bb07_b9d50f1e","updated":"2018-01-18 14:21:59.000000000","message":"never mind... after seeing the update_from_provider_tree() implementation, I actually think we should just return a deep-copy of the _provider_tree object here, as you are doing.","commit_id":"dab362d6f7a7a7cc9551ec6569470af585b06d99"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5dfb030ec376a8e748eec17c7f2e80f7d5b8af03","unresolved":false,"context_lines":[{"line_number":969,"context_line":"        LOG.error(msg, msg_args)"},{"line_number":970,"context_line":""},{"line_number":971,"context_line":"    def get_provider_tree_and_ensure_root(self, rp_uuid, name\u003dNone,"},{"line_number":972,"context_line":"                                          parent_provider_uuid\u003dNone):"},{"line_number":973,"context_line":"        \"\"\"Returns a fresh ProviderTree representing all providers which are in"},{"line_number":974,"context_line":"        the same tree or in the same aggregate as the specified provider,"},{"line_number":975,"context_line":"        including their aggregates, traits, and inventories."}],"source_content_type":"text/x-python","patch_set":29,"id":"5f93b717_54e32934","line":972,"range":{"start_line":972,"start_character":42,"end_line":972,"end_character":67},"updated":"2018-01-25 20:37:27.000000000","message":"We don\u0027t need this yet.  Not sure we ever will.  Consider removing it.","commit_id":"2276b7e005d62d9cb232ecbf0b14ca534fd6247a"}],"nova/tests/functional/api/openstack/placement/test_report_client.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6cca6ef0fd39248d9a16c1fce0938997c1cb6a3e","unresolved":false,"context_lines":[{"line_number":294,"context_line":"                },"},{"line_number":295,"context_line":"            })"},{"line_number":296,"context_line":"            # Mark as a sharing provider"},{"line_number":297,"context_line":"            self.client.put(\u0027/resource_providers/%s/traits\u0027 % uuids.sip,"},{"line_number":298,"context_line":"                            [\u0027MISC_SHARES_VIA_AGGREGATE\u0027], version\u003d\u00271.6\u0027)"},{"line_number":299,"context_line":"            # It\u0027s associated with the same aggregate as both PFs"},{"line_number":300,"context_line":"            self.client.put(\u0027/resource_providers/%s/aggregates\u0027 % uuids.sip,"},{"line_number":301,"context_line":"                            [uuids.agg_ip], version\u003d\u00271.1\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"df87a7cf_b08b141d","line":298,"range":{"start_line":297,"start_character":12,"end_line":298,"end_character":73},"updated":"2017-12-08 21:08:02.000000000","message":"Turns out traits PUTs (not just this one) are failing 400.  But we\u0027re not checking error here.\n\nNeed to put in report client methods for this (and the agg one below) that raise on non-2xx.","commit_id":"8408ffa9bad4ca357f1d2246786ad92c62683772"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6cca6ef0fd39248d9a16c1fce0938997c1cb6a3e","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            # Narrow the field to just our compute subtree."},{"line_number":330,"context_line":"            self.assertEqual(set([self.compute_uuid, uuids.pf1, uuids.pf2]),"},{"line_number":331,"context_line":"                             prov_tree.get_provider_uuids(self.compute_uuid))"},{"line_number":332,"context_line":"            # TODO(efried): Check aggs \u0026 traits"}],"source_content_type":"text/x-python","patch_set":10,"id":"df87a7cf_d090184d","line":332,"range":{"start_line":332,"start_character":41,"end_line":332,"end_character":47},"updated":"2017-12-08 21:08:02.000000000","message":"What\u0027s needed here is stuff like:\n\n            # Ensure inventory made it into the ProviderTree\n            self.assertFalse(prov_tree.has_inventory_changed(\n                uuids.sbw, sbw_inv))\n            # Ensure traits made it into the ProviderTree\n            self.assertFalse(prov_tree.have_traits_changed(\n                uuids.ss1, [\u0027MISC_SHARES_VIA_AGGREGATE\u0027]))\n            # Ensure aggregates made it into the ProviderTree\n            self.assertFalse(prov_tree.have_aggregates_changed(\n                self.compute_uuid, [uuids.agg_disk_1, uuids.agg_disk_2]))\n\nCurrently, checking traits on ss1 is failing (contains []).  This *may* be because of the 400 noted above, but may also be because of lack of adequate refreshing.  See snippet in report.py for potential improvement there.","commit_id":"8408ffa9bad4ca357f1d2246786ad92c62683772"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"88ac7086e6aa638b524df3ec502c8fec6187af87","unresolved":false,"context_lines":[{"line_number":246,"context_line":"               /              \\"},{"line_number":247,"context_line":"        pf1(VF,BW)        pf2(VF,BW)           sbw(BW)"},{"line_number":248,"context_line":"          agg_ip \\       / agg_ip                 | agg_bw"},{"line_number":249,"context_line":"                  sip(IP)                         x"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        \"\"\""},{"line_number":252,"context_line":"        with self._interceptor():"}],"source_content_type":"text/x-python","patch_set":29,"id":"7f96bb07_cbf468d2","line":249,"updated":"2018-01-22 15:48:43.000000000","message":"such pretty ascii.","commit_id":"2276b7e005d62d9cb232ecbf0b14ca534fd6247a"}],"nova/tests/unit/scheduler/client/test_report.py":[{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"5ba70a170ff9f9f15f7d07b9aaa2ae429ce4e231","unresolved":false,"context_lines":[{"line_number":1476,"context_line":"            expected_url, raise_exc\u003dFalse, microversion\u003d\u00271.13\u0027)"},{"line_number":1477,"context_line":"        self.assertEqual(expected_provider_list, result)"},{"line_number":1478,"context_line":""},{"line_number":1479,"context_line":"    @mock.patch.object(report.LOG, \u0027error\u0027)"},{"line_number":1480,"context_line":"    def test_get_providers_in_tree_error(self, logging_mock):"},{"line_number":1481,"context_line":"        # Ensure _get_providers_in_tree() logs an error the placement API"},{"line_number":1482,"context_line":"        # call doesn\u0027t respond 200"},{"line_number":1483,"context_line":"        resp_mock \u003d mock.Mock(status_code\u003d503)"},{"line_number":1484,"context_line":"        self.ks_adap_mock.get.return_value \u003d resp_mock"},{"line_number":1485,"context_line":"        self.ks_adap_mock.get.return_value.headers \u003d {"},{"line_number":1486,"context_line":"            \u0027openstack-request-id\u0027: uuids.request_id}"},{"line_number":1487,"context_line":""},{"line_number":1488,"context_line":"        uuid \u003d uuids.compute_node"},{"line_number":1489,"context_line":"        result \u003d self.client._get_providers_in_tree(uuid)"},{"line_number":1490,"context_line":""},{"line_number":1491,"context_line":"        expected_url \u003d \u0027/resource_providers?tree\u003d\u0027 + uuid"},{"line_number":1492,"context_line":"        self.ks_adap_mock.get.assert_called_once_with("},{"line_number":1493,"context_line":"            expected_url, raise_exc\u003dFalse, microversion\u003d\u00271.13\u0027)"},{"line_number":1494,"context_line":"        # A 503 Service Unavailable should trigger an error log that"},{"line_number":1495,"context_line":"        # includes the placement request id and return None"},{"line_number":1496,"context_line":"        # from _get_providers_in_tree()"},{"line_number":1497,"context_line":"        self.assertTrue(logging_mock.called)"},{"line_number":1498,"context_line":"        self.assertIsNone(result)"},{"line_number":1499,"context_line":"        self.assertEqual(uuids.request_id,"},{"line_number":1500,"context_line":"                         logging_mock.call_args[0][1][\u0027placement_req_id\u0027])"},{"line_number":1501,"context_line":""},{"line_number":1502,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":1503,"context_line":"                \u0027_get_resource_provider\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_a47c0d72","line":1500,"range":{"start_line":1479,"start_character":0,"end_line":1500,"end_character":74},"updated":"2017-11-29 07:46:33.000000000","message":"Here","commit_id":"0ae3b4eb585121e63e0cda623acab17b5ca949f6"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"5ba70a170ff9f9f15f7d07b9aaa2ae429ce4e231","unresolved":false,"context_lines":[{"line_number":2784,"context_line":"                \u0027_get_provider_aggregates\u0027)"},{"line_number":2785,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":2786,"context_line":"                \u0027_get_providers_in_aggregates\u0027)"},{"line_number":2787,"context_line":"    def test_get_provider_tree_errors(self, mock_gpia, mock_gpa,"},{"line_number":2788,"context_line":"                                      mock_gpit):"},{"line_number":2789,"context_line":"        \"\"\"Test error paths in get_provider_tree."},{"line_number":2790,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_e4d4554a","line":2787,"range":{"start_line":2787,"start_character":8,"end_line":2787,"end_character":37},"updated":"2017-11-29 07:46:33.000000000","message":"Why is this test added in \u0027TestInventory\u0027 class?\nAnd there is a similar test in line 1479-1500.","commit_id":"0ae3b4eb585121e63e0cda623acab17b5ca949f6"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"4b63aee587a3b47fd88659add559d312dea557c2","unresolved":false,"context_lines":[{"line_number":2784,"context_line":"                \u0027_get_provider_aggregates\u0027)"},{"line_number":2785,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":2786,"context_line":"                \u0027_get_providers_in_aggregates\u0027)"},{"line_number":2787,"context_line":"    def test_get_provider_tree_errors(self, mock_gpia, mock_gpa,"},{"line_number":2788,"context_line":"                                      mock_gpit):"},{"line_number":2789,"context_line":"        \"\"\"Test error paths in get_provider_tree."},{"line_number":2790,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_770e263c","line":2787,"range":{"start_line":2787,"start_character":8,"end_line":2787,"end_character":37},"in_reply_to":"ff82abbf_e4d4554a","updated":"2017-12-06 16:49:13.000000000","message":"\u003e Why is this test added in \u0027TestInventory\u0027 class?\n\nYou\u0027re right; I\u0027ll move it up to TestProviderOperations.\n\n \u003e And there is a similar test in line 1479-1500.\n\nThey\u0027re different tests, validating different methods: get_provider_tree vs. _get_providers_in_tree.","commit_id":"0ae3b4eb585121e63e0cda623acab17b5ca949f6"}]}
