)]}'
{"monasca_agent/collector/checks_d/libvirt.py":[{"author":{"_account_id":21922,"name":"Dobroslaw Zybort","email":"dobroslaw.zybort@ts.fujitsu.com","username":"dobrolaw.zybort"},"change_message_id":"60d79368666365614627b0c13e37e3f651ddeba3","unresolved":false,"context_lines":[{"line_number":144,"context_line":"            if not services:"},{"line_number":145,"context_line":"                services \u003d nova_client.services.list("},{"line_number":146,"context_line":"                    host\u003dself.hostname.split(\u0027.\u0027)[0], binary\u003d\u0027nova-compute\u0027)"},{"line_number":147,"context_line":"            if services:"},{"line_number":148,"context_line":"                self._nova_host \u003d services[0].host"},{"line_number":149,"context_line":"                self.log.info(\"Found \u0027nova-compute\u0027 registered with host: {}\""},{"line_number":150,"context_line":"                              .format(self._nova_host))"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_c79d0f67","line":147,"range":{"start_line":147,"start_character":12,"end_line":147,"end_character":23},"updated":"2018-03-21 10:53:08.000000000","message":"else","commit_id":"a0fe690a4650278ee15d96ab60385ab447707210"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"1e7a457d9cdda02dadce6f235663e6fdcbb0f021","unresolved":false,"context_lines":[{"line_number":144,"context_line":"            if not services:"},{"line_number":145,"context_line":"                services \u003d nova_client.services.list("},{"line_number":146,"context_line":"                    host\u003dself.hostname.split(\u0027.\u0027)[0], binary\u003d\u0027nova-compute\u0027)"},{"line_number":147,"context_line":"            if services:"},{"line_number":148,"context_line":"                self._nova_host \u003d services[0].host"},{"line_number":149,"context_line":"                self.log.info(\"Found \u0027nova-compute\u0027 registered with host: {}\""},{"line_number":150,"context_line":"                              .format(self._nova_host))"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_824b8585","line":147,"range":{"start_line":147,"start_character":12,"end_line":147,"end_character":23},"in_reply_to":"df7087c5_c79d0f67","updated":"2018-03-21 12:15:42.000000000","message":"`services` can be assigned a value in the preceding if-block. I\u0027ll add some comments to make that logic clearer.","commit_id":"a0fe690a4650278ee15d96ab60385ab447707210"},{"author":{"_account_id":21922,"name":"Dobroslaw Zybort","email":"dobroslaw.zybort@ts.fujitsu.com","username":"dobrolaw.zybort"},"change_message_id":"60d79368666365614627b0c13e37e3f651ddeba3","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                self.log.info(\"Found \u0027nova-compute\u0027 registered with host: {}\""},{"line_number":150,"context_line":"                              .format(self._nova_host))"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        if self._nova_host:"},{"line_number":153,"context_line":"            return self._nova_host"},{"line_number":154,"context_line":"        else:"},{"line_number":155,"context_line":"            self.log.warn(\"No \u0027nova-compute\u0027 service found on host: {}\""}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_47aa5f85","line":152,"range":{"start_line":152,"start_character":8,"end_line":152,"end_character":26},"updated":"2018-03-21 10:53:08.000000000","message":"this could be simply `else`","commit_id":"a0fe690a4650278ee15d96ab60385ab447707210"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"1e7a457d9cdda02dadce6f235663e6fdcbb0f021","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                self.log.info(\"Found \u0027nova-compute\u0027 registered with host: {}\""},{"line_number":150,"context_line":"                              .format(self._nova_host))"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        if self._nova_host:"},{"line_number":153,"context_line":"            return self._nova_host"},{"line_number":154,"context_line":"        else:"},{"line_number":155,"context_line":"            self.log.warn(\"No \u0027nova-compute\u0027 service found on host: {}\""}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_1d3b58c8","line":152,"range":{"start_line":152,"start_character":8,"end_line":152,"end_character":26},"in_reply_to":"df7087c5_47aa5f85","updated":"2018-03-21 12:15:42.000000000","message":"Similarly here, `self._nova_host` can be assigned a value in https://review.openstack.org/#/c/554257/2/monasca_agent/collector/checks_d/libvirt.py@148 .","commit_id":"a0fe690a4650278ee15d96ab60385ab447707210"},{"author":{"_account_id":21922,"name":"Dobroslaw Zybort","email":"dobroslaw.zybort@ts.fujitsu.com","username":"dobrolaw.zybort"},"change_message_id":"60d79368666365614627b0c13e37e3f651ddeba3","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        if self._nova_host:"},{"line_number":153,"context_line":"            return self._nova_host"},{"line_number":154,"context_line":"        else:"},{"line_number":155,"context_line":"            self.log.warn(\"No \u0027nova-compute\u0027 service found on host: {}\""},{"line_number":156,"context_line":"                          .format(self.hostname))"},{"line_number":157,"context_line":"            return self.hostname"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def _update_instance_cache(self):"},{"line_number":160,"context_line":"        \"\"\"Collect instance_id, project_id, and AZ for all instance UUIDs"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_e7c37356","line":157,"range":{"start_line":154,"start_character":0,"end_line":157,"end_character":32},"updated":"2018-03-21 10:53:08.000000000","message":"Why this code is here instead of in the previous `if not self._nova_host:`?","commit_id":"a0fe690a4650278ee15d96ab60385ab447707210"},{"author":{"_account_id":21922,"name":"Dobroslaw Zybort","email":"dobroslaw.zybort@ts.fujitsu.com","username":"dobrolaw.zybort"},"change_message_id":"60d79368666365614627b0c13e37e3f651ddeba3","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        else:"},{"line_number":155,"context_line":"            self.log.warn(\"No \u0027nova-compute\u0027 service found on host: {}\""},{"line_number":156,"context_line":"                          .format(self.hostname))"},{"line_number":157,"context_line":"            return self.hostname"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def _update_instance_cache(self):"},{"line_number":160,"context_line":"        \"\"\"Collect instance_id, project_id, and AZ for all instance UUIDs"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_c7766f3f","line":157,"range":{"start_line":157,"start_character":19,"end_line":157,"end_character":32},"updated":"2018-03-21 10:53:08.000000000","message":"shouldn\u0027t this be `self.hostname.split(\u0027.\u0027)[0]`?","commit_id":"a0fe690a4650278ee15d96ab60385ab447707210"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"1e7a457d9cdda02dadce6f235663e6fdcbb0f021","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        else:"},{"line_number":155,"context_line":"            self.log.warn(\"No \u0027nova-compute\u0027 service found on host: {}\""},{"line_number":156,"context_line":"                          .format(self.hostname))"},{"line_number":157,"context_line":"            return self.hostname"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def _update_instance_cache(self):"},{"line_number":160,"context_line":"        \"\"\"Collect instance_id, project_id, and AZ for all instance UUIDs"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_ddfc00b7","line":157,"range":{"start_line":157,"start_character":19,"end_line":157,"end_character":32},"in_reply_to":"df7087c5_c7766f3f","updated":"2018-03-21 12:15:42.000000000","message":"No, I actually want to revert to the behavior from before https://git.openstack.org/cgit/openstack/monasca-agent/commit/monasca_agent/collector/checks_d/libvirt.py?id\u003d48729136a7a01b07624b702f0b59af3c69e3fcca . The issue of Nova\u0027s unqualified hostname is now handled here https://review.openstack.org/#/c/554257/2/monasca_agent/collector/checks_d/libvirt.py@145 . Please note that this part is actually fallback only.","commit_id":"a0fe690a4650278ee15d96ab60385ab447707210"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"1e7a457d9cdda02dadce6f235663e6fdcbb0f021","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        if self._nova_host:"},{"line_number":153,"context_line":"            return self._nova_host"},{"line_number":154,"context_line":"        else:"},{"line_number":155,"context_line":"            self.log.warn(\"No \u0027nova-compute\u0027 service found on host: {}\""},{"line_number":156,"context_line":"                          .format(self.hostname))"},{"line_number":157,"context_line":"            return self.hostname"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def _update_instance_cache(self):"},{"line_number":160,"context_line":"        \"\"\"Collect instance_id, project_id, and AZ for all instance UUIDs"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_1d9d9856","line":157,"range":{"start_line":154,"start_character":0,"end_line":157,"end_character":32},"in_reply_to":"df7087c5_e7c37356","updated":"2018-03-21 12:15:42.000000000","message":"I wanted to keep the return value section at the end of the method.","commit_id":"a0fe690a4650278ee15d96ab60385ab447707210"}]}
