)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9771c0aea3d1639df54fd1c9c98c553dc3056e0a","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add resources dict into _Provider, which is similar to inventory,"},{"line_number":10,"context_line":"and _Provider.resources will contain some resource details but not"},{"line_number":11,"context_line":"resource amount in inventory, which will be Resource objest list"},{"line_number":12,"context_line":"keyed by resource class. We can populate this when update provider"},{"line_number":13,"context_line":"tree."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"7faddb67_042204a4","line":11,"range":{"start_line":11,"start_character":53,"end_line":11,"end_character":64},"updated":"2019-08-30 15:25:36.000000000","message":"object set","commit_id":"f964bdaf0d63c039816450a8f6dd51308d001cbf"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9771c0aea3d1639df54fd1c9c98c553dc3056e0a","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Add resources dict into _Provider, which is similar to inventory,"},{"line_number":10,"context_line":"and _Provider.resources will contain some resource details but not"},{"line_number":11,"context_line":"resource amount in inventory, which will be Resource objest list"},{"line_number":12,"context_line":"keyed by resource class. We can populate this when update provider"},{"line_number":13,"context_line":"tree."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: If37aaff1e3652692fd0750e98612f3b040019042"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"7faddb67_a43a10ca","line":12,"range":{"start_line":12,"start_character":46,"end_line":12,"end_character":50},"updated":"2019-08-30 15:25:36.000000000","message":"from","commit_id":"f964bdaf0d63c039816450a8f6dd51308d001cbf"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"053dec7f79f679eba98fabacc8eceb817f7c3cac","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add resources dict into _Provider, which is similar to inventory,"},{"line_number":10,"context_line":"and _Provider.resources will contain some resource details but not"},{"line_number":11,"context_line":"resource amount in inventory, which will be Resource objest set"},{"line_number":12,"context_line":"keyed by resource class. We can populate this from update provider"},{"line_number":13,"context_line":"tree."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"7faddb67_42ce8883","line":11,"range":{"start_line":11,"start_character":53,"end_line":11,"end_character":59},"updated":"2019-09-03 15:58:00.000000000","message":"object","commit_id":"25e26fa108f6c7ce5a29eb30ff49872c3be8f0c4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"57a4bf97d583e10f2a3eb7271b77761255fdc9b8","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add resources dict into _Provider, which is similar to inventory,"},{"line_number":10,"context_line":"and _Provider.resources will contain some resource details but not"},{"line_number":11,"context_line":"resource amount in inventory, which will be Resource objest set"},{"line_number":12,"context_line":"keyed by resource class. We can populate this from update provider"},{"line_number":13,"context_line":"tree."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"7faddb67_96949837","line":11,"range":{"start_line":11,"start_character":53,"end_line":11,"end_character":59},"updated":"2019-09-05 13:35:18.000000000","message":"object","commit_id":"f440312ff2f9f464491f1963595501e01a0a4028"}],"nova/compute/provider_tree.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e135c251c8c06e48930c3ec2feb2bd05ac57351d","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        self.traits \u003d set()"},{"line_number":66,"context_line":"        # Set of aggregate UUIDs"},{"line_number":67,"context_line":"        self.aggregates \u003d set()"},{"line_number":68,"context_line":"        # dict of resource records, keyed by resource class"},{"line_number":69,"context_line":"        self.resources \u003d {}"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_8947401f","line":68,"range":{"start_line":68,"start_character":36,"end_line":68,"end_character":59},"updated":"2019-08-26 19:02:01.000000000","message":"Can you explain this a bit further? Presumably there can be multiple resources with the same resource class (and RP, since we\u0027re already in the context of a RP here). So are the dict values lists/sets of Resource OVOs?\n\n(Out of curiosity, why a dict rather than just a list/set? Perhaps this will become clear later in the series when I see how this is being used.)","commit_id":"26aac258943a30a84b10e1968f3beb59686d829f"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"cacd8bc08e64922bd20c6879af673a9cf44a176f","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        self.traits \u003d set()"},{"line_number":66,"context_line":"        # Set of aggregate UUIDs"},{"line_number":67,"context_line":"        self.aggregates \u003d set()"},{"line_number":68,"context_line":"        # dict of resource records, keyed by resource class"},{"line_number":69,"context_line":"        self.resources \u003d {}"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_021482e8","line":68,"range":{"start_line":68,"start_character":36,"end_line":68,"end_character":59},"in_reply_to":"7faddb67_8947401f","updated":"2019-08-27 04:28:47.000000000","message":"Yes, the dict values are lists of Resource OVOs.\n\nWe will claim resources based on allocations(from placement) , which have resource class and resource amount, using resource class as key here can help find the resource OVOs quickly.","commit_id":"26aac258943a30a84b10e1968f3beb59686d829f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e135c251c8c06e48930c3ec2feb2bd05ac57351d","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        \"\"\""},{"line_number":230,"context_line":"        return not bool(set(aggregates) - self.aggregates)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def update_resources(self, resources):"},{"line_number":233,"context_line":"        self.resources \u003d copy.deepcopy(resources)"},{"line_number":234,"context_line":"        return True"},{"line_number":235,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_09b910eb","line":232,"range":{"start_line":232,"start_character":31,"end_line":232,"end_character":40},"updated":"2019-08-26 19:02:01.000000000","message":"I get that there are advantages to using whole Resource objects in here. But there are disadvantages as well.\n\nFor example, the RP UUID is redundant, since we\u0027re already underneath a RP here. Which would be fine, but... are you going to validate that the RP UUID is correct? I imagine it would be somewhat disastrous if it wasn\u0027t.","commit_id":"26aac258943a30a84b10e1968f3beb59686d829f"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"cacd8bc08e64922bd20c6879af673a9cf44a176f","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        \"\"\""},{"line_number":230,"context_line":"        return not bool(set(aggregates) - self.aggregates)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def update_resources(self, resources):"},{"line_number":233,"context_line":"        self.resources \u003d copy.deepcopy(resources)"},{"line_number":234,"context_line":"        return True"},{"line_number":235,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_02a5629f","line":232,"range":{"start_line":232,"start_character":31,"end_line":232,"end_character":40},"in_reply_to":"7faddb67_09b910eb","updated":"2019-08-27 04:28:47.000000000","message":"We don\u0027t need to validate the RP UUID, because the Resource.rp_uuid is the UUID of RP that the resource is underneath. We populate the Resource.rp_uuid when update provider tree. \nrefer to: https://review.opendev.org/#/c/678454/3/nova/virt/libvirt/driver.py@6911","commit_id":"26aac258943a30a84b10e1968f3beb59686d829f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e135c251c8c06e48930c3ec2feb2bd05ac57351d","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        return not bool(set(aggregates) - self.aggregates)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def update_resources(self, resources):"},{"line_number":233,"context_line":"        self.resources \u003d copy.deepcopy(resources)"},{"line_number":234,"context_line":"        return True"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"class ProviderTree(object):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_ae0c8239","line":234,"range":{"start_line":233,"start_character":8,"end_line":234,"end_character":19},"updated":"2019-08-26 19:02:01.000000000","message":"Following the pattern of the other fields, I think we probably want a have_resources_changed method, and we want to check it here and return False if resources haven\u0027t changed.\n\nBecause:\n\nWe use the equivalents, e.g. has_inventory_changed, to decide whether to flush data back to placement, saving an API call if it\u0027s not necessary. Similarly - and especially since we don\u0027t expect the resource information to change very often - we should avoid flushing back to the database in the general case.\n\nOf course, this also means we\u0027re going to need to be able to compare Resource[List] objects reliably.","commit_id":"26aac258943a30a84b10e1968f3beb59686d829f"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"40769e9a4b5cee6eb663b35a7fe3750e24de2963","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        return not bool(set(aggregates) - self.aggregates)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def update_resources(self, resources):"},{"line_number":233,"context_line":"        self.resources \u003d copy.deepcopy(resources)"},{"line_number":234,"context_line":"        return True"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"class ProviderTree(object):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_e0f33408","line":234,"range":{"start_line":233,"start_character":8,"end_line":234,"end_character":19},"in_reply_to":"7faddb67_6338d8ed","updated":"2019-08-29 03:18:17.000000000","message":"@Eric, luyao pinged me to look at this. Currently, we don\u0027t persistent this into the DB. In the future, if we want to have a host side assignment info persisted, then you are right, we definitely need this method. So we skip implementing this method now.","commit_id":"26aac258943a30a84b10e1968f3beb59686d829f"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"45432528c0dace53344b8f5cb81c5f281c2bbd38","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        return not bool(set(aggregates) - self.aggregates)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def update_resources(self, resources):"},{"line_number":233,"context_line":"        self.resources \u003d copy.deepcopy(resources)"},{"line_number":234,"context_line":"        return True"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"class ProviderTree(object):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_cab72385","line":234,"range":{"start_line":233,"start_character":8,"end_line":234,"end_character":19},"in_reply_to":"7faddb67_76f2a39d","updated":"2019-08-30 09:32:03.000000000","message":"Yes, you\u0027re right.","commit_id":"26aac258943a30a84b10e1968f3beb59686d829f"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"a61e749e4655b921a40c1f41adf257573213ec44","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        return not bool(set(aggregates) - self.aggregates)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def update_resources(self, resources):"},{"line_number":233,"context_line":"        self.resources \u003d copy.deepcopy(resources)"},{"line_number":234,"context_line":"        return True"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"class ProviderTree(object):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_6338d8ed","line":234,"range":{"start_line":233,"start_character":8,"end_line":234,"end_character":19},"in_reply_to":"7faddb67_ae0c8239","updated":"2019-08-27 09:48:00.000000000","message":"Done","commit_id":"26aac258943a30a84b10e1968f3beb59686d829f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5a0c79816b40c70e41386c4b42ff3416645ea0ec","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        return not bool(set(aggregates) - self.aggregates)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def update_resources(self, resources):"},{"line_number":233,"context_line":"        self.resources \u003d copy.deepcopy(resources)"},{"line_number":234,"context_line":"        return True"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"class ProviderTree(object):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_76f2a39d","line":234,"range":{"start_line":233,"start_character":8,"end_line":234,"end_character":19},"in_reply_to":"7faddb67_e0f33408","updated":"2019-08-29 17:29:12.000000000","message":"Well, it\u0027s already implemented in PS4, and it follows the pattern of the other pieces, so we might as well keep it.\n\nNot persisting to the database? I guess I got confused with the resources field of Instance and MigrationContext - those are persisted, right?","commit_id":"26aac258943a30a84b10e1968f3beb59686d829f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e135c251c8c06e48930c3ec2feb2bd05ac57351d","unresolved":false,"context_lines":[{"line_number":703,"context_line":"            final_aggs \u003d provider.aggregates - set(aggregates)"},{"line_number":704,"context_line":"            provider.update_aggregates(final_aggs)"},{"line_number":705,"context_line":""},{"line_number":706,"context_line":"    def update_resources(self, name_or_uuid, resources):"},{"line_number":707,"context_line":"        with self.lock:"},{"line_number":708,"context_line":"            provider \u003d self._find_with_lock(name_or_uuid)"},{"line_number":709,"context_line":"            return provider.update_resources(resources)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_a9447c1a","line":706,"range":{"start_line":706,"start_character":8,"end_line":706,"end_character":24},"updated":"2019-08-26 19:02:01.000000000","message":"Please docstring (at least) this method. The one in _Provider would be nice, but not strictly necessary.","commit_id":"26aac258943a30a84b10e1968f3beb59686d829f"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"a61e749e4655b921a40c1f41adf257573213ec44","unresolved":false,"context_lines":[{"line_number":703,"context_line":"            final_aggs \u003d provider.aggregates - set(aggregates)"},{"line_number":704,"context_line":"            provider.update_aggregates(final_aggs)"},{"line_number":705,"context_line":""},{"line_number":706,"context_line":"    def update_resources(self, name_or_uuid, resources):"},{"line_number":707,"context_line":"        with self.lock:"},{"line_number":708,"context_line":"            provider \u003d self._find_with_lock(name_or_uuid)"},{"line_number":709,"context_line":"            return provider.update_resources(resources)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_2322e0bb","line":706,"range":{"start_line":706,"start_character":8,"end_line":706,"end_character":24},"in_reply_to":"7faddb67_a9447c1a","updated":"2019-08-27 09:48:00.000000000","message":"Done","commit_id":"26aac258943a30a84b10e1968f3beb59686d829f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ba34048ae28e4866df745aece13c85e602be2f37","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        # Set of aggregate UUIDs"},{"line_number":67,"context_line":"        self.aggregates \u003d set()"},{"line_number":68,"context_line":"        # dict of resource records, keyed by resource class"},{"line_number":69,"context_line":"        # the value is the list of objects.Resource"},{"line_number":70,"context_line":"        self.resources \u003d {}"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_88486cb3","line":69,"range":{"start_line":69,"start_character":27,"end_line":69,"end_character":51},"updated":"2019-08-28 22:55:17.000000000","message":"okay, so why not ResourceList rather than [Resource, ...]?","commit_id":"e8e3954221a3e0e2b0ec854bccbf0a15083cef96"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5a0c79816b40c70e41386c4b42ff3416645ea0ec","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        # Set of aggregate UUIDs"},{"line_number":67,"context_line":"        self.aggregates \u003d set()"},{"line_number":68,"context_line":"        # dict of resource records, keyed by resource class"},{"line_number":69,"context_line":"        # the value is the list of objects.Resource"},{"line_number":70,"context_line":"        self.resources \u003d {}"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_96807fc1","line":69,"range":{"start_line":69,"start_character":27,"end_line":69,"end_character":51},"in_reply_to":"7faddb67_0088d01f","updated":"2019-08-29 17:29:12.000000000","message":"I\u0027m okay using [Resource, ...] rather than ResourceList.\n\nThough IMO it would still be beneficial to make it a set rather than a list.","commit_id":"e8e3954221a3e0e2b0ec854bccbf0a15083cef96"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"7a522c2698fa9db022a031c0fd9561effd007a73","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        # Set of aggregate UUIDs"},{"line_number":67,"context_line":"        self.aggregates \u003d set()"},{"line_number":68,"context_line":"        # dict of resource records, keyed by resource class"},{"line_number":69,"context_line":"        # the value is the list of objects.Resource"},{"line_number":70,"context_line":"        self.resources \u003d {}"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_0088d01f","line":69,"range":{"start_line":69,"start_character":27,"end_line":69,"end_character":51},"in_reply_to":"7faddb67_60df4466","updated":"2019-08-29 03:51:29.000000000","message":"I\u0027m afraid this can not help me a lot, still need to do the traversal to find the free devices.","commit_id":"e8e3954221a3e0e2b0ec854bccbf0a15083cef96"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"40769e9a4b5cee6eb663b35a7fe3750e24de2963","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        # Set of aggregate UUIDs"},{"line_number":67,"context_line":"        self.aggregates \u003d set()"},{"line_number":68,"context_line":"        # dict of resource records, keyed by resource class"},{"line_number":69,"context_line":"        # the value is the list of objects.Resource"},{"line_number":70,"context_line":"        self.resources \u003d {}"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_60df4466","line":69,"range":{"start_line":69,"start_character":27,"end_line":69,"end_character":51},"in_reply_to":"7faddb67_7ea4ca4b","updated":"2019-08-29 03:18:17.000000000","message":"How about {rc_class: {identify: resource_obj}}? I remember you need to query the free devices by compare the identify.","commit_id":"e8e3954221a3e0e2b0ec854bccbf0a15083cef96"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"0c27b462b759d5a9089327ad7616cb79a45592d9","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        # Set of aggregate UUIDs"},{"line_number":67,"context_line":"        self.aggregates \u003d set()"},{"line_number":68,"context_line":"        # dict of resource records, keyed by resource class"},{"line_number":69,"context_line":"        # the value is the list of objects.Resource"},{"line_number":70,"context_line":"        self.resources \u003d {}"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_7ea4ca4b","line":69,"range":{"start_line":69,"start_character":27,"end_line":69,"end_character":51},"in_reply_to":"7faddb67_88486cb3","updated":"2019-08-29 02:53:02.000000000","message":"IMO, ResourceList is more like to be impartible, I\u0027d like to use this in instance.resources and migration_context.new_resources/old_resources.\nBesides, I prefer a normal list, then I can use the \u0027append\u0027 method of list, ObjectListBase does not support this, I\u0027m afraid it does not support something else that normal list do.","commit_id":"e8e3954221a3e0e2b0ec854bccbf0a15083cef96"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"45432528c0dace53344b8f5cb81c5f281c2bbd38","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        # Set of aggregate UUIDs"},{"line_number":67,"context_line":"        self.aggregates \u003d set()"},{"line_number":68,"context_line":"        # dict of resource records, keyed by resource class"},{"line_number":69,"context_line":"        # the value is the list of objects.Resource"},{"line_number":70,"context_line":"        self.resources \u003d {}"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_40eb0fdc","line":69,"range":{"start_line":69,"start_character":27,"end_line":69,"end_character":51},"in_reply_to":"7faddb67_96807fc1","updated":"2019-08-30 09:32:03.000000000","message":"I use normal set now.","commit_id":"e8e3954221a3e0e2b0ec854bccbf0a15083cef96"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ba34048ae28e4866df745aece13c85e602be2f37","unresolved":false,"context_lines":[{"line_number":241,"context_line":"            new_len \u003d len(new_resources)"},{"line_number":242,"context_line":"            if cur_len !\u003d new_len:"},{"line_number":243,"context_line":"                return True"},{"line_number":244,"context_line":"            for i in range(cur_len):"},{"line_number":245,"context_line":"                if not cur_resources[i] \u003d\u003d new_resources[i]:"},{"line_number":246,"context_line":"                    return True"},{"line_number":247,"context_line":"        return False"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def update_resources(self, resources):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_c84e64c1","line":246,"range":{"start_line":244,"start_character":12,"end_line":246,"end_character":31},"updated":"2019-08-28 22:55:17.000000000","message":"Yeah, see, I don\u0027t think we should rely on the order of the resources always being the same. This is why IMO it would be better to use sets.\n\n...which may mean you need to implement __hash__ on Resource, I\u0027m not sure.","commit_id":"e8e3954221a3e0e2b0ec854bccbf0a15083cef96"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"45432528c0dace53344b8f5cb81c5f281c2bbd38","unresolved":false,"context_lines":[{"line_number":241,"context_line":"            new_len \u003d len(new_resources)"},{"line_number":242,"context_line":"            if cur_len !\u003d new_len:"},{"line_number":243,"context_line":"                return True"},{"line_number":244,"context_line":"            for i in range(cur_len):"},{"line_number":245,"context_line":"                if not cur_resources[i] \u003d\u003d new_resources[i]:"},{"line_number":246,"context_line":"                    return True"},{"line_number":247,"context_line":"        return False"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def update_resources(self, resources):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_80cee780","line":246,"range":{"start_line":244,"start_character":12,"end_line":246,"end_character":31},"in_reply_to":"7faddb67_b6001b68","updated":"2019-08-30 09:32:03.000000000","message":"get it and agree, normal set is used.","commit_id":"e8e3954221a3e0e2b0ec854bccbf0a15083cef96"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"0c27b462b759d5a9089327ad7616cb79a45592d9","unresolved":false,"context_lines":[{"line_number":241,"context_line":"            new_len \u003d len(new_resources)"},{"line_number":242,"context_line":"            if cur_len !\u003d new_len:"},{"line_number":243,"context_line":"                return True"},{"line_number":244,"context_line":"            for i in range(cur_len):"},{"line_number":245,"context_line":"                if not cur_resources[i] \u003d\u003d new_resources[i]:"},{"line_number":246,"context_line":"                    return True"},{"line_number":247,"context_line":"        return False"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def update_resources(self, resources):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_de113e5f","line":246,"range":{"start_line":244,"start_character":12,"end_line":246,"end_character":31},"in_reply_to":"7faddb67_c84e64c1","updated":"2019-08-29 02:53:02.000000000","message":"As far as I know, virt driver reports resources according to configurations(e.g vpmem in libvirt) and resources discovery by driver itself(e.g vgpu in libvirt), I think this order will not change if we don\u0027t modify the configuration file or configuring host to add/remove resources.","commit_id":"e8e3954221a3e0e2b0ec854bccbf0a15083cef96"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5a0c79816b40c70e41386c4b42ff3416645ea0ec","unresolved":false,"context_lines":[{"line_number":241,"context_line":"            new_len \u003d len(new_resources)"},{"line_number":242,"context_line":"            if cur_len !\u003d new_len:"},{"line_number":243,"context_line":"                return True"},{"line_number":244,"context_line":"            for i in range(cur_len):"},{"line_number":245,"context_line":"                if not cur_resources[i] \u003d\u003d new_resources[i]:"},{"line_number":246,"context_line":"                    return True"},{"line_number":247,"context_line":"        return False"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def update_resources(self, resources):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_b6001b68","line":246,"range":{"start_line":244,"start_character":12,"end_line":246,"end_character":31},"in_reply_to":"7faddb67_de113e5f","updated":"2019-08-29 17:29:12.000000000","message":"\u003e As far as I know, virt driver reports resources according to\n \u003e configurations(e.g vpmem in libvirt) and resources discovery by\n \u003e driver itself(e.g vgpu in libvirt), I think this order will not\n \u003e change if we don\u0027t modify the configuration file or configuring\n \u003e host to add/remove resources.\n\nI don\u0027t think it\u0027s safe to make this statement in general, for all virt drivers, for all resource types, existing and future. And it\u0027s going to be much harder to change it later if we decide that\u0027s necessary.","commit_id":"e8e3954221a3e0e2b0ec854bccbf0a15083cef96"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9771c0aea3d1639df54fd1c9c98c553dc3056e0a","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        if set(cur.keys()) !\u003d set(new.keys()):"},{"line_number":237,"context_line":"            return True"},{"line_number":238,"context_line":"        for rc, cur_resources in cur.items():"},{"line_number":239,"context_line":"            new_resources \u003d new[rc]"},{"line_number":240,"context_line":"            cur_len \u003d len(cur_resources)"},{"line_number":241,"context_line":"            new_len \u003d len(new_resources)"},{"line_number":242,"context_line":"            if cur_len !\u003d new_len:"},{"line_number":243,"context_line":"                return True"},{"line_number":244,"context_line":"            for cur_resource in cur_resources:"},{"line_number":245,"context_line":"                if cur_resource not in new_resources:"},{"line_number":246,"context_line":"                    return True"},{"line_number":247,"context_line":"        return False"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def update_resources(self, resources):"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_2475c098","line":246,"range":{"start_line":239,"start_character":0,"end_line":246,"end_character":31},"updated":"2019-08-30 15:25:36.000000000","message":"This is all overkill now.\n\n if cur_resources !\u003d new[rc]:\n     return True","commit_id":"f964bdaf0d63c039816450a8f6dd51308d001cbf"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0040e90f65cb956d8bcc2d56f3d8b6a2b9562968","unresolved":false,"context_lines":[{"line_number":233,"context_line":"    def have_resources_changed(self, new):"},{"line_number":234,"context_line":"        \"\"\"Returns whether the resources have changed for the provider.\"\"\""},{"line_number":235,"context_line":"        cur \u003d self.resources"},{"line_number":236,"context_line":"        if set(cur.keys()) !\u003d set(new.keys()):"},{"line_number":237,"context_line":"            return True"},{"line_number":238,"context_line":"        for rc, cur_resources in cur.items():"},{"line_number":239,"context_line":"            if cur_resources !\u003d new[rc]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_625b8453","line":236,"range":{"start_line":236,"start_character":11,"end_line":236,"end_character":46},"updated":"2019-09-03 16:13:05.000000000","message":"Was going to suggest we don\u0027t need to do this since dict keys must be unique, but we do need to care about order.\n\nCould drop \u0027.keys()\u0027 though","commit_id":"25e26fa108f6c7ce5a29eb30ff49872c3be8f0c4"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"b2a98cbc4103f1888534bcee48ccc160ebc7cecd","unresolved":false,"context_lines":[{"line_number":233,"context_line":"    def have_resources_changed(self, new):"},{"line_number":234,"context_line":"        \"\"\"Returns whether the resources have changed for the provider.\"\"\""},{"line_number":235,"context_line":"        cur \u003d self.resources"},{"line_number":236,"context_line":"        if set(cur.keys()) !\u003d set(new.keys()):"},{"line_number":237,"context_line":"            return True"},{"line_number":238,"context_line":"        for rc, cur_resources in cur.items():"},{"line_number":239,"context_line":"            if cur_resources !\u003d new[rc]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_0783b404","line":236,"range":{"start_line":236,"start_character":11,"end_line":236,"end_character":46},"in_reply_to":"7faddb67_625b8453","updated":"2019-09-04 12:51:50.000000000","message":"I think we don\u0027t have to care about order, because these are all available resources, the order is useless.","commit_id":"25e26fa108f6c7ce5a29eb30ff49872c3be8f0c4"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0040e90f65cb956d8bcc2d56f3d8b6a2b9562968","unresolved":false,"context_lines":[{"line_number":235,"context_line":"        cur \u003d self.resources"},{"line_number":236,"context_line":"        if set(cur.keys()) !\u003d set(new.keys()):"},{"line_number":237,"context_line":"            return True"},{"line_number":238,"context_line":"        for rc, cur_resources in cur.items():"},{"line_number":239,"context_line":"            if cur_resources !\u003d new[rc]:"},{"line_number":240,"context_line":"                return True"},{"line_number":241,"context_line":"        return False"},{"line_number":242,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_e23454fd","line":239,"range":{"start_line":238,"start_character":0,"end_line":239,"end_character":40},"updated":"2019-09-03 16:13:05.000000000","message":"nit:\n\n  for rc in cur.items():\n      if cur[rc] !\u003d new[rc]:\n          return True\n\n   return False\n\nreads a little nicer","commit_id":"25e26fa108f6c7ce5a29eb30ff49872c3be8f0c4"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"01b5cf65d403e86914a7c8a5f36225de982a2f27","unresolved":false,"context_lines":[{"line_number":235,"context_line":"        cur \u003d self.resources"},{"line_number":236,"context_line":"        if set(cur.keys()) !\u003d set(new.keys()):"},{"line_number":237,"context_line":"            return True"},{"line_number":238,"context_line":"        for rc, cur_resources in cur.items():"},{"line_number":239,"context_line":"            if cur_resources !\u003d new[rc]:"},{"line_number":240,"context_line":"                return True"},{"line_number":241,"context_line":"        return False"},{"line_number":242,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5faad753_87675d26","line":239,"range":{"start_line":238,"start_character":0,"end_line":239,"end_character":40},"in_reply_to":"7faddb67_e23454fd","updated":"2019-09-06 10:36:40.000000000","message":"because cur and new are both dict, and the value are set, so we can compare them directly.\n\nI\u0027m afraid this can\u0027t work well if we have more new than cur.","commit_id":"25e26fa108f6c7ce5a29eb30ff49872c3be8f0c4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e513f35bc0936760fa1553eadd97191ab4f3408f","unresolved":false,"context_lines":[{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def have_resources_changed(self, new):"},{"line_number":234,"context_line":"        \"\"\"Returns whether the resources have changed for the provider.\"\"\""},{"line_number":235,"context_line":"        if self.resources !\u003d new:"},{"line_number":236,"context_line":"            return True"},{"line_number":237,"context_line":"        return False"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def update_resources(self, resources):"},{"line_number":240,"context_line":"        \"\"\"Update the stored resources for the provider. The method returns"}],"source_content_type":"text/x-python","patch_set":18,"id":"5faad753_1f1e48ba","line":237,"range":{"start_line":235,"start_character":0,"end_line":237,"end_character":20},"updated":"2019-09-06 22:39:16.000000000","message":"well yeah, that makes way more sense :)\n\nYou could simplify even further and just\n\n return self.resources !\u003d new","commit_id":"e749290fe0fc71d9c46633b0c411941fead8180c"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"c84216afc5822ccc5ea0e49a0abf703f43840522","unresolved":false,"context_lines":[{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def have_resources_changed(self, new):"},{"line_number":234,"context_line":"        \"\"\"Returns whether the resources have changed for the provider.\"\"\""},{"line_number":235,"context_line":"        if self.resources !\u003d new:"},{"line_number":236,"context_line":"            return True"},{"line_number":237,"context_line":"        return False"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def update_resources(self, resources):"},{"line_number":240,"context_line":"        \"\"\"Update the stored resources for the provider. The method returns"}],"source_content_type":"text/x-python","patch_set":18,"id":"5faad753_5ee1159a","line":237,"range":{"start_line":235,"start_character":0,"end_line":237,"end_character":20},"in_reply_to":"5faad753_1f1e48ba","updated":"2019-09-09 05:45:38.000000000","message":"Done","commit_id":"e749290fe0fc71d9c46633b0c411941fead8180c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"488441bba86d7e5fbbf2d2d82cd76c27b707fa62","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        aggregates \u003d copy.copy(self.aggregates)"},{"line_number":89,"context_line":"        return ProviderData("},{"line_number":90,"context_line":"            self.uuid, self.name, self.generation, self.parent_uuid,"},{"line_number":91,"context_line":"            inventory, traits, aggregates, self.resources)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def get_provider_uuids(self):"},{"line_number":94,"context_line":"        \"\"\"Returns a list, in top-down traversal order, of UUIDs of this"}],"source_content_type":"text/x-python","patch_set":19,"id":"5faad753_60c76747","line":91,"range":{"start_line":91,"start_character":43,"end_line":91,"end_character":57},"updated":"2019-09-10 14:27:38.000000000","message":"why don\u0027t we need to copy this (or, more to the point, why do we have to copy the above)? dictionaries are mutable too so it seems like we should be treating them similarly?","commit_id":"4b918b1dbec489b145f369fb52fa369743b7c8eb"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"c3b11f16113d9d75b38462c912211dd75be77d6f","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        aggregates \u003d copy.copy(self.aggregates)"},{"line_number":89,"context_line":"        return ProviderData("},{"line_number":90,"context_line":"            self.uuid, self.name, self.generation, self.parent_uuid,"},{"line_number":91,"context_line":"            inventory, traits, aggregates, self.resources)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def get_provider_uuids(self):"},{"line_number":94,"context_line":"        \"\"\"Returns a list, in top-down traversal order, of UUIDs of this"}],"source_content_type":"text/x-python","patch_set":19,"id":"5faad753_b104c44b","line":91,"range":{"start_line":91,"start_character":43,"end_line":91,"end_character":57},"in_reply_to":"5faad753_60c76747","updated":"2019-09-11 08:05:39.000000000","message":"Done","commit_id":"4b918b1dbec489b145f369fb52fa369743b7c8eb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5fb4f02edc284c0b1c4a3310c8e15e7179b3feb9","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        aggregates \u003d copy.copy(self.aggregates)"},{"line_number":89,"context_line":"        return ProviderData("},{"line_number":90,"context_line":"            self.uuid, self.name, self.generation, self.parent_uuid,"},{"line_number":91,"context_line":"            inventory, traits, aggregates, self.resources)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def get_provider_uuids(self):"},{"line_number":94,"context_line":"        \"\"\"Returns a list, in top-down traversal order, of UUIDs of this"}],"source_content_type":"text/x-python","patch_set":19,"id":"5faad753_1bbb860e","line":91,"range":{"start_line":91,"start_character":43,"end_line":91,"end_character":57},"in_reply_to":"5faad753_60c76747","updated":"2019-09-10 14:44:11.000000000","message":"Mm, good call. The way we\u0027re using this it really doesn\u0027t need to be copied, but we should do it anyway.","commit_id":"4b918b1dbec489b145f369fb52fa369743b7c8eb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"67115cdba48f9dc7cc50a7d5d6390f7beea9f877","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.aggregates \u003d set()"},{"line_number":68,"context_line":"        # dict of resource records, keyed by resource class"},{"line_number":69,"context_line":"        # the value is the set of objects.Resource"},{"line_number":70,"context_line":"        self.resources \u003d collections.defaultdict(set)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"},{"line_number":73,"context_line":"    def from_dict(cls, pdict):"}],"source_content_type":"text/x-python","patch_set":21,"id":"5faad753_b73cb4c8","line":70,"range":{"start_line":70,"start_character":25,"end_line":70,"end_character":53},"updated":"2019-09-11 08:50:24.000000000","message":"There\u0027s no reason for this to be a defaultdict afaict. We only ever replace it wholesale via update_resources; and when we grab it via .data(), it\u0027s never modified.","commit_id":"90c9e8a432878bb03c5cc3382bc07633c306023e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2064a2994b382f3d2639bf07de3149942d662f94","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.aggregates \u003d set()"},{"line_number":68,"context_line":"        # dict of resource records, keyed by resource class"},{"line_number":69,"context_line":"        # the value is the set of objects.Resource"},{"line_number":70,"context_line":"        self.resources \u003d collections.defaultdict(set)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"},{"line_number":73,"context_line":"    def from_dict(cls, pdict):"}],"source_content_type":"text/x-python","patch_set":21,"id":"5faad753_bad01921","line":70,"range":{"start_line":70,"start_character":25,"end_line":70,"end_character":53},"in_reply_to":"5faad753_37b9a4cb","updated":"2019-09-11 09:34:09.000000000","message":"You can\u0027t reach that point with an unregistered rc because of the `continue` a couple lines up.","commit_id":"90c9e8a432878bb03c5cc3382bc07633c306023e"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"81a78ab6d9b062b4089b8caa9998b26be8faee8a","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.aggregates \u003d set()"},{"line_number":68,"context_line":"        # dict of resource records, keyed by resource class"},{"line_number":69,"context_line":"        # the value is the set of objects.Resource"},{"line_number":70,"context_line":"        self.resources \u003d collections.defaultdict(set)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"},{"line_number":73,"context_line":"    def from_dict(cls, pdict):"}],"source_content_type":"text/x-python","patch_set":21,"id":"5faad753_37b9a4cb","line":70,"range":{"start_line":70,"start_character":25,"end_line":70,"end_character":53},"in_reply_to":"5faad753_b73cb4c8","updated":"2019-09-11 09:04:57.000000000","message":"make it a defaultdict will easy to use\nhttps://review.opendev.org/#/c/678452/26/nova/compute/resource_tracker.py@419","commit_id":"90c9e8a432878bb03c5cc3382bc07633c306023e"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"4325db73c7054941a3c44a26f11433f9c9c9c6dc","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.aggregates \u003d set()"},{"line_number":68,"context_line":"        # dict of resource records, keyed by resource class"},{"line_number":69,"context_line":"        # the value is the set of objects.Resource"},{"line_number":70,"context_line":"        self.resources \u003d collections.defaultdict(set)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"},{"line_number":73,"context_line":"    def from_dict(cls, pdict):"}],"source_content_type":"text/x-python","patch_set":21,"id":"5faad753_85f4de87","line":70,"range":{"start_line":70,"start_character":25,"end_line":70,"end_character":53},"in_reply_to":"5faad753_bad01921","updated":"2019-09-11 10:35:08.000000000","message":"yes you\u0027re right","commit_id":"90c9e8a432878bb03c5cc3382bc07633c306023e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7c3b5ecb3c6a9ee2dfdf6a1482ff8ea2e390e9c7","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        inventory \u003d copy.deepcopy(self.inventory)"},{"line_number":87,"context_line":"        traits \u003d copy.copy(self.traits)"},{"line_number":88,"context_line":"        aggregates \u003d copy.copy(self.aggregates)"},{"line_number":89,"context_line":"        resources \u003d copy.copy(self.resources)"},{"line_number":90,"context_line":"        return ProviderData("},{"line_number":91,"context_line":"            self.uuid, self.name, self.generation, self.parent_uuid,"},{"line_number":92,"context_line":"            inventory, traits, aggregates, resources)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5faad753_348be21f","line":89,"range":{"start_line":89,"start_character":25,"end_line":89,"end_character":29},"updated":"2019-09-11 08:31:35.000000000","message":"This needs to be deepcopy, since self.resources is a dict.","commit_id":"90c9e8a432878bb03c5cc3382bc07633c306023e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"67115cdba48f9dc7cc50a7d5d6390f7beea9f877","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        inventory \u003d copy.deepcopy(self.inventory)"},{"line_number":87,"context_line":"        traits \u003d copy.copy(self.traits)"},{"line_number":88,"context_line":"        aggregates \u003d copy.copy(self.aggregates)"},{"line_number":89,"context_line":"        resources \u003d copy.copy(self.resources)"},{"line_number":90,"context_line":"        return ProviderData("},{"line_number":91,"context_line":"            self.uuid, self.name, self.generation, self.parent_uuid,"},{"line_number":92,"context_line":"            inventory, traits, aggregates, resources)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5faad753_b741143c","line":89,"range":{"start_line":89,"start_character":25,"end_line":89,"end_character":29},"in_reply_to":"5faad753_348be21f","updated":"2019-09-11 08:50:24.000000000","message":"...a dict of sets, that is. A dict of scalars copies properly with copy.copy.","commit_id":"90c9e8a432878bb03c5cc3382bc07633c306023e"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"81a78ab6d9b062b4089b8caa9998b26be8faee8a","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        inventory \u003d copy.deepcopy(self.inventory)"},{"line_number":87,"context_line":"        traits \u003d copy.copy(self.traits)"},{"line_number":88,"context_line":"        aggregates \u003d copy.copy(self.aggregates)"},{"line_number":89,"context_line":"        resources \u003d copy.copy(self.resources)"},{"line_number":90,"context_line":"        return ProviderData("},{"line_number":91,"context_line":"            self.uuid, self.name, self.generation, self.parent_uuid,"},{"line_number":92,"context_line":"            inventory, traits, aggregates, resources)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5faad753_37076485","line":89,"range":{"start_line":89,"start_character":25,"end_line":89,"end_character":29},"in_reply_to":"5faad753_348be21f","updated":"2019-09-11 09:04:57.000000000","message":"Done","commit_id":"90c9e8a432878bb03c5cc3382bc07633c306023e"}],"nova/tests/unit/compute/test_provider_tree.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"67115cdba48f9dc7cc50a7d5d6390f7beea9f877","unresolved":false,"context_lines":[{"line_number":711,"context_line":"        pt \u003d self._pt_with_cns()"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"        cn_resources \u003d {"},{"line_number":714,"context_line":"            \"CUSTOM_RESOURCE_0\": ["},{"line_number":715,"context_line":"                objects.Resource(provider_uuid\u003dcn.uuid,"},{"line_number":716,"context_line":"                                 resource_class\u003d\"CUSTOM_RESOURCE_0\","},{"line_number":717,"context_line":"                                 identifier\u003d\"bar\")],"}],"source_content_type":"text/x-python","patch_set":21,"id":"5faad753_f46d4a04","line":714,"range":{"start_line":714,"start_character":33,"end_line":714,"end_character":34},"updated":"2019-09-11 08:50:24.000000000","message":"these should be sets, not lists","commit_id":"90c9e8a432878bb03c5cc3382bc07633c306023e"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"81a78ab6d9b062b4089b8caa9998b26be8faee8a","unresolved":false,"context_lines":[{"line_number":711,"context_line":"        pt \u003d self._pt_with_cns()"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"        cn_resources \u003d {"},{"line_number":714,"context_line":"            \"CUSTOM_RESOURCE_0\": ["},{"line_number":715,"context_line":"                objects.Resource(provider_uuid\u003dcn.uuid,"},{"line_number":716,"context_line":"                                 resource_class\u003d\"CUSTOM_RESOURCE_0\","},{"line_number":717,"context_line":"                                 identifier\u003d\"bar\")],"}],"source_content_type":"text/x-python","patch_set":21,"id":"5faad753_f7354c47","line":714,"range":{"start_line":714,"start_character":33,"end_line":714,"end_character":34},"in_reply_to":"5faad753_f46d4a04","updated":"2019-09-11 09:04:57.000000000","message":"Done","commit_id":"90c9e8a432878bb03c5cc3382bc07633c306023e"}]}
