)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"2d718b675c941c6bfa90dc6686b1e79861d58a8e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Use compute_node consistently in ResourceTracker"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is the second step to convert the ResourceTracker compute"},{"line_number":10,"context_line":"node property to be a ComputeNode object."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"The methods that calculate resource usage in the ResourceTracker"},{"line_number":13,"context_line":"sometimes work on a dict data structure obtained from the virt"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a80dd14_1c1c576a","line":10,"updated":"2015-03-10 19:07:47.000000000","message":"This first line might be confusing. The change prepares the code so that a later change can convert compute_node to be an object. In this change it is still a dict. Will find better wording.","commit_id":"b8253be6a589674dff8aa4e1416d42a15075e3a0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ef14caba6d850067036f928744ba2e85e63f85f0","unresolved":false,"context_lines":[{"line_number":19,"context_line":"The result of the changes are always copied into the"},{"line_number":20,"context_line":"self.compute_node."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"This mixing of data structures wont work if self.compute_node is"},{"line_number":23,"context_line":"converted to be a ComputeNode object instead of a dict. The"},{"line_number":24,"context_line":"previous patch in this series initialises self.compute_node at"},{"line_number":25,"context_line":"the start of _update_available_resources() so it has a value at"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"9aa53dc9_6fb7f4d8","line":22,"updated":"2015-04-07 23:49:07.000000000","message":"s/wont/won\u0027t/","commit_id":"66fcfec50ca1d7c60efa85833439617d1bead5b5"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"a4f8def88749ce28f88735a485ddbb3a2c6436d4","unresolved":false,"context_lines":[{"line_number":19,"context_line":"The result of the changes are always copied into the"},{"line_number":20,"context_line":"self.compute_node."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"This mixing of data structures wont work if self.compute_node is"},{"line_number":23,"context_line":"converted to be a ComputeNode object instead of a dict. The"},{"line_number":24,"context_line":"previous patch in this series initialises self.compute_node at"},{"line_number":25,"context_line":"the start of _update_available_resources() so it has a value at"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3acd31a7_92ad6d9d","line":22,"in_reply_to":"9aa53dc9_6fb7f4d8","updated":"2015-05-07 00:47:01.000000000","message":"Done","commit_id":"66fcfec50ca1d7c60efa85833439617d1bead5b5"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"91ef3b69921581abce9fdcf7c0a847741bc25351","unresolved":false,"context_lines":[{"line_number":444,"context_line":"                            \u0027numa_topology\u0027])"},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"        # Now calculate usage based on instance utilization:"},{"line_number":447,"context_line":"        self._update_usage_from_instances(context,"},{"line_number":448,"context_line":"                                          self.compute_node, instances)"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"        # Grab all in-progress migrations:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_fbeb1ca1","line":447,"updated":"2015-03-10 13:52:22.000000000","message":"All of these \u0027_update_usage_from_*\u0027 methods are now getting a compute_node object instead of a resources dict. Even with dict compatibility, I\u0027d prefer to see those methods updated to use the object.","commit_id":"b8253be6a589674dff8aa4e1416d42a15075e3a0"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"2d718b675c941c6bfa90dc6686b1e79861d58a8e","unresolved":false,"context_lines":[{"line_number":444,"context_line":"                            \u0027numa_topology\u0027])"},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"        # Now calculate usage based on instance utilization:"},{"line_number":447,"context_line":"        self._update_usage_from_instances(context,"},{"line_number":448,"context_line":"                                          self.compute_node, instances)"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"        # Grab all in-progress migrations:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_f959555c","line":447,"in_reply_to":"9a80dd14_fbeb1ca1","updated":"2015-03-10 19:07:47.000000000","message":"compute_node is not an object at this point - it is still a dict. The change is that we are not working on resources. However, it would be better if the parameters used in the methods reflected the change. So will do that.","commit_id":"b8253be6a589674dff8aa4e1416d42a15075e3a0"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"8660562bf807b8b25d96e5a088047ecff2347da0","unresolved":false,"context_lines":[{"line_number":435,"context_line":"        self.stats.digest_stats(resources.get(\u0027stats\u0027))"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"        # now copy resources to compute node"},{"line_number":438,"context_line":"        self.compute_node.update(resources)"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"        # Grab all instances assigned to this node:"},{"line_number":441,"context_line":"        instances \u003d objects.InstanceList.get_by_host_and_node("}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_005bae87","line":438,"updated":"2015-03-12 14:26:51.000000000","message":"Curious why all of the stuff added here does not happen in the _init_compute_node method... that would make more sense to me...","commit_id":"bcea0c26b3cfaa251bdc1ef369810e8f521722f5"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"72a09dd23e18bc8b23f5afb053e228698dd65220","unresolved":false,"context_lines":[{"line_number":435,"context_line":"        self.stats.digest_stats(resources.get(\u0027stats\u0027))"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"        # now copy resources to compute node"},{"line_number":438,"context_line":"        self.compute_node.update(resources)"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"        # Grab all instances assigned to this node:"},{"line_number":441,"context_line":"        instances \u003d objects.InstanceList.get_by_host_and_node("}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_52d8147f","line":438,"in_reply_to":"9a80dd14_005bae87","updated":"2015-03-12 15:41:35.000000000","message":"Actually, I think you are right. If you look at a later patch you will see I move the update into a separate method that is called form _init_compute_node(), so it is going that way eventually. I will change this now and move the update, stats, and pci together.","commit_id":"bcea0c26b3cfaa251bdc1ef369810e8f521722f5"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"8660562bf807b8b25d96e5a088047ecff2347da0","unresolved":false,"context_lines":[{"line_number":475,"context_line":"        self.compute_node[\u0027metrics\u0027] \u003d jsonutils.dumps(metrics)"},{"line_number":476,"context_line":"        self._sync_compute_node(context)"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"    def _sync_compute_node(self, context):"},{"line_number":479,"context_line":"        \"\"\"Update the compute node DB record.\"\"\""},{"line_number":480,"context_line":"        # just update the record:"},{"line_number":481,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_235c3ced","line":478,"updated":"2015-03-12 14:26:51.000000000","message":"As said on the previous commit - this method should maybe just get inlined?","commit_id":"bcea0c26b3cfaa251bdc1ef369810e8f521722f5"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"72a09dd23e18bc8b23f5afb053e228698dd65220","unresolved":false,"context_lines":[{"line_number":475,"context_line":"        self.compute_node[\u0027metrics\u0027] \u003d jsonutils.dumps(metrics)"},{"line_number":476,"context_line":"        self._sync_compute_node(context)"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"    def _sync_compute_node(self, context):"},{"line_number":479,"context_line":"        \"\"\"Update the compute node DB record.\"\"\""},{"line_number":480,"context_line":"        # just update the record:"},{"line_number":481,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_17b84ee4","line":478,"in_reply_to":"9a80dd14_235c3ced","updated":"2015-03-12 15:41:35.000000000","message":"will do in previous patch","commit_id":"bcea0c26b3cfaa251bdc1ef369810e8f521722f5"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"8660562bf807b8b25d96e5a088047ecff2347da0","unresolved":false,"context_lines":[{"line_number":611,"context_line":"        if \"service\" in self.compute_node:"},{"line_number":612,"context_line":"            del self.compute_node[\u0027service\u0027]"},{"line_number":613,"context_line":"        # Persist the stats to the Scheduler"},{"line_number":614,"context_line":"        self._update_resource_stats(context, self.compute_node)"},{"line_number":615,"context_line":"        if self.pci_tracker:"},{"line_number":616,"context_line":"            self.pci_tracker.save(context)"},{"line_number":617,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_c0d35636","line":614,"updated":"2015-03-12 14:26:51.000000000","message":"how come _update_resource_stats didn\u0027t get the same treatment of dropping the extra arg?","commit_id":"bcea0c26b3cfaa251bdc1ef369810e8f521722f5"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"72a09dd23e18bc8b23f5afb053e228698dd65220","unresolved":false,"context_lines":[{"line_number":611,"context_line":"        if \"service\" in self.compute_node:"},{"line_number":612,"context_line":"            del self.compute_node[\u0027service\u0027]"},{"line_number":613,"context_line":"        # Persist the stats to the Scheduler"},{"line_number":614,"context_line":"        self._update_resource_stats(context, self.compute_node)"},{"line_number":615,"context_line":"        if self.pci_tracker:"},{"line_number":616,"context_line":"            self.pci_tracker.save(context)"},{"line_number":617,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_b72ce24b","line":614,"in_reply_to":"9a80dd14_c0d35636","updated":"2015-03-12 15:41:35.000000000","message":"Its not changed because it is used with cn instead of self.compute_node in _init_compute_node(). But actually that call isn\u0027t needed any more. I do get rid of it in a later patch but it does make more sense to do it here. I will change this.","commit_id":"bcea0c26b3cfaa251bdc1ef369810e8f521722f5"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c12f41543506ec578f12706bec4fa311d57479d3","unresolved":false,"context_lines":[{"line_number":256,"context_line":"                    self.pci_tracker.update_pci_for_migration(context,"},{"line_number":257,"context_line":"                                                              instance,"},{"line_number":258,"context_line":"                                                              sign\u003d-1)"},{"line_number":259,"context_line":"                self._update_usage(usage, sign\u003d-1)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"                ctxt \u003d context.elevated()"},{"line_number":262,"context_line":"                self._update(ctxt)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_80f888c5","line":259,"updated":"2015-03-18 13:19:12.000000000","message":"see my comment below on removing the context arg","commit_id":"2c246dda689b6b579d4a4e0048395b70699f254b"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"5d18875675e82c87c7dd7347363fe113e514569a","unresolved":false,"context_lines":[{"line_number":256,"context_line":"                    self.pci_tracker.update_pci_for_migration(context,"},{"line_number":257,"context_line":"                                                              instance,"},{"line_number":258,"context_line":"                                                              sign\u003d-1)"},{"line_number":259,"context_line":"                self._update_usage(usage, sign\u003d-1)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"                ctxt \u003d context.elevated()"},{"line_number":262,"context_line":"                self._update(ctxt)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a6ced46_f4bd54b8","line":259,"in_reply_to":"9a80dd14_80f888c5","updated":"2015-03-25 19:39:51.000000000","message":"See replies to those comments.","commit_id":"2c246dda689b6b579d4a4e0048395b70699f254b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c12f41543506ec578f12706bec4fa311d57479d3","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        self.stats.digest_stats(resources.get(\u0027stats\u0027))"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        # now copy reset to compute_node"},{"line_number":364,"context_line":"        self.compute_node.update(resources)"},{"line_number":365,"context_line":"        self.compute_node.pop(\u0027pci_passthrough_devices\u0027, None)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _get_host_metrics(self, context, nodename):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_405850fa","line":364,"updated":"2015-03-18 13:19:12.000000000","message":"you left above a TODO saying that once we\u0027ll be using the ComputeNode object, it would be refactored. IMHO, that would be nice to leave another related comment here (because we really want to not use the dict compatibility for an object)","commit_id":"2c246dda689b6b579d4a4e0048395b70699f254b"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"5d18875675e82c87c7dd7347363fe113e514569a","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        self.stats.digest_stats(resources.get(\u0027stats\u0027))"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        # now copy reset to compute_node"},{"line_number":364,"context_line":"        self.compute_node.update(resources)"},{"line_number":365,"context_line":"        self.compute_node.pop(\u0027pci_passthrough_devices\u0027, None)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _get_host_metrics(self, context, nodename):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a6ced46_148110fb","line":364,"in_reply_to":"9a80dd14_405850fa","updated":"2015-03-25 19:39:51.000000000","message":"Will do.","commit_id":"2c246dda689b6b579d4a4e0048395b70699f254b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c12f41543506ec578f12706bec4fa311d57479d3","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        # now copy reset to compute_node"},{"line_number":364,"context_line":"        self.compute_node.update(resources)"},{"line_number":365,"context_line":"        self.compute_node.pop(\u0027pci_passthrough_devices\u0027, None)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _get_host_metrics(self, context, nodename):"},{"line_number":368,"context_line":"        \"\"\"Get the metrics from monitors and"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_8095e889","line":365,"updated":"2015-03-18 13:19:12.000000000","message":"a comment would be worth it, because I don\u0027t see why you need to drop that field.","commit_id":"2c246dda689b6b579d4a4e0048395b70699f254b"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"5d18875675e82c87c7dd7347363fe113e514569a","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        # now copy reset to compute_node"},{"line_number":364,"context_line":"        self.compute_node.update(resources)"},{"line_number":365,"context_line":"        self.compute_node.pop(\u0027pci_passthrough_devices\u0027, None)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _get_host_metrics(self, context, nodename):"},{"line_number":368,"context_line":"        \"\"\"Get the metrics from monitors and"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a6ced46_b4711c46","line":365,"in_reply_to":"9a80dd14_8095e889","updated":"2015-03-25 19:39:51.000000000","message":"Yes, very much agree, I will do that.","commit_id":"2c246dda689b6b579d4a4e0048395b70699f254b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c12f41543506ec578f12706bec4fa311d57479d3","unresolved":false,"context_lines":[{"line_number":630,"context_line":"        self.scheduler_client.update_resource_stats("},{"line_number":631,"context_line":"            context, (self.host, self.nodename), stats)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"    def _update_usage(self, usage, sign\u003d1):"},{"line_number":634,"context_line":"        mem_usage \u003d usage[\u0027memory_mb\u0027]"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        overhead \u003d self.driver.estimate_instance_overhead(usage)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_65156648","line":633,"updated":"2015-03-18 13:19:12.000000000","message":"nit : well, context was already useless so it\u0027s good to clean it up, but I would have prefered to see it on a separate change because that confused me that you changed the signature.","commit_id":"2c246dda689b6b579d4a4e0048395b70699f254b"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"5d18875675e82c87c7dd7347363fe113e514569a","unresolved":false,"context_lines":[{"line_number":630,"context_line":"        self.scheduler_client.update_resource_stats("},{"line_number":631,"context_line":"            context, (self.host, self.nodename), stats)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"    def _update_usage(self, usage, sign\u003d1):"},{"line_number":634,"context_line":"        mem_usage \u003d usage[\u0027memory_mb\u0027]"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        overhead \u003d self.driver.estimate_instance_overhead(usage)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a6ced46_34728cad","line":633,"in_reply_to":"9a80dd14_65156648","updated":"2015-03-25 19:39:51.000000000","message":"I get what you mean. I was changing the signature anyway, so I thought it made sense to correct it.","commit_id":"2c246dda689b6b579d4a4e0048395b70699f254b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c12f41543506ec578f12706bec4fa311d57479d3","unresolved":false,"context_lines":[{"line_number":844,"context_line":""},{"line_number":845,"context_line":"        return orphans"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":"    def _update_usage_from_orphans(self, orphans):"},{"line_number":848,"context_line":"        \"\"\"Include orphaned instances in usage.\"\"\""},{"line_number":849,"context_line":"        for orphan in orphans:"},{"line_number":850,"context_line":"            memory_mb \u003d orphan[\u0027memory_mb\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_004d7872","line":847,"updated":"2015-03-18 13:19:12.000000000","message":"correlated change to removing the context arg. As I said, it creates more changes while it was not needed.","commit_id":"2c246dda689b6b579d4a4e0048395b70699f254b"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"5d18875675e82c87c7dd7347363fe113e514569a","unresolved":false,"context_lines":[{"line_number":844,"context_line":""},{"line_number":845,"context_line":"        return orphans"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":"    def _update_usage_from_orphans(self, orphans):"},{"line_number":848,"context_line":"        \"\"\"Include orphaned instances in usage.\"\"\""},{"line_number":849,"context_line":"        for orphan in orphans:"},{"line_number":850,"context_line":"            memory_mb \u003d orphan[\u0027memory_mb\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a6ced46_9418a01f","line":847,"in_reply_to":"9a80dd14_004d7872","updated":"2015-03-25 19:39:51.000000000","message":"In this case I did remove the only thing using the context, so it is relevant to the change. Also I am changing the signature anyway so this change makes the signature what it should be.","commit_id":"2c246dda689b6b579d4a4e0048395b70699f254b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2443fc28ed6828954bb1b9ed704074c55468a160","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        # in compute_node."},{"line_number":372,"context_line":"        # TODO(pmurray): this will be removed when the virt resource copy"},{"line_number":373,"context_line":"        # method is used."},{"line_number":374,"context_line":"        self.compute_node.pop(\u0027pci_passthrough_devices\u0027, None)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"    def _get_host_metrics(self, context, nodename):"},{"line_number":377,"context_line":"        \"\"\"Get the metrics from monitors and"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a6ced46_65fc3973","line":374,"updated":"2015-03-26 10:27:34.000000000","message":"honestly, as we\u0027re post-K3 and as this patch won\u0027t be merged until Liberty, could you please propose a dependent patch using the virt resource copy method before this one so it would be not needed to remove this field ?\n\nLemme know if that\u0027s really hard to do, but I really want to have a RT really clean and your series is doing this very nicely.","commit_id":"7e3f92b99d75a4d326a367c99cea268e0a0052c9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e883c324dc10aa3c34e24d78d802421399920786","unresolved":false,"context_lines":[{"line_number":353,"context_line":"        # is cleaned up."},{"line_number":354,"context_line":"        self._copy_resources(resources)"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    def _copy_resources(self, resources):"},{"line_number":357,"context_line":"        \"\"\"Copy resource values to initialise compute_node and related"},{"line_number":358,"context_line":"        data structures."},{"line_number":359,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa53dc9_14af5d95","line":356,"updated":"2015-04-07 22:55:26.000000000","message":"well, I know that we already cover this change, but it would be maybe better if we could just test this method separately and mock everywhere when it\u0027s called.\n\nMaybe that\u0027s a nit, but as Jay helped us by rewriting the test_tracker, I just want to make sure that we\u0027re not going backwards by having some big unittests doing all the coverage.\n\nThat said, that\u0027s not needed to be done within this patch.","commit_id":"66fcfec50ca1d7c60efa85833439617d1bead5b5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ef14caba6d850067036f928744ba2e85e63f85f0","unresolved":false,"context_lines":[{"line_number":575,"context_line":"            LOG.info(_LI(\"Total usable vcpus: %(tcpu)s, \""},{"line_number":576,"context_line":"                        \"total allocated vcpus: %(ucpu)s\"),"},{"line_number":577,"context_line":"                        {\u0027tcpu\u0027: vcpus,"},{"line_number":578,"context_line":"                         \u0027ucpu\u0027: self.compute_node[\u0027vcpus_used\u0027]})"},{"line_number":579,"context_line":"        else:"},{"line_number":580,"context_line":"            tcpu \u003d 0"},{"line_number":581,"context_line":"            ucpu \u003d 0"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa53dc9_2f456c6f","line":578,"updated":"2015-04-07 23:49:07.000000000","message":"Could just be:\n\n \u0027ucpu\u0027: ucpu})\n\nI actually don\u0027t really see the point of the above log message, since all the information in it is always written in the log message on line 583 anyway.","commit_id":"66fcfec50ca1d7c60efa85833439617d1bead5b5"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"a4f8def88749ce28f88735a485ddbb3a2c6436d4","unresolved":false,"context_lines":[{"line_number":575,"context_line":"            LOG.info(_LI(\"Total usable vcpus: %(tcpu)s, \""},{"line_number":576,"context_line":"                        \"total allocated vcpus: %(ucpu)s\"),"},{"line_number":577,"context_line":"                        {\u0027tcpu\u0027: vcpus,"},{"line_number":578,"context_line":"                         \u0027ucpu\u0027: self.compute_node[\u0027vcpus_used\u0027]})"},{"line_number":579,"context_line":"        else:"},{"line_number":580,"context_line":"            tcpu \u003d 0"},{"line_number":581,"context_line":"            ucpu \u003d 0"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa53dc9_a17863c5","line":578,"in_reply_to":"9aa53dc9_2f456c6f","updated":"2015-05-07 00:47:01.000000000","message":"Well spotted, I\u0027ll change the line as you say in the next spin. Won\u0027t change the log message though - outside scope of this change.","commit_id":"66fcfec50ca1d7c60efa85833439617d1bead5b5"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6b2c03be5c40a442d942e6937b53d329c621995f","unresolved":false,"context_lines":[{"line_number":625,"context_line":""},{"line_number":626,"context_line":"    def _update_resource_stats(self, context, values):"},{"line_number":627,"context_line":"        stats \u003d values.copy()"},{"line_number":628,"context_line":"        stats[\u0027id\u0027] \u003d self.compute_node[\u0027id\u0027]"},{"line_number":629,"context_line":"        self.scheduler_client.update_resource_stats("},{"line_number":630,"context_line":"            context, (self.host, self.nodename), stats)"},{"line_number":631,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1aca2d91_464c2942","line":628,"updated":"2015-05-07 08:12:12.000000000","message":"nit, This line is needless","commit_id":"3cb5398a2209948685c226ec4f1124d5d48fa86d"}],"nova/tests/unit/compute/test_resource_tracker.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ef14caba6d850067036f928744ba2e85e63f85f0","unresolved":false,"context_lines":[{"line_number":733,"context_line":""},{"line_number":734,"context_line":"    def test_update_resource(self):"},{"line_number":735,"context_line":"        self.tracker._write_ext_resources \u003d mock.Mock()"},{"line_number":736,"context_line":"        expected \u003d self.tracker.compute_node"},{"line_number":737,"context_line":"        self.tracker._update(self.context)"},{"line_number":738,"context_line":"        self.tracker.scheduler_client.update_resource_stats.\\"},{"line_number":739,"context_line":"            assert_called_once_with(self.context,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa53dc9_0a7296ad","line":736,"updated":"2015-04-07 23:49:07.000000000","message":"you need to use a copy.deepcopy() on the above. Otherwise, you are not guaranteed that you are not comparing the changed values to the same values :)","commit_id":"66fcfec50ca1d7c60efa85833439617d1bead5b5"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"37e6674db56844816974306288a21e8a80ed2443","unresolved":false,"context_lines":[{"line_number":733,"context_line":""},{"line_number":734,"context_line":"    def test_update_resource(self):"},{"line_number":735,"context_line":"        self.tracker._write_ext_resources \u003d mock.Mock()"},{"line_number":736,"context_line":"        expected \u003d self.tracker.compute_node"},{"line_number":737,"context_line":"        self.tracker._update(self.context)"},{"line_number":738,"context_line":"        self.tracker.scheduler_client.update_resource_stats.\\"},{"line_number":739,"context_line":"            assert_called_once_with(self.context,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa53dc9_485c05ed","line":736,"in_reply_to":"9aa53dc9_0a7296ad","updated":"2015-04-08 16:58:42.000000000","message":"Oh right, dammit.","commit_id":"66fcfec50ca1d7c60efa85833439617d1bead5b5"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"a4f8def88749ce28f88735a485ddbb3a2c6436d4","unresolved":false,"context_lines":[{"line_number":733,"context_line":""},{"line_number":734,"context_line":"    def test_update_resource(self):"},{"line_number":735,"context_line":"        self.tracker._write_ext_resources \u003d mock.Mock()"},{"line_number":736,"context_line":"        expected \u003d self.tracker.compute_node"},{"line_number":737,"context_line":"        self.tracker._update(self.context)"},{"line_number":738,"context_line":"        self.tracker.scheduler_client.update_resource_stats.\\"},{"line_number":739,"context_line":"            assert_called_once_with(self.context,"}],"source_content_type":"text/x-python","patch_set":10,"id":"3acd31a7_b2a8698d","line":736,"in_reply_to":"9aa53dc9_485c05ed","updated":"2015-05-07 00:47:01.000000000","message":"Well, that turned out to be a good catch - the test wasn\u0027t working properly. I fixed it and added another test, so we test the case where the update should happen because of a change in the compute_node and another for the case when it should not happen because there is no change.","commit_id":"66fcfec50ca1d7c60efa85833439617d1bead5b5"}]}
