)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b9e2d79de5e5a13c89e29dac8f689396be77c4e5","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch converts the ResourceTracker compute_node property"},{"line_number":10,"context_line":"to be a ComputeNode object. A number of fields automatically"},{"line_number":11,"context_line":"take care of mapping their values to a db format, so some of the"},{"line_number":12,"context_line":"code creating json strings goes away with this change."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The scheduler client report code is simplified by the change"},{"line_number":15,"context_line":"to use a ComputeNode object."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"fa32b979_89402858","line":12,"updated":"2015-06-15 16:41:10.000000000","message":"\\o/","commit_id":"5b6f304238d617f91cae95e8cfa53271a774b209"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"0db20ab26cdcd67a5f0445c13672a36b30c2e36a","unresolved":false,"context_lines":[{"line_number":451,"context_line":"        # from deleted instances."},{"line_number":452,"context_line":"        if self.pci_tracker:"},{"line_number":453,"context_line":"            self.pci_tracker.clean_usage(instances, migrations, orphans)"},{"line_number":454,"context_line":"            obj \u003d self.pci_tracker.stats.to_device_pools_obj()"},{"line_number":455,"context_line":"            self.compute_node.pci_device_pools \u003d obj"},{"line_number":456,"context_line":"        else:"},{"line_number":457,"context_line":"            self.compute_node.pci_device_pools \u003d None"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_a6bf5aa9","line":454,"updated":"2015-03-12 14:59:19.000000000","message":"obj is just a very bad name for this variable here.","commit_id":"f97138894192ff917925e84bd371c19b211ed6aa"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"6a0e829b813351d6e4fbda787244f1145c25552a","unresolved":false,"context_lines":[{"line_number":451,"context_line":"        # from deleted instances."},{"line_number":452,"context_line":"        if self.pci_tracker:"},{"line_number":453,"context_line":"            self.pci_tracker.clean_usage(instances, migrations, orphans)"},{"line_number":454,"context_line":"            obj \u003d self.pci_tracker.stats.to_device_pools_obj()"},{"line_number":455,"context_line":"            self.compute_node.pci_device_pools \u003d obj"},{"line_number":456,"context_line":"        else:"},{"line_number":457,"context_line":"            self.compute_node.pci_device_pools \u003d None"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_a189c9cb","line":454,"in_reply_to":"9a80dd14_a6bf5aa9","updated":"2015-03-13 16:32:32.000000000","message":"Done","commit_id":"f97138894192ff917925e84bd371c19b211ed6aa"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"0db20ab26cdcd67a5f0445c13672a36b30c2e36a","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                  \u0027used_vcpus\u0027: ucpu,"},{"line_number":566,"context_line":"                  \u0027pci_stats\u0027: pci_stats})"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"    def _strip_changes(self, primitive):"},{"line_number":569,"context_line":"        \"\"\"Strip the changes element from an nova object primitive.\"\"\""},{"line_number":570,"context_line":"        if isinstance(primitive, dict):"},{"line_number":571,"context_line":"            primitive.pop(\u0027nova_object.changes\u0027, None)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_2639aa41","line":568,"updated":"2015-03-12 14:59:19.000000000","message":"This should really go into objects subtree... but then again (see below)","commit_id":"f97138894192ff917925e84bd371c19b211ed6aa"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"6a0e829b813351d6e4fbda787244f1145c25552a","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                  \u0027used_vcpus\u0027: ucpu,"},{"line_number":566,"context_line":"                  \u0027pci_stats\u0027: pci_stats})"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"    def _strip_changes(self, primitive):"},{"line_number":569,"context_line":"        \"\"\"Strip the changes element from an nova object primitive.\"\"\""},{"line_number":570,"context_line":"        if isinstance(primitive, dict):"},{"line_number":571,"context_line":"            primitive.pop(\u0027nova_object.changes\u0027, None)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_9931955c","line":568,"in_reply_to":"9a80dd14_2639aa41","updated":"2015-03-13 16:32:32.000000000","message":"see below","commit_id":"f97138894192ff917925e84bd371c19b211ed6aa"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"0db20ab26cdcd67a5f0445c13672a36b30c2e36a","unresolved":false,"context_lines":[{"line_number":581,"context_line":"        # them from the primitive used in the comparison"},{"line_number":582,"context_line":"        new_resources \u003d self.compute_node.obj_to_primitive()"},{"line_number":583,"context_line":"        self._strip_changes(new_resources)"},{"line_number":584,"context_line":"        if cmp(new_resources, self.old_resources) !\u003d 0:"},{"line_number":585,"context_line":"            self.old_resources \u003d new_resources"},{"line_number":586,"context_line":"            return True"},{"line_number":587,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_71343ade","line":584,"updated":"2015-03-12 14:59:19.000000000","message":"This logic seems to me really should belong in the compute node object as well...","commit_id":"f97138894192ff917925e84bd371c19b211ed6aa"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"6a0e829b813351d6e4fbda787244f1145c25552a","unresolved":false,"context_lines":[{"line_number":581,"context_line":"        # them from the primitive used in the comparison"},{"line_number":582,"context_line":"        new_resources \u003d self.compute_node.obj_to_primitive()"},{"line_number":583,"context_line":"        self._strip_changes(new_resources)"},{"line_number":584,"context_line":"        if cmp(new_resources, self.old_resources) !\u003d 0:"},{"line_number":585,"context_line":"            self.old_resources \u003d new_resources"},{"line_number":586,"context_line":"            return True"},{"line_number":587,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_792ce102","line":584,"in_reply_to":"9a80dd14_71343ade","updated":"2015-03-13 16:32:32.000000000","message":"maybe compare compute nodes instead of prims - will look at this.","commit_id":"f97138894192ff917925e84bd371c19b211ed6aa"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"40facdedb7a5044a588ac6aa52fe5e731fe97666","unresolved":false,"context_lines":[{"line_number":581,"context_line":"        # them from the primitive used in the comparison"},{"line_number":582,"context_line":"        new_resources \u003d self.compute_node.obj_to_primitive()"},{"line_number":583,"context_line":"        self._strip_changes(new_resources)"},{"line_number":584,"context_line":"        if cmp(new_resources, self.old_resources) !\u003d 0:"},{"line_number":585,"context_line":"            self.old_resources \u003d new_resources"},{"line_number":586,"context_line":"            return True"},{"line_number":587,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_90804cf8","line":584,"in_reply_to":"9a80dd14_792ce102","updated":"2015-03-16 12:58:25.000000000","message":"The compute node doesn\u0027t keep track of last saved value, which it would need to determine if anything has changed, it only notes which fields are set. I discussed this with dan at the last meetup. We thought that this only happens here so the check and keeping the old value should go here, but the equivalence comparison itself could certainly go in ComputeNode.","commit_id":"f97138894192ff917925e84bd371c19b211ed6aa"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"0db20ab26cdcd67a5f0445c13672a36b30c2e36a","unresolved":false,"context_lines":[{"line_number":841,"context_line":"                \"vcpus_used\", \"memory_mb_used\", \"local_gb_used\","},{"line_number":842,"context_line":"                \"numa_topology\", \"hypervisor_type\","},{"line_number":843,"context_line":"                \"hypervisor_version\", \"hypervisor_hostname\","},{"line_number":844,"context_line":"                \"disk_available_least\", \"host_ip\"]"},{"line_number":845,"context_line":"        for key in keys:"},{"line_number":846,"context_line":"            if key in resources:"},{"line_number":847,"context_line":"                self.compute_node[key] \u003d resources[key]"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_c631ae0c","line":844,"updated":"2015-03-12 14:59:19.000000000","message":"This is also a weird thing to just inline here like this...\n\nI am sure it has been brought up before that resources should not be a freeform dict either, and one step closer would be to make this kind of thing a classmethod on the ComputeNode object (from_resource_dict ?)","commit_id":"f97138894192ff917925e84bd371c19b211ed6aa"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"6a0e829b813351d6e4fbda787244f1145c25552a","unresolved":false,"context_lines":[{"line_number":841,"context_line":"                \"vcpus_used\", \"memory_mb_used\", \"local_gb_used\","},{"line_number":842,"context_line":"                \"numa_topology\", \"hypervisor_type\","},{"line_number":843,"context_line":"                \"hypervisor_version\", \"hypervisor_hostname\","},{"line_number":844,"context_line":"                \"disk_available_least\", \"host_ip\"]"},{"line_number":845,"context_line":"        for key in keys:"},{"line_number":846,"context_line":"            if key in resources:"},{"line_number":847,"context_line":"                self.compute_node[key] \u003d resources[key]"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_79dea112","line":844,"in_reply_to":"9a80dd14_c631ae0c","updated":"2015-03-13 16:32:32.000000000","message":"Done","commit_id":"f97138894192ff917925e84bd371c19b211ed6aa"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"413de76ebc4375490878b13e02eb406855c53fdf","unresolved":false,"context_lines":[{"line_number":463,"context_line":"            dev_pools_obj \u003d self.pci_tracker.stats.to_device_pools_obj()"},{"line_number":464,"context_line":"            self.compute_node.pci_device_pools \u003d dev_pools_obj"},{"line_number":465,"context_line":"        else:"},{"line_number":466,"context_line":"            self.compute_node.pci_device_pools \u003d None"},{"line_number":467,"context_line":""},{"line_number":468,"context_line":"        self._report_final_resource_view()"},{"line_number":469,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_81dcede4","line":466,"updated":"2015-05-29 14:27:36.000000000","message":"I\u0027m not clear why this case changed from an empty list to None. Wouldn\u0027t an empty PciDevicePoolList be more consistent?","commit_id":"d7519efffb965abe30d9bb3f23330c39ec631ed7"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"88aee134a679a90936832b743fcfdb3c219af3ab","unresolved":false,"context_lines":[{"line_number":463,"context_line":"            dev_pools_obj \u003d self.pci_tracker.stats.to_device_pools_obj()"},{"line_number":464,"context_line":"            self.compute_node.pci_device_pools \u003d dev_pools_obj"},{"line_number":465,"context_line":"        else:"},{"line_number":466,"context_line":"            self.compute_node.pci_device_pools \u003d None"},{"line_number":467,"context_line":""},{"line_number":468,"context_line":"        self._report_final_resource_view()"},{"line_number":469,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_735f150f","line":466,"in_reply_to":"7a016987_81dcede4","updated":"2015-06-05 13:10:31.000000000","message":"I thought this was more consistent with the fact None is treated as \"no device pools\" for backward compatibility. But a change like that is not the point of this patch, so you are right to point out it is not consistent. Changing it back to being an empty list of pools.","commit_id":"d7519efffb965abe30d9bb3f23330c39ec631ed7"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"413de76ebc4375490878b13e02eb406855c53fdf","unresolved":false,"context_lines":[{"line_number":749,"context_line":"            self._update_usage(instance, sign\u003dsign)"},{"line_number":750,"context_line":""},{"line_number":751,"context_line":"        self.compute_node.current_workload \u003d self.stats.calculate_workload()"},{"line_number":752,"context_line":"        if self.pci_tracker:"},{"line_number":753,"context_line":"            obj \u003d self.pci_tracker.stats.to_device_pools_obj()"},{"line_number":754,"context_line":"            self.compute_node.pci_device_pools \u003d obj"},{"line_number":755,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_41f9554d","line":752,"updated":"2015-05-29 14:27:36.000000000","message":"You have this same block of code in multiple places. It should be refactored into a separate method.","commit_id":"d7519efffb965abe30d9bb3f23330c39ec631ed7"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"88aee134a679a90936832b743fcfdb3c219af3ab","unresolved":false,"context_lines":[{"line_number":749,"context_line":"            self._update_usage(instance, sign\u003dsign)"},{"line_number":750,"context_line":""},{"line_number":751,"context_line":"        self.compute_node.current_workload \u003d self.stats.calculate_workload()"},{"line_number":752,"context_line":"        if self.pci_tracker:"},{"line_number":753,"context_line":"            obj \u003d self.pci_tracker.stats.to_device_pools_obj()"},{"line_number":754,"context_line":"            self.compute_node.pci_device_pools \u003d obj"},{"line_number":755,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_51b651dd","line":752,"in_reply_to":"7a016987_41f9554d","updated":"2015-06-05 13:10:31.000000000","message":"That\u0027s true, there is also a third occurrence. But refactoring this is not relevant to this patch so I will leave it.","commit_id":"d7519efffb965abe30d9bb3f23330c39ec631ed7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b9e2d79de5e5a13c89e29dac8f689396be77c4e5","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        self.monitors \u003d monitor_handler.choose_monitors(self)"},{"line_number":87,"context_line":"        self.ext_resources_handler \u003d \\"},{"line_number":88,"context_line":"            ext_resources.ResourceHandler(CONF.compute_resources)"},{"line_number":89,"context_line":"        self.old_resources \u003d objects.ComputeNode()"},{"line_number":90,"context_line":"        self.scheduler_client \u003d scheduler_client.SchedulerClient()"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE)"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa32b979_4c11ce51","line":89,"updated":"2015-06-15 16:41:10.000000000","message":"note: This can eventually go away, since with the resource-objects patch series, the code will just need a single compute_node object, and checking/updating resources will be a simple matter of calling:\n\n self.compute_node.update_inventory(resources)","commit_id":"5b6f304238d617f91cae95e8cfa53271a774b209"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b9e2d79de5e5a13c89e29dac8f689396be77c4e5","unresolved":false,"context_lines":[{"line_number":587,"context_line":"        if not self._resource_change():"},{"line_number":588,"context_line":"            return"},{"line_number":589,"context_line":"        if \"service\" in self.compute_node:"},{"line_number":590,"context_line":"            del self.compute_node.service"},{"line_number":591,"context_line":"        # Persist the stats to the Scheduler"},{"line_number":592,"context_line":"        self.scheduler_client.update_resource_stats("},{"line_number":593,"context_line":"            context, (self.host, self.nodename), self.compute_node)"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa32b979_0c49865f","line":590,"updated":"2015-06-15 16:41:10.000000000","message":"You can remove the above two lines now that an object is being used. ComputeNode.save() doesn\u0027t do anything with the service_id field now.","commit_id":"5b6f304238d617f91cae95e8cfa53271a774b209"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"573a3a57c6018b19c71fbffa4200001ee44337a4","unresolved":false,"context_lines":[{"line_number":587,"context_line":"        if not self._resource_change():"},{"line_number":588,"context_line":"            return"},{"line_number":589,"context_line":"        if \"service\" in self.compute_node:"},{"line_number":590,"context_line":"            del self.compute_node.service"},{"line_number":591,"context_line":"        # Persist the stats to the Scheduler"},{"line_number":592,"context_line":"        self.scheduler_client.update_resource_stats("},{"line_number":593,"context_line":"            context, (self.host, self.nodename), self.compute_node)"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_9213535c","line":590,"updated":"2015-06-22 17:57:10.000000000","message":"Please remove the above two lines. They do not need to be there any more.","commit_id":"f908ca0d25072719fdfe4c929c8c09f32e3eeb18"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"573a3a57c6018b19c71fbffa4200001ee44337a4","unresolved":false,"context_lines":[{"line_number":590,"context_line":"            del self.compute_node.service"},{"line_number":591,"context_line":"        # Persist the stats to the Scheduler"},{"line_number":592,"context_line":"        self.scheduler_client.update_resource_stats("},{"line_number":593,"context_line":"            context, (self.host, self.nodename), self.compute_node)"},{"line_number":594,"context_line":"        if self.pci_tracker:"},{"line_number":595,"context_line":"            self.pci_tracker.save(context)"},{"line_number":596,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_923a73cc","line":593,"updated":"2015-06-22 17:57:10.000000000","message":"Is it really necessary to pass self.host and self.nodename, since both of those fields are attributes of self.compute_node, which is passed already?","commit_id":"f908ca0d25072719fdfe4c929c8c09f32e3eeb18"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ffca38a834a0f0b76c1bb4a5fd37f94c47dab572","unresolved":false,"context_lines":[{"line_number":336,"context_line":"        cn[\u0027service_id\u0027] \u003d service.id"},{"line_number":337,"context_line":"        cn[\u0027host\u0027] \u003d self.host"},{"line_number":338,"context_line":"        # initialize load stats from existing instances:"},{"line_number":339,"context_line":"        self._write_ext_resources(cn)"},{"line_number":340,"context_line":"        # NOTE(pmurray): the stats field is stored as a json string. The"},{"line_number":341,"context_line":"        # json conversion will be done automatically by the ComputeNode object"},{"line_number":342,"context_line":"        # so this can be removed when using ComputeNode."}],"source_content_type":"text/x-python","patch_set":17,"id":"fa32b979_c229258b","side":"PARENT","line":339,"updated":"2015-06-26 22:05:46.000000000","message":"Where is this called in the new version?","commit_id":"fe0d7e8e3ac2a8723e4eb6040b21c986c8dcbd9c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a9370528bfb44d58878afbd90d28a6f52fa41a05","unresolved":false,"context_lines":[{"line_number":336,"context_line":"        cn[\u0027service_id\u0027] \u003d service.id"},{"line_number":337,"context_line":"        cn[\u0027host\u0027] \u003d self.host"},{"line_number":338,"context_line":"        # initialize load stats from existing instances:"},{"line_number":339,"context_line":"        self._write_ext_resources(cn)"},{"line_number":340,"context_line":"        # NOTE(pmurray): the stats field is stored as a json string. The"},{"line_number":341,"context_line":"        # json conversion will be done automatically by the ComputeNode object"},{"line_number":342,"context_line":"        # so this can be removed when using ComputeNode."}],"source_content_type":"text/x-python","patch_set":17,"id":"fa32b979_873ecfd8","side":"PARENT","line":339,"updated":"2015-06-26 22:17:21.000000000","message":"in _update() L583","commit_id":"fe0d7e8e3ac2a8723e4eb6040b21c986c8dcbd9c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ff82c8945494e22833f380fab6987166c67fb064","unresolved":false,"context_lines":[{"line_number":336,"context_line":"        cn[\u0027service_id\u0027] \u003d service.id"},{"line_number":337,"context_line":"        cn[\u0027host\u0027] \u003d self.host"},{"line_number":338,"context_line":"        # initialize load stats from existing instances:"},{"line_number":339,"context_line":"        self._write_ext_resources(cn)"},{"line_number":340,"context_line":"        # NOTE(pmurray): the stats field is stored as a json string. The"},{"line_number":341,"context_line":"        # json conversion will be done automatically by the ComputeNode object"},{"line_number":342,"context_line":"        # so this can be removed when using ComputeNode."}],"source_content_type":"text/x-python","patch_set":17,"id":"fa32b979_a2c5010b","side":"PARENT","line":339,"in_reply_to":"fa32b979_873ecfd8","updated":"2015-06-26 22:29:35.000000000","message":"So given that the change doesn\u0027t really modify the ERT status, I think it would be fair to leave the above call and discuss about the opportunity to drop ERT on a later patch","commit_id":"fe0d7e8e3ac2a8723e4eb6040b21c986c8dcbd9c"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"b171d56905c68ab045b676a2c9f5c388b7a912f6","unresolved":false,"context_lines":[{"line_number":336,"context_line":"        cn[\u0027service_id\u0027] \u003d service.id"},{"line_number":337,"context_line":"        cn[\u0027host\u0027] \u003d self.host"},{"line_number":338,"context_line":"        # initialize load stats from existing instances:"},{"line_number":339,"context_line":"        self._write_ext_resources(cn)"},{"line_number":340,"context_line":"        # NOTE(pmurray): the stats field is stored as a json string. The"},{"line_number":341,"context_line":"        # json conversion will be done automatically by the ComputeNode object"},{"line_number":342,"context_line":"        # so this can be removed when using ComputeNode."}],"source_content_type":"text/x-python","patch_set":17,"id":"fa32b979_f8497cb8","side":"PARENT","line":339,"in_reply_to":"fa32b979_a2c5010b","updated":"2015-06-27 00:16:15.000000000","message":"As discussed in IRC, this line isn\u0027t related to the conversion to ComputeNode object. It\u0027s cleanup of unused ERT code and unless it\u0027s mentioned in the commit message, it looks like a bug to me. Ideally, I\u0027d like to see all ERT support removed in one separate patch.","commit_id":"fe0d7e8e3ac2a8723e4eb6040b21c986c8dcbd9c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a9370528bfb44d58878afbd90d28a6f52fa41a05","unresolved":false,"context_lines":[{"line_number":496,"context_line":"        # to add this field in the resources dict until the RT is using"},{"line_number":497,"context_line":"        # the ComputeNode.save() method for populating the table."},{"line_number":498,"context_line":"        # tl;dr: To be removed once RT is using ComputeNode.save()"},{"line_number":499,"context_line":"        self.compute_node[\u0027host\u0027] \u003d self.host"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"        self._update(context)"},{"line_number":502,"context_line":"        LOG.info(_LI(\u0027Compute_service record updated for %(host)s:%(node)s\u0027),"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa32b979_a7ec3393","side":"PARENT","line":499,"updated":"2015-06-26 22:17:21.000000000","message":"++ \\o/","commit_id":"fe0d7e8e3ac2a8723e4eb6040b21c986c8dcbd9c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a9370528bfb44d58878afbd90d28a6f52fa41a05","unresolved":false,"context_lines":[{"line_number":458,"context_line":"        # from deleted instances."},{"line_number":459,"context_line":"        if self.pci_tracker:"},{"line_number":460,"context_line":"            self.pci_tracker.clean_usage(instances, migrations, orphans)"},{"line_number":461,"context_line":"            dev_pools_obj \u003d self.pci_tracker.stats.to_device_pools_obj()"},{"line_number":462,"context_line":"            self.compute_node.pci_device_pools \u003d dev_pools_obj"},{"line_number":463,"context_line":"        else:"},{"line_number":464,"context_line":"            self.compute_node.pci_device_pools \u003d objects.PciDevicePoolList()"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa32b979_87380f3f","line":461,"updated":"2015-06-26 22:17:21.000000000","message":"I was a bit worried to see the schedclient removing the PCI hydratation but that\u0027s fine thanks to that above call.","commit_id":"966f595ee2b6c71d5a85a46a8857c419882ca071"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a9370528bfb44d58878afbd90d28a6f52fa41a05","unresolved":false,"context_lines":[{"line_number":461,"context_line":"            dev_pools_obj \u003d self.pci_tracker.stats.to_device_pools_obj()"},{"line_number":462,"context_line":"            self.compute_node.pci_device_pools \u003d dev_pools_obj"},{"line_number":463,"context_line":"        else:"},{"line_number":464,"context_line":"            self.compute_node.pci_device_pools \u003d objects.PciDevicePoolList()"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"        self._report_final_resource_view()"},{"line_number":467,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa32b979_670aab7b","line":464,"updated":"2015-06-26 22:17:21.000000000","message":"pci_device_pools is a nullable field. I don\u0027t see why we should provide an empty object and then have some problems to check if the attributes are set while we can just say \u003d None","commit_id":"966f595ee2b6c71d5a85a46a8857c419882ca071"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"80fe68fc4b6846b4fb678b0a5909ee365527947f","unresolved":false,"context_lines":[{"line_number":466,"context_line":"            dev_pools_obj \u003d self.pci_tracker.stats.to_device_pools_obj()"},{"line_number":467,"context_line":"            self.compute_node.pci_device_pools \u003d dev_pools_obj"},{"line_number":468,"context_line":"        else:"},{"line_number":469,"context_line":"            self.compute_node.pci_device_pools \u003d objects.PciDevicePoolList()"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"        self._report_final_resource_view()"},{"line_number":472,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"ba3cc151_6b14d1f4","line":469,"updated":"2015-06-29 18:38:59.000000000","message":"I\u0027m guessing the empty object is in case existing code assumes pci_device_pools is iterable, since it used to be \u0027[]\u0027","commit_id":"c771822b31fd95df0ec480520d80dd5371e0f44b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"fc83df48bb86bae2ba2bf843e8b987320b64f5e8","unresolved":false,"context_lines":[{"line_number":466,"context_line":"            dev_pools_obj \u003d self.pci_tracker.stats.to_device_pools_obj()"},{"line_number":467,"context_line":"            self.compute_node.pci_device_pools \u003d dev_pools_obj"},{"line_number":468,"context_line":"        else:"},{"line_number":469,"context_line":"            self.compute_node.pci_device_pools \u003d objects.PciDevicePoolList()"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"        self._report_final_resource_view()"},{"line_number":472,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"ba3cc151_90227200","line":469,"in_reply_to":"ba3cc151_569f3003","updated":"2015-06-30 15:25:58.000000000","message":"Fair enough","commit_id":"c771822b31fd95df0ec480520d80dd5371e0f44b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8e312a1480d30275aecab42ecfb1f8c50be6399b","unresolved":false,"context_lines":[{"line_number":466,"context_line":"            dev_pools_obj \u003d self.pci_tracker.stats.to_device_pools_obj()"},{"line_number":467,"context_line":"            self.compute_node.pci_device_pools \u003d dev_pools_obj"},{"line_number":468,"context_line":"        else:"},{"line_number":469,"context_line":"            self.compute_node.pci_device_pools \u003d objects.PciDevicePoolList()"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"        self._report_final_resource_view()"},{"line_number":472,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"ba3cc151_cb2f1da0","line":469,"in_reply_to":"ba3cc151_6b14d1f4","updated":"2015-06-29 18:42:51.000000000","message":"Well, I would prefer to set it as None because if there are no PCI devices, there is no reason to add an empty object.\nTo be clear, as the object field is nullable, I think that\u0027s for when there is no PCI usage.","commit_id":"c771822b31fd95df0ec480520d80dd5371e0f44b"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"b80c75ee2cfe7761b340758e07d03b55211532e3","unresolved":false,"context_lines":[{"line_number":466,"context_line":"            dev_pools_obj \u003d self.pci_tracker.stats.to_device_pools_obj()"},{"line_number":467,"context_line":"            self.compute_node.pci_device_pools \u003d dev_pools_obj"},{"line_number":468,"context_line":"        else:"},{"line_number":469,"context_line":"            self.compute_node.pci_device_pools \u003d objects.PciDevicePoolList()"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"        self._report_final_resource_view()"},{"line_number":472,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"ba3cc151_990ffde0","line":469,"in_reply_to":"ba3cc151_90227200","updated":"2015-06-30 17:18:01.000000000","message":"This was discussed in earlier patch sets - I changed it to the objects.PciDevicePoolList() for the reason Dan mentions in response to Ed\u0027s previous comments.\n\nThis is also related to Mel\u0027s comment below (L560). If its None we can\u0027t assume it exists, but if its set to an empty list it always does.","commit_id":"c771822b31fd95df0ec480520d80dd5371e0f44b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"86cc8f391bb4eac1c13b0a47ab0bef94e3453131","unresolved":false,"context_lines":[{"line_number":466,"context_line":"            dev_pools_obj \u003d self.pci_tracker.stats.to_device_pools_obj()"},{"line_number":467,"context_line":"            self.compute_node.pci_device_pools \u003d dev_pools_obj"},{"line_number":468,"context_line":"        else:"},{"line_number":469,"context_line":"            self.compute_node.pci_device_pools \u003d objects.PciDevicePoolList()"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"        self._report_final_resource_view()"},{"line_number":472,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"ba3cc151_569f3003","line":469,"in_reply_to":"ba3cc151_cb2f1da0","updated":"2015-06-29 19:04:36.000000000","message":"Well, this is the objects equivalent to the empty list on L485 that was already there. Changing it to None will be a functional change, so I\u0027d prefer to keep this behavior in this patch.\n\nI\u0027m pretty sure there was a bug around this being null (or maybe unset) when there was no information, so changing it blindly here is probably not a good idea.","commit_id":"c771822b31fd95df0ec480520d80dd5371e0f44b"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"80fe68fc4b6846b4fb678b0a5909ee365527947f","unresolved":false,"context_lines":[{"line_number":557,"context_line":"        else:"},{"line_number":558,"context_line":"            tcpu \u003d 0"},{"line_number":559,"context_line":"            ucpu \u003d 0"},{"line_number":560,"context_line":"        pci_stats \u003d self.compute_node.get(\u0027pci_device_pools\u0027)"},{"line_number":561,"context_line":"        LOG.info(_LI(\"Final resource view: \""},{"line_number":562,"context_line":"                     \"name\u003d%(node)s \""},{"line_number":563,"context_line":"                     \"phys_ram\u003d%(phys_ram)sMB \""}],"source_content_type":"text/x-python","patch_set":19,"id":"ba3cc151_0b73c581","line":560,"updated":"2015-06-29 18:38:59.000000000","message":"Do we still need to do a dict-get on compute_node here now that it\u0027s an object?","commit_id":"c771822b31fd95df0ec480520d80dd5371e0f44b"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"b80c75ee2cfe7761b340758e07d03b55211532e3","unresolved":false,"context_lines":[{"line_number":557,"context_line":"        else:"},{"line_number":558,"context_line":"            tcpu \u003d 0"},{"line_number":559,"context_line":"            ucpu \u003d 0"},{"line_number":560,"context_line":"        pci_stats \u003d self.compute_node.get(\u0027pci_device_pools\u0027)"},{"line_number":561,"context_line":"        LOG.info(_LI(\"Final resource view: \""},{"line_number":562,"context_line":"                     \"name\u003d%(node)s \""},{"line_number":563,"context_line":"                     \"phys_ram\u003d%(phys_ram)sMB \""}],"source_content_type":"text/x-python","patch_set":19,"id":"ba3cc151_5f14f542","line":560,"in_reply_to":"ba3cc151_0b73c581","updated":"2015-06-30 17:18:01.000000000","message":"Seems .get() is useful if the attr might not be there - but in this case it is always there. So I will change to . notation.","commit_id":"c771822b31fd95df0ec480520d80dd5371e0f44b"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"1c054456136ab76b9a0115f6e35fb63f37d99ac7","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        # Initialize the ERT."},{"line_number":338,"context_line":"        # TODO(jaypipes): Remove when we remove the ERT in the final"},{"line_number":339,"context_line":"        # resource-objects patch series."},{"line_number":340,"context_line":"        self._write_ext_resources(self.compute_node)"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    def _copy_resources(self, resources):"},{"line_number":343,"context_line":"        \"\"\"Copy resource values to initialise compute_node and related"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba3cc151_617b068d","line":340,"updated":"2015-07-02 06:42:32.000000000","message":"This was added in patchset 18. At this point the compute node is being initialised with the values in the resources from the virt driver. No other resource details have been set up or calculated, including the ERT, so its not right to initialise from the ERT here.\n\nThis is causing functional tests to fail.","commit_id":"7f6bc2244049b44b5e9c894f01ef83ecea0f5c2e"}],"nova/objects/compute_node.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"88d4c3d44bc96125196c67cc473e9a55d25a5277","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                                                             self.service_id)"},{"line_number":272,"context_line":"        return self._cached_service"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def update_from_virt_driver(self, resources):"},{"line_number":275,"context_line":"        # NOTE(pmurray): the virt driver provides a dict of values that"},{"line_number":276,"context_line":"        # can be copied into the compute node. The names and representation"},{"line_number":277,"context_line":"        # do not exactly match."}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_f45484c6","line":274,"updated":"2015-05-29 13:37:34.000000000","message":"Would be really good to test this - actually adding this could be a separate commit.","commit_id":"d7519efffb965abe30d9bb3f23330c39ec631ed7"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"88aee134a679a90936832b743fcfdb3c219af3ab","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                                                             self.service_id)"},{"line_number":272,"context_line":"        return self._cached_service"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def update_from_virt_driver(self, resources):"},{"line_number":275,"context_line":"        # NOTE(pmurray): the virt driver provides a dict of values that"},{"line_number":276,"context_line":"        # can be copied into the compute node. The names and representation"},{"line_number":277,"context_line":"        # do not exactly match."}],"source_content_type":"text/x-python","patch_set":12,"id":"5afe65bd_42b0458a","line":274,"in_reply_to":"7a016987_62de8412","updated":"2015-06-05 13:10:31.000000000","message":"I have made another commit and added tests.","commit_id":"d7519efffb965abe30d9bb3f23330c39ec631ed7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"13bf91e6d1fc54d589335ba24dc3ba33e556fdc7","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                                                             self.service_id)"},{"line_number":272,"context_line":"        return self._cached_service"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def update_from_virt_driver(self, resources):"},{"line_number":275,"context_line":"        # NOTE(pmurray): the virt driver provides a dict of values that"},{"line_number":276,"context_line":"        # can be copied into the compute node. The names and representation"},{"line_number":277,"context_line":"        # do not exactly match."}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_62de8412","line":274,"in_reply_to":"7a016987_f45484c6","updated":"2015-05-29 20:24:19.000000000","message":"*facepalm* missed it","commit_id":"d7519efffb965abe30d9bb3f23330c39ec631ed7"}],"nova/scheduler/client/report.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"0db20ab26cdcd67a5f0445c13672a36b30c2e36a","unresolved":false,"context_lines":[{"line_number":24,"context_line":"class SchedulerReportClient(object):"},{"line_number":25,"context_line":"    \"\"\"Client class for updating the scheduler.\"\"\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def update_resource_stats(self, context, name, stats):"},{"line_number":28,"context_line":"        \"\"\"Creates or updates stats for the desired service."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"        :param context: local context"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_91e28e2d","line":27,"updated":"2015-03-12 14:59:19.000000000","message":"Why not just rename the stats param to reflect that it\u0027s a compute node object now?","commit_id":"f97138894192ff917925e84bd371c19b211ed6aa"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"6a0e829b813351d6e4fbda787244f1145c25552a","unresolved":false,"context_lines":[{"line_number":24,"context_line":"class SchedulerReportClient(object):"},{"line_number":25,"context_line":"    \"\"\"Client class for updating the scheduler.\"\"\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def update_resource_stats(self, context, name, stats):"},{"line_number":28,"context_line":"        \"\"\"Creates or updates stats for the desired service."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"        :param context: local context"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_9918b5d4","line":27,"in_reply_to":"9a80dd14_91e28e2d","updated":"2015-03-13 16:32:32.000000000","message":"Done","commit_id":"f97138894192ff917925e84bd371c19b211ed6aa"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"0db20ab26cdcd67a5f0445c13672a36b30c2e36a","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        :param context: local context"},{"line_number":31,"context_line":"        :param name: name of resource to update"},{"line_number":32,"context_line":"        :type name: immutable (str or tuple)"},{"line_number":33,"context_line":"        :param stats: updated stats to send to scheduler"},{"line_number":34,"context_line":"        :type stats: dict"},{"line_number":35,"context_line":"        \"\"\""},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_f1caea9f","line":33,"updated":"2015-03-12 14:59:19.000000000","message":"This should be made less vague too","commit_id":"f97138894192ff917925e84bd371c19b211ed6aa"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"6a0e829b813351d6e4fbda787244f1145c25552a","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        :param context: local context"},{"line_number":31,"context_line":"        :param name: name of resource to update"},{"line_number":32,"context_line":"        :type name: immutable (str or tuple)"},{"line_number":33,"context_line":"        :param stats: updated stats to send to scheduler"},{"line_number":34,"context_line":"        :type stats: dict"},{"line_number":35,"context_line":"        \"\"\""},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_f9261115","line":33,"in_reply_to":"9a80dd14_f1caea9f","updated":"2015-03-13 16:32:32.000000000","message":"Done","commit_id":"f97138894192ff917925e84bd371c19b211ed6aa"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"efe267cf5657cca30151bd4c0a893aea746c816f","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        \"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        if \u0027id\u0027 in compute:"},{"line_number":38,"context_line":"            compute.save()"},{"line_number":39,"context_line":"        else:"},{"line_number":40,"context_line":"            raise exception.ComputeHostNotCreated(name\u003dstr(name))"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_f624a50d","line":38,"updated":"2015-05-28 20:55:54.000000000","message":"++","commit_id":"d7519efffb965abe30d9bb3f23330c39ec631ed7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b9e2d79de5e5a13c89e29dac8f689396be77c4e5","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        :param name: name of resource to update"},{"line_number":32,"context_line":"        :type name: immutable (str or tuple)"},{"line_number":33,"context_line":"        :param compute: updated compute node stats to send to scheduler"},{"line_number":34,"context_line":"        :type compute: ComputeNode"},{"line_number":35,"context_line":"        \"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        if \u0027id\u0027 in compute:"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa32b979_2c21ea4d","line":34,"updated":"2015-06-15 16:41:10.000000000","message":"Best to be explicit and put \"nova.objects.ComputeNode\"","commit_id":"5b6f304238d617f91cae95e8cfa53271a774b209"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"573a3a57c6018b19c71fbffa4200001ee44337a4","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"        :param context: local context"},{"line_number":31,"context_line":"        :param name: name of resource to update"},{"line_number":32,"context_line":"        :type name: immutable (str or tuple)"},{"line_number":33,"context_line":"        :param compute: updated compute node stats to send to scheduler"},{"line_number":34,"context_line":"        :type compute: ComputeNode"},{"line_number":35,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_3277e7a0","line":32,"updated":"2015-06-22 17:57:10.000000000","message":"The above parameter is not needed any more. Recommend removing it...","commit_id":"f908ca0d25072719fdfe4c929c8c09f32e3eeb18"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"7622aac16b15652d7f39f6e424f17b89dc2c4d08","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from oslo_log import log as logging"},{"line_number":17,"context_line":"from oslo_serialization import jsonutils"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa32b979_ecfa2243","side":"PARENT","line":15,"updated":"2015-06-26 21:35:55.000000000","message":"Geez, all the red on this page looks gorgeous! :)","commit_id":"fe0d7e8e3ac2a8723e4eb6040b21c986c8dcbd9c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a9370528bfb44d58878afbd90d28a6f52fa41a05","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                # back to a real object (not from_dict() or _from_db_object(),"},{"line_number":60,"context_line":"                # which expect a db-formatted object) but just an attr-based"},{"line_number":61,"context_line":"                # reconstruction. When we start getting a ComputeNode from"},{"line_number":62,"context_line":"                # scheduler this \"bandage\" can go away."},{"line_number":63,"context_line":"                if v:"},{"line_number":64,"context_line":"                    devpools \u003d [objects.PciDevicePool.from_dict(x) for x in v]"},{"line_number":65,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa32b979_426e7597","side":"PARENT","line":62,"updated":"2015-06-26 22:17:21.000000000","message":"so that\u0027s okay to remove that thanks to the change you gave","commit_id":"fe0d7e8e3ac2a8723e4eb6040b21c986c8dcbd9c"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"80fe68fc4b6846b4fb678b0a5909ee365527947f","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    def update_resource_stats(self, compute_node):"},{"line_number":21,"context_line":"        \"\"\"Creates or updates stats for the supplied compute node."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"        :param compute: updated nova.objects.ComputeNode to send to scheduler"},{"line_number":24,"context_line":"        \"\"\""},{"line_number":25,"context_line":"        compute_node.save()"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba3cc151_abd89954","line":23,"updated":"2015-06-29 18:38:59.000000000","message":"The param is actually \"compute_node\" above","commit_id":"c771822b31fd95df0ec480520d80dd5371e0f44b"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"b80c75ee2cfe7761b340758e07d03b55211532e3","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    def update_resource_stats(self, compute_node):"},{"line_number":21,"context_line":"        \"\"\"Creates or updates stats for the supplied compute node."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"        :param compute: updated nova.objects.ComputeNode to send to scheduler"},{"line_number":24,"context_line":"        \"\"\""},{"line_number":25,"context_line":"        compute_node.save()"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba3cc151_f929698a","line":23,"in_reply_to":"ba3cc151_5612d063","updated":"2015-06-30 17:18:01.000000000","message":"Done","commit_id":"c771822b31fd95df0ec480520d80dd5371e0f44b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"86cc8f391bb4eac1c13b0a47ab0bef94e3453131","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    def update_resource_stats(self, compute_node):"},{"line_number":21,"context_line":"        \"\"\"Creates or updates stats for the supplied compute node."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"        :param compute: updated nova.objects.ComputeNode to send to scheduler"},{"line_number":24,"context_line":"        \"\"\""},{"line_number":25,"context_line":"        compute_node.save()"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba3cc151_5612d063","line":23,"in_reply_to":"ba3cc151_abd89954","updated":"2015-06-29 19:04:36.000000000","message":"Ooh, nice catch.","commit_id":"c771822b31fd95df0ec480520d80dd5371e0f44b"}],"nova/tests/unit/compute/test_resource_tracker.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b9e2d79de5e5a13c89e29dac8f689396be77c4e5","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        compute_obj \u003d objects.ComputeNode()"},{"line_number":273,"context_line":"        compute_obj \u003d objects.ComputeNode._from_db_object("},{"line_number":274,"context_line":"            context, compute_obj, compute)"},{"line_number":275,"context_line":"        return compute_obj"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def _create_service(self, host\u003d\"fakehost\", compute\u003dNone):"},{"line_number":278,"context_line":"        if compute:"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa32b979_6cb052de","line":275,"updated":"2015-06-15 16:41:10.000000000","message":"Please just change the _create_compute_node() method directly and return a ComputeNode object from it now that we are only using ComputeNode objects in the resource tracker... all that would be necessary is changing line 268 to this:\n\n return objects.ComputeNode(**compute)","commit_id":"5b6f304238d617f91cae95e8cfa53271a774b209"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b9e2d79de5e5a13c89e29dac8f689396be77c4e5","unresolved":false,"context_lines":[{"line_number":816,"context_line":"        self.assertEqual(0, self.tracker.compute_node[\u0027current_workload\u0027])"},{"line_number":817,"context_line":"        expected \u003d pci_device_pool.from_pci_stats(driver.pci_stats)"},{"line_number":818,"context_line":"        self.assertEqual(expected,"},{"line_number":819,"context_line":"                         self.tracker.compute_node[\u0027pci_device_pools\u0027])"},{"line_number":820,"context_line":""},{"line_number":821,"context_line":""},{"line_number":822,"context_line":"class SchedulerClientTrackerTestCase(BaseTrackerTestCase):"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa32b979_cc307e59","line":819,"updated":"2015-06-15 16:41:10.000000000","message":"Please use object notation above...","commit_id":"5b6f304238d617f91cae95e8cfa53271a774b209"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b9e2d79de5e5a13c89e29dac8f689396be77c4e5","unresolved":false,"context_lines":[{"line_number":875,"context_line":"        self._assert(FAKE_VIRT_MEMORY_MB, \u0027free_ram_mb\u0027)"},{"line_number":876,"context_line":"        self._assert(FAKE_VIRT_LOCAL_GB, \u0027free_disk_gb\u0027)"},{"line_number":877,"context_line":"        self.assertFalse(self.tracker.disabled)"},{"line_number":878,"context_line":"        self.assertEqual(0, self.tracker.compute_node[\u0027current_workload\u0027])"},{"line_number":879,"context_line":"        expected_pools \u003d pci_device_pool.from_pci_stats(driver.pci_stats)"},{"line_number":880,"context_line":"        observed_pools \u003d self.tracker.compute_node.pci_device_pools"},{"line_number":881,"context_line":"        self.assertEqualPciDevicePoolList(expected_pools, observed_pools)"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa32b979_ec49c2d1","line":878,"updated":"2015-06-15 16:41:10.000000000","message":"Object notation above please...","commit_id":"5b6f304238d617f91cae95e8cfa53271a774b209"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"573a3a57c6018b19c71fbffa4200001ee44337a4","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        }"},{"line_number":266,"context_line":"        if values:"},{"line_number":267,"context_line":"            compute.update(values)"},{"line_number":268,"context_line":"        return compute"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    def _create_compute_node_obj(self, context, values\u003dNone):"},{"line_number":271,"context_line":"        compute \u003d self._create_compute_node(values\u003dvalues)"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_12e9831a","line":268,"updated":"2015-06-22 17:57:10.000000000","message":"Remove the _create_compute_node_obj() method below and change line 268 above to just this:\n\n return objects.ComputeNode(**compute)","commit_id":"f908ca0d25072719fdfe4c929c8c09f32e3eeb18"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"e51dcf45c0f5869af1014cab10eb1c6b1b1448db","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        }"},{"line_number":266,"context_line":"        if values:"},{"line_number":267,"context_line":"            compute.update(values)"},{"line_number":268,"context_line":"        return compute"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    def _create_compute_node_obj(self, context, values\u003dNone):"},{"line_number":271,"context_line":"        compute \u003d self._create_compute_node(values\u003dvalues)"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba3cc151_74e31b34","line":268,"in_reply_to":"fa32b979_12e9831a","updated":"2015-06-30 17:20:01.000000000","message":"the above code creates a compute_node data structure in the db format. It is used in stubs that mimic being the db.","commit_id":"f908ca0d25072719fdfe4c929c8c09f32e3eeb18"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"573a3a57c6018b19c71fbffa4200001ee44337a4","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        compute_obj \u003d objects.ComputeNode()"},{"line_number":273,"context_line":"        compute_obj \u003d objects.ComputeNode._from_db_object("},{"line_number":274,"context_line":"            context, compute_obj, compute)"},{"line_number":275,"context_line":"        return compute_obj"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def _create_service(self, host\u003d\"fakehost\", compute\u003dNone):"},{"line_number":278,"context_line":"        if compute:"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_3285a758","line":275,"updated":"2015-06-22 17:57:10.000000000","message":"Please remove the above. The entire thing can be a simple change to the _create_compute_node() method (see above comment)...","commit_id":"f908ca0d25072719fdfe4c929c8c09f32e3eeb18"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"e51dcf45c0f5869af1014cab10eb1c6b1b1448db","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        compute_obj \u003d objects.ComputeNode()"},{"line_number":273,"context_line":"        compute_obj \u003d objects.ComputeNode._from_db_object("},{"line_number":274,"context_line":"            context, compute_obj, compute)"},{"line_number":275,"context_line":"        return compute_obj"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def _create_service(self, host\u003d\"fakehost\", compute\u003dNone):"},{"line_number":278,"context_line":"        if compute:"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba3cc151_f4440b1c","line":275,"in_reply_to":"fa32b979_3285a758","updated":"2015-06-30 17:20:01.000000000","message":"This method creates an object. It uses the data structure in db format to create it by reading it in as db format.","commit_id":"f908ca0d25072719fdfe4c929c8c09f32e3eeb18"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"573a3a57c6018b19c71fbffa4200001ee44337a4","unresolved":false,"context_lines":[{"line_number":526,"context_line":"        driver \u003d self._driver()"},{"line_number":527,"context_line":""},{"line_number":528,"context_line":"        tracker \u003d resource_tracker.ResourceTracker(host, driver, node)"},{"line_number":529,"context_line":"        tracker.compute_node \u003d self._create_compute_node_obj(self.context)"},{"line_number":530,"context_line":"        tracker.ext_resources_handler \u003d \\"},{"line_number":531,"context_line":"            resources.ResourceHandler(RESOURCE_NAMES, True)"},{"line_number":532,"context_line":"        return tracker"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_92dd9372","line":529,"updated":"2015-06-22 17:57:10.000000000","message":"change this back. not needed. see comments above.","commit_id":"f908ca0d25072719fdfe4c929c8c09f32e3eeb18"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"573a3a57c6018b19c71fbffa4200001ee44337a4","unresolved":false,"context_lines":[{"line_number":816,"context_line":"        self.assertEqual(0, self.tracker.compute_node[\u0027current_workload\u0027])"},{"line_number":817,"context_line":"        expected \u003d pci_device_pool.from_pci_stats(driver.pci_stats)"},{"line_number":818,"context_line":"        self.assertEqual(expected,"},{"line_number":819,"context_line":"                         self.tracker.compute_node[\u0027pci_device_pools\u0027])"},{"line_number":820,"context_line":""},{"line_number":821,"context_line":""},{"line_number":822,"context_line":"class SchedulerClientTrackerTestCase(BaseTrackerTestCase):"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_52e70b40","line":819,"updated":"2015-06-22 17:57:10.000000000","message":"object notation please.","commit_id":"f908ca0d25072719fdfe4c929c8c09f32e3eeb18"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"573a3a57c6018b19c71fbffa4200001ee44337a4","unresolved":false,"context_lines":[{"line_number":1519,"context_line":"        stats \u003d self.tracker.compute_node.stats"},{"line_number":1520,"context_line":"        # compute node stats are coerced to strings"},{"line_number":1521,"context_line":"        expected_stats \u003d copy.deepcopy(FAKE_VIRT_STATS_COERCED)"},{"line_number":1522,"context_line":"        for k, v in self.tracker.stats.iteritems():"},{"line_number":1523,"context_line":"            expected_stats[k] \u003d six.text_type(v)"},{"line_number":1524,"context_line":"        self.assertEqual(expected_stats, stats)"},{"line_number":1525,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_d2c9dbad","line":1522,"updated":"2015-06-22 17:57:10.000000000","message":"Please use items() instead of iteritems().","commit_id":"f908ca0d25072719fdfe4c929c8c09f32e3eeb18"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"573a3a57c6018b19c71fbffa4200001ee44337a4","unresolved":false,"context_lines":[{"line_number":1551,"context_line":"        stats \u003d self.tracker.compute_node.stats"},{"line_number":1552,"context_line":"        # compute node stats are coerced to strings"},{"line_number":1553,"context_line":"        expected_stats \u003d copy.deepcopy(FAKE_VIRT_STATS_COERCED)"},{"line_number":1554,"context_line":"        for k, v in self.tracker.stats.iteritems():"},{"line_number":1555,"context_line":"            expected_stats[k] \u003d six.text_type(v)"},{"line_number":1556,"context_line":"        self.assertEqual(expected_stats, stats)"},{"line_number":1557,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_92e7d311","line":1554,"updated":"2015-06-22 17:57:10.000000000","message":"ditto about items()","commit_id":"f908ca0d25072719fdfe4c929c8c09f32e3eeb18"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"b80c75ee2cfe7761b340758e07d03b55211532e3","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    def _create_compute_node_obj(self, context, values\u003dNone):"},{"line_number":271,"context_line":"        compute \u003d self._create_compute_node(values\u003dvalues)"},{"line_number":272,"context_line":"        compute[\u0027stats\u0027] \u003d jsonutils.loads(compute[\u0027stats\u0027])"},{"line_number":273,"context_line":"        return objects.ComputeNode(context\u003dcontext, **compute)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def _create_service(self, host\u003d\"fakehost\", compute\u003dNone):"},{"line_number":276,"context_line":"        if compute:"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba3cc151_913b51d1","line":273,"updated":"2015-06-30 17:18:01.000000000","message":"_create_compute_node() creates a data structure that is used in the tests to represent what is in the database. Tests use this dict in methods that stub out calls to the database. So it should be a dict and it is in the database format.\n\n_create_compute_node_obj() creates an object from the database format, so it should create it by reading it in using ComputeNode._form_db_object(). In fact that is why the code above has to handle the stats field specially, the conversion would be done automatically by ComputeNode._form_db_object().\n\nSo I am going to change this code back to the way it was before, using _form_db_object(). I\u0027ll also remove the values parameter because it is never used.\n\nI know this is all going away - but I think its best to make it reflect what it actually is. I have added comments.","commit_id":"c771822b31fd95df0ec480520d80dd5371e0f44b"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"80fe68fc4b6846b4fb678b0a5909ee365527947f","unresolved":false,"context_lines":[{"line_number":814,"context_line":"        self.assertEqual(0, self.tracker.compute_node[\u0027current_workload\u0027])"},{"line_number":815,"context_line":"        expected \u003d pci_device_pool.from_pci_stats(driver.pci_stats)"},{"line_number":816,"context_line":"        self.assertEqual(expected,"},{"line_number":817,"context_line":"                         self.tracker.compute_node[\u0027pci_device_pools\u0027])"},{"line_number":818,"context_line":""},{"line_number":819,"context_line":""},{"line_number":820,"context_line":"class SchedulerClientTrackerTestCase(BaseTrackerTestCase):"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba3cc151_6bb5b1cb","line":817,"updated":"2015-06-29 18:38:59.000000000","message":"Dot notation","commit_id":"c771822b31fd95df0ec480520d80dd5371e0f44b"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"b80c75ee2cfe7761b340758e07d03b55211532e3","unresolved":false,"context_lines":[{"line_number":814,"context_line":"        self.assertEqual(0, self.tracker.compute_node[\u0027current_workload\u0027])"},{"line_number":815,"context_line":"        expected \u003d pci_device_pool.from_pci_stats(driver.pci_stats)"},{"line_number":816,"context_line":"        self.assertEqual(expected,"},{"line_number":817,"context_line":"                         self.tracker.compute_node[\u0027pci_device_pools\u0027])"},{"line_number":818,"context_line":""},{"line_number":819,"context_line":""},{"line_number":820,"context_line":"class SchedulerClientTrackerTestCase(BaseTrackerTestCase):"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba3cc151_7ef45f86","line":817,"in_reply_to":"ba3cc151_6bb5b1cb","updated":"2015-06-30 17:18:01.000000000","message":"Went through whole file searching for compute_node[\u0027 - there were a lot of these. Now changed.","commit_id":"c771822b31fd95df0ec480520d80dd5371e0f44b"}],"nova/tests/unit/compute/test_tracker.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"88d4c3d44bc96125196c67cc473e9a55d25a5277","unresolved":false,"context_lines":[{"line_number":895,"context_line":"            hypervisor_hostname\u003dresources[\u0027hypervisor_hostname\u0027],"},{"line_number":896,"context_line":"            # NOTE(jaypipes): This will go away once"},{"line_number":897,"context_line":"            #                 detach-compute-node-from-service blueprint"},{"line_number":898,"context_line":"            #                 is done"},{"line_number":899,"context_line":"            service_id\u003d1,"},{"line_number":900,"context_line":"            # NOTE(sbauza): ResourceTracker adds host field"},{"line_number":901,"context_line":"            host\u003d\u0027fake-host\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_b4960c4a","line":898,"updated":"2015-05-29 13:37:34.000000000","message":"Does this comment still make sense? because we will not remove this afair","commit_id":"d7519efffb965abe30d9bb3f23330c39ec631ed7"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"88aee134a679a90936832b743fcfdb3c219af3ab","unresolved":false,"context_lines":[{"line_number":895,"context_line":"            hypervisor_hostname\u003dresources[\u0027hypervisor_hostname\u0027],"},{"line_number":896,"context_line":"            # NOTE(jaypipes): This will go away once"},{"line_number":897,"context_line":"            #                 detach-compute-node-from-service blueprint"},{"line_number":898,"context_line":"            #                 is done"},{"line_number":899,"context_line":"            service_id\u003d1,"},{"line_number":900,"context_line":"            # NOTE(sbauza): ResourceTracker adds host field"},{"line_number":901,"context_line":"            host\u003d\u0027fake-host\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"5afe65bd_a29db90b","line":898,"in_reply_to":"7a016987_4266e851","updated":"2015-06-05 13:10:31.000000000","message":"I think you\u0027re saying leave the comment in - so I have done. It will be a separate change to remove it. Let me know if I misunderstood.","commit_id":"d7519efffb965abe30d9bb3f23330c39ec631ed7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"13bf91e6d1fc54d589335ba24dc3ba33e556fdc7","unresolved":false,"context_lines":[{"line_number":895,"context_line":"            hypervisor_hostname\u003dresources[\u0027hypervisor_hostname\u0027],"},{"line_number":896,"context_line":"            # NOTE(jaypipes): This will go away once"},{"line_number":897,"context_line":"            #                 detach-compute-node-from-service blueprint"},{"line_number":898,"context_line":"            #                 is done"},{"line_number":899,"context_line":"            service_id\u003d1,"},{"line_number":900,"context_line":"            # NOTE(sbauza): ResourceTracker adds host field"},{"line_number":901,"context_line":"            host\u003d\u0027fake-host\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_4266e851","line":898,"in_reply_to":"7a016987_b4960c4a","updated":"2015-05-29 20:24:19.000000000","message":"Yeah, Jay was a bit too happy to see the bp implemented, but since we need to wait a few cycles before removing the service_id, we can remove that comment.\n\nThat said, I think this has to be removed in a separate change, since it\u0027s not related to this one.","commit_id":"d7519efffb965abe30d9bb3f23330c39ec631ed7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b9e2d79de5e5a13c89e29dac8f689396be77c4e5","unresolved":false,"context_lines":[{"line_number":986,"context_line":"            vcpus\u003d4,"},{"line_number":987,"context_line":"            running_vms\u003d0"},{"line_number":988,"context_line":"        )"},{"line_number":989,"context_line":"        expected_resources \u003d copy.deepcopy(compute)"},{"line_number":990,"context_line":"        expected_resources.stats \u003d {}"},{"line_number":991,"context_line":"        expected_resources.vcpus \u003d 4"},{"line_number":992,"context_line":"        expected_resources.vcpus_used \u003d 2"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa32b979_8ced968d","line":989,"updated":"2015-06-15 16:41:10.000000000","message":"compute.clone(), not copy.deepcopy() on an object.","commit_id":"5b6f304238d617f91cae95e8cfa53271a774b209"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b9e2d79de5e5a13c89e29dac8f689396be77c4e5","unresolved":false,"context_lines":[{"line_number":1278,"context_line":"        dst_rt.update_available_resource(self.ctx)"},{"line_number":1279,"context_line":""},{"line_number":1280,"context_line":"        # Register the instance with dst_rt"},{"line_number":1281,"context_line":"        expected \u003d copy.deepcopy(dst_rt.compute_node)"},{"line_number":1282,"context_line":"        with mock.patch.object(dst_instance, \u0027save\u0027):"},{"line_number":1283,"context_line":"            dst_rt.instance_claim(self.ctx, dst_instance)"},{"line_number":1284,"context_line":"        self.adjust_expected(expected, new_itype)"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa32b979_acbc1a6d","line":1281,"updated":"2015-06-15 16:41:10.000000000","message":"Please use dst_rt.clone()","commit_id":"5b6f304238d617f91cae95e8cfa53271a774b209"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"1c054456136ab76b9a0115f6e35fb63f37d99ac7","unresolved":false,"context_lines":[{"line_number":895,"context_line":"        # when creating a compute node."},{"line_number":896,"context_line":"        expected_compute \u003d objects.ComputeNode("},{"line_number":897,"context_line":"            host_ip\u003dresources[\u0027host_ip\u0027],"},{"line_number":898,"context_line":"            vcpus\u003d0,"},{"line_number":899,"context_line":"            memory_mb\u003dresources[\u0027memory_mb\u0027],"},{"line_number":900,"context_line":"            local_gb\u003dresources[\u0027local_gb\u0027],"},{"line_number":901,"context_line":"            cpu_info\u003dresources[\u0027cpu_info\u0027],"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba3cc151_c14d323f","line":898,"updated":"2015-07-02 06:42:32.000000000","message":"changed in patch set 18 - should be init from resources   - this is attempting to init from ERT, which can\u0027t be done here (see comment in resource_tracker.py).","commit_id":"7f6bc2244049b44b5e9c894f01ef83ecea0f5c2e"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"1c054456136ab76b9a0115f6e35fb63f37d99ac7","unresolved":false,"context_lines":[{"line_number":912,"context_line":"            service_id\u003d1,"},{"line_number":913,"context_line":"            # NOTE(sbauza): ResourceTracker adds host field"},{"line_number":914,"context_line":"            host\u003d\u0027fake-host\u0027,"},{"line_number":915,"context_line":"            stats\u003d{},"},{"line_number":916,"context_line":"        )"},{"line_number":917,"context_line":""},{"line_number":918,"context_line":"        self.rt._init_compute_node(mock.sentinel.ctx, resources)"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba3cc151_a167ceb5","line":915,"updated":"2015-07-02 06:42:32.000000000","message":"added in patch set 18 - should not be init resources  - this is attempting to init from ERT, which can\u0027t be done here (see comment in resource_tracker.py).","commit_id":"7f6bc2244049b44b5e9c894f01ef83ecea0f5c2e"}]}
