)]}'
{"doc/api_samples/os-extended-server-attributes/v2.16/server-get-resp.json":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6e97d675e636b43212f8cf68c5aff3bf03fd9e9b","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        \"accessIPv6\": \"80fe::\","},{"line_number":62,"context_line":"        \"progress\": 0,"},{"line_number":63,"context_line":"        \"status\": \"ACTIVE\","},{"line_number":64,"context_line":"        \"host_status\": \"UP\","},{"line_number":65,"context_line":"        \"tenant_id\": \"openstack\","},{"line_number":66,"context_line":"        \"updated\": \"2013-09-16T02:55:08Z\","},{"line_number":67,"context_line":"        \"user_id\": \"fake\""}],"source_content_type":"application/json","patch_set":20,"id":"bae84128_cbe5a109","line":64,"range":{"start_line":64,"start_character":9,"end_line":64,"end_character":20},"updated":"2016-02-23 20:49:41.000000000","message":"Why isn\u0027t this prefix with OS-EXT-SRV-ATTR?","commit_id":"9345d5835fb8ff6a3534122c3c13620547862e95"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"884dfd2047384247f79887667ea5bab0209d3917","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        \"accessIPv6\": \"80fe::\","},{"line_number":62,"context_line":"        \"progress\": 0,"},{"line_number":63,"context_line":"        \"status\": \"ACTIVE\","},{"line_number":64,"context_line":"        \"host_status\": \"UP\","},{"line_number":65,"context_line":"        \"tenant_id\": \"openstack\","},{"line_number":66,"context_line":"        \"updated\": \"2013-09-16T02:55:08Z\","},{"line_number":67,"context_line":"        \"user_id\": \"fake\""}],"source_content_type":"application/json","patch_set":20,"id":"9aed3d3a_5e5b49f6","line":64,"range":{"start_line":64,"start_character":9,"end_line":64,"end_character":20},"in_reply_to":"bae84128_cbe5a109","updated":"2016-02-29 04:38:55.000000000","message":"At least this is not any existing attribute, but calculated value. Surely the source of information is somewhat similar.  Otherwise no strong opinion why this prefix could not be there.","commit_id":"9345d5835fb8ff6a3534122c3c13620547862e95"}],"doc/api_samples/os-extended-server-attributes/v2.16/servers-detail-resp.json":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"e353bb4802a20f455d3b33d33af54db43bbfc244","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            \"OS-EXT-SRV-ATTR:host\": \"bc8efe4fdb7148a4bb921a2b03d17de6\","},{"line_number":51,"context_line":"            \"OS-EXT-SRV-ATTR:hypervisor_hostname\": \"fake-mini\","},{"line_number":52,"context_line":"            \"OS-EXT-SRV-ATTR:instance_name\": \"instance-00000001\","},{"line_number":53,"context_line":"\t        \"OS-EXT-SRV-ATTR:hostname\": \"new-server-test\","},{"line_number":54,"context_line":"\t        \"OS-EXT-SRV-ATTR:launch_index\": 0,"},{"line_number":55,"context_line":"\t        \"OS-EXT-SRV-ATTR:reservation_id\": \"r-12345678\","},{"line_number":56,"context_line":"\t        \"OS-EXT-SRV-ATTR:root_device_name\": \"/dev/sda\","},{"line_number":57,"context_line":"\t        \"OS-EXT-SRV-ATTR:kernel_id\": null,"},{"line_number":58,"context_line":"\t        \"OS-EXT-SRV-ATTR:ramdisk_id\": null,"},{"line_number":59,"context_line":"\t        \"OS-EXT-SRV-ATTR:user_data\": null,"},{"line_number":60,"context_line":"\t        \"locked\": false,"},{"line_number":61,"context_line":"            \"accessIPv4\": \"1.2.3.4\","},{"line_number":62,"context_line":"            \"accessIPv6\": \"80fe::\","},{"line_number":63,"context_line":"            \"progress\": 0,"}],"source_content_type":"application/json","patch_set":20,"id":"da6ed579_22e7d213","line":60,"range":{"start_line":53,"start_character":0,"end_line":60,"end_character":25},"updated":"2016-01-18 08:49:45.000000000","message":"nit: we need to use spaces instead of tabs here..","commit_id":"9345d5835fb8ff6a3534122c3c13620547862e95"}],"doc/api_samples/servers/v2.13/server-get-resp.json":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"0991b5b9dce5b720e9b98325239732881e0c9780","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"server\": {"},{"line_number":3,"context_line":"        \"accessIPv4\": \"1.2.3.4\","},{"line_number":4,"context_line":"        \"accessIPv6\": \"80fe::\","}],"source_content_type":"application/json","patch_set":2,"id":"fa80f949_4f3e89b9","line":1,"updated":"2015-11-05 11:19:07.000000000","message":"strange, there should be api sample template file under nova/tests/functional/api_sample_tests.","commit_id":"b8e0648d2f9ffb41ec4703bb5c97513754080f25"}],"etc/nova/policy.json":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"7a0f55331ef51ad794b19eab9999cf834eb46719","unresolved":false,"context_lines":[{"line_number":269,"context_line":"    \"os_compute_api:servers:resize\": \"\","},{"line_number":270,"context_line":"    \"os_compute_api:servers:revert_resize\": \"\","},{"line_number":271,"context_line":"    \"os_compute_api:servers:show\": \"\","},{"line_number":272,"context_line":"    \"os_compute_api:servers:show:host_status\": \"rule:admin_api or user_id:%(user_id)s\","},{"line_number":273,"context_line":"    \"os_compute_api:servers:create_image\": \"\","},{"line_number":274,"context_line":"    \"os_compute_api:servers:create_image:allow_volume_backed\": \"\","},{"line_number":275,"context_line":"    \"os_compute_api:servers:start\": \"rule:admin_or_owner\","}],"source_content_type":"application/json","patch_set":2,"id":"fa80f949_80bf77fa","line":272,"updated":"2015-11-04 21:18:56.000000000","message":"Why don\u0027t you use rule:admin_or_owner?\n\nThis is different from the other existing rules.","commit_id":"b8e0648d2f9ffb41ec4703bb5c97513754080f25"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"6493abf3013bd0b645f067e3a404122c26c8dfed","unresolved":false,"context_lines":[{"line_number":269,"context_line":"    \"os_compute_api:servers:resize\": \"\","},{"line_number":270,"context_line":"    \"os_compute_api:servers:revert_resize\": \"\","},{"line_number":271,"context_line":"    \"os_compute_api:servers:show\": \"\","},{"line_number":272,"context_line":"    \"os_compute_api:servers:show:host_status\": \"rule:admin_api or user_id:%(user_id)s\","},{"line_number":273,"context_line":"    \"os_compute_api:servers:create_image\": \"\","},{"line_number":274,"context_line":"    \"os_compute_api:servers:create_image:allow_volume_backed\": \"\","},{"line_number":275,"context_line":"    \"os_compute_api:servers:start\": \"rule:admin_or_owner\","}],"source_content_type":"application/json","patch_set":2,"id":"fa80f949_55edc5ed","line":272,"in_reply_to":"fa80f949_80bf77fa","updated":"2015-11-05 07:21:21.000000000","message":"yes, this sounds good.","commit_id":"b8e0648d2f9ffb41ec4703bb5c97513754080f25"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"2a3af5483551cda25a46497b0202d312df848171","unresolved":false,"context_lines":[{"line_number":264,"context_line":"    \"os_compute_api:servers:resize\": \"\","},{"line_number":265,"context_line":"    \"os_compute_api:servers:revert_resize\": \"\","},{"line_number":266,"context_line":"    \"os_compute_api:servers:show\": \"\","},{"line_number":267,"context_line":"    \"os_compute_api:servers:show:host_status\": \"rule:admin_api\","},{"line_number":268,"context_line":"    \"os_compute_api:servers:create_image\": \"\","},{"line_number":269,"context_line":"    \"os_compute_api:servers:create_image:allow_volume_backed\": \"\","},{"line_number":270,"context_line":"    \"os_compute_api:servers:start\": \"rule:admin_or_owner\","}],"source_content_type":"application/json","patch_set":17,"id":"da6ed579_1e6cd49a","line":267,"range":{"start_line":267,"start_character":4,"end_line":267,"end_character":64},"updated":"2016-01-15 00:35:58.000000000","message":"The spec said this should be rule:admin_or_owner http://specs.openstack.org/openstack/nova-specs/specs/mitaka/approved/get-valid-server-state.html","commit_id":"b11fbf8ad9a85f6b07f8228aa2fe099879fb647d"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"37f8d990e11ea6bfa37b7ccf190dcc078ae985bc","unresolved":false,"context_lines":[{"line_number":264,"context_line":"    \"os_compute_api:servers:resize\": \"\","},{"line_number":265,"context_line":"    \"os_compute_api:servers:revert_resize\": \"\","},{"line_number":266,"context_line":"    \"os_compute_api:servers:show\": \"\","},{"line_number":267,"context_line":"    \"os_compute_api:servers:show:host_status\": \"rule:admin_api\","},{"line_number":268,"context_line":"    \"os_compute_api:servers:create_image\": \"\","},{"line_number":269,"context_line":"    \"os_compute_api:servers:create_image:allow_volume_backed\": \"\","},{"line_number":270,"context_line":"    \"os_compute_api:servers:start\": \"rule:admin_or_owner\","}],"source_content_type":"application/json","patch_set":17,"id":"da6ed579_8331445c","line":267,"range":{"start_line":267,"start_character":4,"end_line":267,"end_character":64},"in_reply_to":"da6ed579_1e6cd49a","updated":"2016-01-15 05:55:33.000000000","message":"Yes, you are right. It was only in code review that maybe better not to default to admin_api and then could change it to admin_or_owner when needed by deployment (Telco at least).","commit_id":"b11fbf8ad9a85f6b07f8228aa2fe099879fb647d"}],"nova/api/openstack/compute/extended_server_attributes.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"2a3af5483551cda25a46497b0202d312df848171","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def _server_host_status(self, context, server, instance, req):"},{"line_number":50,"context_line":"        host_status \u003d self.compute_api.get_instance_host_status(instance)"},{"line_number":51,"context_line":"        if host_status is not None:"},{"line_number":52,"context_line":"            server[\u0027host_status\u0027] \u003d host_status"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @wsgi.extends"}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_5ec80ca6","line":51,"range":{"start_line":51,"start_character":8,"end_line":51,"end_character":35},"updated":"2016-01-15 00:35:58.000000000","message":"I think we should always show this property in the response.","commit_id":"b11fbf8ad9a85f6b07f8228aa2fe099879fb647d"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"86979c7fe2ec7c1b4677dfba121fa87a1cc56d88","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def _server_host_status(self, context, server, instance, req):"},{"line_number":50,"context_line":"        host_status \u003d self.compute_api.get_instance_host_status(instance)"},{"line_number":51,"context_line":"        if host_status is not None:"},{"line_number":52,"context_line":"            server[\u0027host_status\u0027] \u003d host_status"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @wsgi.extends"}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_8fe72cab","line":51,"range":{"start_line":51,"start_character":8,"end_line":51,"end_character":35},"in_reply_to":"da6ed579_5ec80ca6","updated":"2016-01-15 02:33:07.000000000","message":"Agreed, and when will the host_status be None? Should that be a problem if it is None?","commit_id":"b11fbf8ad9a85f6b07f8228aa2fe099879fb647d"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"37f8d990e11ea6bfa37b7ccf190dcc078ae985bc","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def _server_host_status(self, context, server, instance, req):"},{"line_number":50,"context_line":"        host_status \u003d self.compute_api.get_instance_host_status(instance)"},{"line_number":51,"context_line":"        if host_status is not None:"},{"line_number":52,"context_line":"            server[\u0027host_status\u0027] \u003d host_status"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @wsgi.extends"}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_83bce4bb","line":51,"range":{"start_line":51,"start_character":8,"end_line":51,"end_character":35},"in_reply_to":"da6ed579_8fe72cab","updated":"2016-01-15 05:55:33.000000000","message":"That is when there is no host, but if you feel this should be always visible I can do that. Then host_status should just be empty string in response.","commit_id":"b11fbf8ad9a85f6b07f8228aa2fe099879fb647d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4b28ea7db8e968c5d5151ffd9b2dc6b55f17b1d5","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        server[key] \u003d instance.node"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        properties \u003d [\u0027host\u0027, \u0027name\u0027]"},{"line_number":38,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.3\u0027):"},{"line_number":39,"context_line":"            properties +\u003d [\u0027reservation_id\u0027, \u0027launch_index\u0027,"},{"line_number":40,"context_line":"                           \u0027hostname\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027,"},{"line_number":41,"context_line":"                           \u0027root_device_name\u0027, \u0027user_data\u0027]"},{"line_number":42,"context_line":"        for attr in properties:"},{"line_number":43,"context_line":"            if attr \u003d\u003d \u0027name\u0027:"},{"line_number":44,"context_line":"                key \u003d \"OS-EXT-SRV-ATTR:instance_%s\" % attr"}],"source_content_type":"text/x-python","patch_set":20,"id":"bae84128_2bad2d88","line":41,"range":{"start_line":38,"start_character":8,"end_line":41,"end_character":59},"updated":"2016-02-23 20:53:39.000000000","message":"These were exposed in microversion 2.3 and they use the OS-EXT-SRV-ATTR prefix on line 46.","commit_id":"9345d5835fb8ff6a3534122c3c13620547862e95"}],"nova/api/openstack/compute/servers.py":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"7a0f55331ef51ad794b19eab9999cf834eb46719","unresolved":false,"context_lines":[{"line_number":407,"context_line":"        if is_detail:"},{"line_number":408,"context_line":"            instance_list.fill_faults()"},{"line_number":409,"context_line":"            if (req.api_version_request \u003e\u003d"},{"line_number":410,"context_line":"                    api_version_request.APIVersionRequest(\"2.13\")):"},{"line_number":411,"context_line":"                self._set_instance_list_host_status(context, instance_list)"},{"line_number":412,"context_line":"            response \u003d self._view_builder.detail(req, instance_list)"},{"line_number":413,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_80a0d7a0","line":410,"updated":"2015-11-04 21:18:56.000000000","message":"A policy check is necessary, or how about removing it from policy.son?","commit_id":"b8e0648d2f9ffb41ec4703bb5c97513754080f25"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"6493abf3013bd0b645f067e3a404122c26c8dfed","unresolved":false,"context_lines":[{"line_number":407,"context_line":"        if is_detail:"},{"line_number":408,"context_line":"            instance_list.fill_faults()"},{"line_number":409,"context_line":"            if (req.api_version_request \u003e\u003d"},{"line_number":410,"context_line":"                    api_version_request.APIVersionRequest(\"2.13\")):"},{"line_number":411,"context_line":"                self._set_instance_list_host_status(context, instance_list)"},{"line_number":412,"context_line":"            response \u003d self._view_builder.detail(req, instance_list)"},{"line_number":413,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_35c92179","line":410,"in_reply_to":"fa80f949_80a0d7a0","updated":"2015-11-05 07:21:21.000000000","message":"yes, certainly needs policy check. Did not yet have time to look that.","commit_id":"b8e0648d2f9ffb41ec4703bb5c97513754080f25"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a4856916744cc22181f335e533f2f662470de83a","unresolved":false,"context_lines":[{"line_number":507,"context_line":"            return None"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"    def _set_instance_host_status(self, context, instance):"},{"line_number":510,"context_line":"        #get nova-compute status translated to different string values"},{"line_number":511,"context_line":"        if instance.host:"},{"line_number":512,"context_line":"            service \u003d self.host_api.service_get_by_compute_host(context, instance.host)"},{"line_number":513,"context_line":"            LOG.debug(\"service %s\",service)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_791c9bc1","line":510,"updated":"2015-11-04 17:50:55.000000000","message":"These comments are not properly formatted. They should include a space after the hash and a capital letter starting the first word.\n\nAlso, this comment is actually more appropriate as a docstrings on the method.","commit_id":"b8e0648d2f9ffb41ec4703bb5c97513754080f25"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"6493abf3013bd0b645f067e3a404122c26c8dfed","unresolved":false,"context_lines":[{"line_number":507,"context_line":"            return None"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"    def _set_instance_host_status(self, context, instance):"},{"line_number":510,"context_line":"        #get nova-compute status translated to different string values"},{"line_number":511,"context_line":"        if instance.host:"},{"line_number":512,"context_line":"            service \u003d self.host_api.service_get_by_compute_host(context, instance.host)"},{"line_number":513,"context_line":"            LOG.debug(\"service %s\",service)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_d5ae9597","line":510,"in_reply_to":"fa80f949_791c9bc1","updated":"2015-11-05 07:21:21.000000000","message":"yes, will not also miss the tox next time.","commit_id":"b8e0648d2f9ffb41ec4703bb5c97513754080f25"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"7a0f55331ef51ad794b19eab9999cf834eb46719","unresolved":false,"context_lines":[{"line_number":510,"context_line":"        #get nova-compute status translated to different string values"},{"line_number":511,"context_line":"        if instance.host:"},{"line_number":512,"context_line":"            service \u003d self.host_api.service_get_by_compute_host(context, instance.host)"},{"line_number":513,"context_line":"            LOG.debug(\"service %s\",service)"},{"line_number":514,"context_line":"            if service[\u0027forced_down\u0027]:"},{"line_number":515,"context_line":"                instance[\"host_status\"] \u003d \"EXTERNALLY_DEFINED_TO_BE_DOWN\""},{"line_number":516,"context_line":"            elif service[\u0027disabled\u0027]:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_c0733f7f","line":513,"updated":"2015-11-04 21:18:56.000000000","message":"nit: necessary a space before service","commit_id":"b8e0648d2f9ffb41ec4703bb5c97513754080f25"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"6493abf3013bd0b645f067e3a404122c26c8dfed","unresolved":false,"context_lines":[{"line_number":510,"context_line":"        #get nova-compute status translated to different string values"},{"line_number":511,"context_line":"        if instance.host:"},{"line_number":512,"context_line":"            service \u003d self.host_api.service_get_by_compute_host(context, instance.host)"},{"line_number":513,"context_line":"            LOG.debug(\"service %s\",service)"},{"line_number":514,"context_line":"            if service[\u0027forced_down\u0027]:"},{"line_number":515,"context_line":"                instance[\"host_status\"] \u003d \"EXTERNALLY_DEFINED_TO_BE_DOWN\""},{"line_number":516,"context_line":"            elif service[\u0027disabled\u0027]:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_95c6cd47","line":513,"in_reply_to":"fa80f949_c0733f7f","updated":"2015-11-05 07:21:21.000000000","message":"Yes, my bad. Will not miss tox next time. Didn\u0027t intend to leave the logging even, it was for my debugging. Haven\u0027t looked how much there is actually logging used, so should there be some debug for a feature or not.","commit_id":"b8e0648d2f9ffb41ec4703bb5c97513754080f25"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a4856916744cc22181f335e533f2f662470de83a","unresolved":false,"context_lines":[{"line_number":512,"context_line":"            service \u003d self.host_api.service_get_by_compute_host(context, instance.host)"},{"line_number":513,"context_line":"            LOG.debug(\"service %s\",service)"},{"line_number":514,"context_line":"            if service[\u0027forced_down\u0027]:"},{"line_number":515,"context_line":"                instance[\"host_status\"] \u003d \"EXTERNALLY_DEFINED_TO_BE_DOWN\""},{"line_number":516,"context_line":"            elif service[\u0027disabled\u0027]:"},{"line_number":517,"context_line":"                instance[\"host_status\"] \u003d \"MAINTENANCE\""},{"line_number":518,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_f95deb79","line":515,"updated":"2015-11-04 17:50:55.000000000","message":"Instance is an object so you should not be using item syntax. That aside, you should not be adding random stuff to the instance object that is not defined in the fields. That means this is the wrong place to do this work.","commit_id":"b8e0648d2f9ffb41ec4703bb5c97513754080f25"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"6493abf3013bd0b645f067e3a404122c26c8dfed","unresolved":false,"context_lines":[{"line_number":512,"context_line":"            service \u003d self.host_api.service_get_by_compute_host(context, instance.host)"},{"line_number":513,"context_line":"            LOG.debug(\"service %s\",service)"},{"line_number":514,"context_line":"            if service[\u0027forced_down\u0027]:"},{"line_number":515,"context_line":"                instance[\"host_status\"] \u003d \"EXTERNALLY_DEFINED_TO_BE_DOWN\""},{"line_number":516,"context_line":"            elif service[\u0027disabled\u0027]:"},{"line_number":517,"context_line":"                instance[\"host_status\"] \u003d \"MAINTENANCE\""},{"line_number":518,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_152f3df7","line":515,"in_reply_to":"fa80f949_f95deb79","updated":"2015-11-05 07:21:21.000000000","message":"Yes, this was nasty, while made things easy to pass to ViewBuilder.","commit_id":"b8e0648d2f9ffb41ec4703bb5c97513754080f25"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a4856916744cc22181f335e533f2f662470de83a","unresolved":false,"context_lines":[{"line_number":523,"context_line":"            instance[\"host_status\"] \u003d \"\""},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"    def _set_instance_list_host_status(self, context, instance_list):"},{"line_number":526,"context_line":"        #Set host_status for each instance to be used in detailed view"},{"line_number":527,"context_line":"        host_status_dict\u003ddict()"},{"line_number":528,"context_line":"        for instance in instance_list:"},{"line_number":529,"context_line":"            if instance.host:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_594f57bd","line":526,"updated":"2015-11-04 17:50:55.000000000","message":"This too should be a docstring.","commit_id":"b8e0648d2f9ffb41ec4703bb5c97513754080f25"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"6493abf3013bd0b645f067e3a404122c26c8dfed","unresolved":false,"context_lines":[{"line_number":523,"context_line":"            instance[\"host_status\"] \u003d \"\""},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"    def _set_instance_list_host_status(self, context, instance_list):"},{"line_number":526,"context_line":"        #Set host_status for each instance to be used in detailed view"},{"line_number":527,"context_line":"        host_status_dict\u003ddict()"},{"line_number":528,"context_line":"        for instance in instance_list:"},{"line_number":529,"context_line":"            if instance.host:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_5545c5b0","line":526,"in_reply_to":"fa80f949_594f57bd","updated":"2015-11-05 07:21:21.000000000","message":"roger that","commit_id":"b8e0648d2f9ffb41ec4703bb5c97513754080f25"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a4856916744cc22181f335e533f2f662470de83a","unresolved":false,"context_lines":[{"line_number":528,"context_line":"        for instance in instance_list:"},{"line_number":529,"context_line":"            if instance.host:"},{"line_number":530,"context_line":"                if instance.host not in host_status_dict:"},{"line_number":531,"context_line":"                    #host_status not gotten by other instances yet, get it"},{"line_number":532,"context_line":"                    self._set_instance_host_status(context, instance)"},{"line_number":533,"context_line":"                    host_status_dict[instance.host] \u003d instance[\"host_status\"]"},{"line_number":534,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_39cb7320","line":531,"updated":"2015-11-04 17:50:55.000000000","message":"This comment is probably not very useful.","commit_id":"b8e0648d2f9ffb41ec4703bb5c97513754080f25"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"6493abf3013bd0b645f067e3a404122c26c8dfed","unresolved":false,"context_lines":[{"line_number":528,"context_line":"        for instance in instance_list:"},{"line_number":529,"context_line":"            if instance.host:"},{"line_number":530,"context_line":"                if instance.host not in host_status_dict:"},{"line_number":531,"context_line":"                    #host_status not gotten by other instances yet, get it"},{"line_number":532,"context_line":"                    self._set_instance_host_status(context, instance)"},{"line_number":533,"context_line":"                    host_status_dict[instance.host] \u003d instance[\"host_status\"]"},{"line_number":534,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_95224d00","line":531,"in_reply_to":"fa80f949_39cb7320","updated":"2015-11-05 07:21:21.000000000","message":"yes","commit_id":"b8e0648d2f9ffb41ec4703bb5c97513754080f25"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a4856916744cc22181f335e533f2f662470de83a","unresolved":false,"context_lines":[{"line_number":532,"context_line":"                    self._set_instance_host_status(context, instance)"},{"line_number":533,"context_line":"                    host_status_dict[instance.host] \u003d instance[\"host_status\"]"},{"line_number":534,"context_line":"                else:"},{"line_number":535,"context_line":"                    #host_status already gotten by other instance, use that"},{"line_number":536,"context_line":"                    instance[\"host_status\"] \u003d host_status_dict[instance.host]"},{"line_number":537,"context_line":"            else:"},{"line_number":538,"context_line":"                #No host yet, so empty string"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_d9d107cf","line":535,"updated":"2015-11-04 17:50:55.000000000","message":"Same for this.","commit_id":"b8e0648d2f9ffb41ec4703bb5c97513754080f25"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"6493abf3013bd0b645f067e3a404122c26c8dfed","unresolved":false,"context_lines":[{"line_number":532,"context_line":"                    self._set_instance_host_status(context, instance)"},{"line_number":533,"context_line":"                    host_status_dict[instance.host] \u003d instance[\"host_status\"]"},{"line_number":534,"context_line":"                else:"},{"line_number":535,"context_line":"                    #host_status already gotten by other instance, use that"},{"line_number":536,"context_line":"                    instance[\"host_status\"] \u003d host_status_dict[instance.host]"},{"line_number":537,"context_line":"            else:"},{"line_number":538,"context_line":"                #No host yet, so empty string"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_352121fc","line":535,"in_reply_to":"fa80f949_d9d107cf","updated":"2015-11-05 07:21:21.000000000","message":"yes","commit_id":"b8e0648d2f9ffb41ec4703bb5c97513754080f25"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"6fe5c093b902c0d2427e69f26edc8b4c9c02e2d6","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        self.extension_info \u003d kwargs.pop(\u0027extension_info\u0027)"},{"line_number":152,"context_line":"        super(ServersController, self).__init__(**kwargs)"},{"line_number":153,"context_line":"        self.compute_api \u003d compute.API(skip_policy_check\u003dTrue)"},{"line_number":154,"context_line":"        self.host_api \u003d compute.HostAPI()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        # Look for implementation of extension point of server creation"},{"line_number":157,"context_line":"        self.create_extension_manager \u003d \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_c9c9307b","line":154,"updated":"2015-12-01 16:09:28.000000000","message":"Leftover, will be removed","commit_id":"577783a6fdc71930e24da9f8f26d80611ad07440"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"4c7cf4a0500c4e5643800107b20bcbb84b1db923","unresolved":false,"context_lines":[{"line_number":528,"context_line":"        if ((req.api_version_request \u003e\u003d"},{"line_number":529,"context_line":"            api_version_request.APIVersionRequest(\"2.13\")) and"},{"line_number":530,"context_line":"            soft_authorize(context, action\u003d\u0027show:host_status\u0027)):"},{"line_number":531,"context_line":"            get_service \u003d True"},{"line_number":532,"context_line":"        else:"},{"line_number":533,"context_line":"            get_service \u003d False"},{"line_number":534,"context_line":"        instance \u003d self._get_server(context, req, id, is_detail\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_a372deab","line":531,"updated":"2015-12-10 05:28:44.000000000","message":"Please don\u0027t add this kind of code into nova/api/openstack/compute/servers.py for the maintenance.\n\nTo keep this central code clean, this kind of code is implemented in extending modules. \n\nFor example, nova/api/openstack/compute/extended_server_attributes.py seems good place for this.\n\nWe can just add this code into _extend_server() of the above module.","commit_id":"5224cb62de678ed91c3b47d3310fa67d3dd230fa"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"5eeb9fa155c471557091285778a8f4568b77324b","unresolved":false,"context_lines":[{"line_number":528,"context_line":"        if ((req.api_version_request \u003e\u003d"},{"line_number":529,"context_line":"            api_version_request.APIVersionRequest(\"2.13\")) and"},{"line_number":530,"context_line":"            soft_authorize(context, action\u003d\u0027show:host_status\u0027)):"},{"line_number":531,"context_line":"            get_service \u003d True"},{"line_number":532,"context_line":"        else:"},{"line_number":533,"context_line":"            get_service \u003d False"},{"line_number":534,"context_line":"        instance \u003d self._get_server(context, req, id, is_detail\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_9ba062a7","line":531,"in_reply_to":"7a740942_345e2646","updated":"2015-12-10 10:01:35.000000000","message":"Started doing thia, but actually there is request to make spec for filtering by host_status later on. Do not know that efficiency if dropping servers to be shown would be decided only in extended_server_attributes.py. That would be the first place it will be known as SG API will be called only when host_status is formed.","commit_id":"5224cb62de678ed91c3b47d3310fa67d3dd230fa"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a89d9edae611fe19ec51e103c4496ae5ce67e95f","unresolved":false,"context_lines":[{"line_number":528,"context_line":"        if ((req.api_version_request \u003e\u003d"},{"line_number":529,"context_line":"            api_version_request.APIVersionRequest(\"2.13\")) and"},{"line_number":530,"context_line":"            soft_authorize(context, action\u003d\u0027show:host_status\u0027)):"},{"line_number":531,"context_line":"            get_service \u003d True"},{"line_number":532,"context_line":"        else:"},{"line_number":533,"context_line":"            get_service \u003d False"},{"line_number":534,"context_line":"        instance \u003d self._get_server(context, req, id, is_detail\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_bd841d0b","line":531,"in_reply_to":"7a740942_9ba062a7","updated":"2015-12-10 15:53:25.000000000","message":"Ken\u0027ichi, I think he\u0027s adding this here to avoid doing an extra lookup (i.e. db hit) later in another module. I\u0027m not sure how modules are supposed to communicate that they need something pre-loaded on the instance if not like this here.\n\nHow do you suggest he pre-load that attribute for efficiency and keep the code separate?","commit_id":"5224cb62de678ed91c3b47d3310fa67d3dd230fa"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"f774a06da5032a71449b29d4ac6be6729ece7946","unresolved":false,"context_lines":[{"line_number":528,"context_line":"        if ((req.api_version_request \u003e\u003d"},{"line_number":529,"context_line":"            api_version_request.APIVersionRequest(\"2.13\")) and"},{"line_number":530,"context_line":"            soft_authorize(context, action\u003d\u0027show:host_status\u0027)):"},{"line_number":531,"context_line":"            get_service \u003d True"},{"line_number":532,"context_line":"        else:"},{"line_number":533,"context_line":"            get_service \u003d False"},{"line_number":534,"context_line":"        instance \u003d self._get_server(context, req, id, is_detail\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_345e2646","line":531,"in_reply_to":"7a740942_a372deab","updated":"2015-12-10 07:35:14.000000000","message":"ok thanks, I will look into this.","commit_id":"5224cb62de678ed91c3b47d3310fa67d3dd230fa"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"1a800f3a7476ccb9378662b842cfd6e664b1bf07","unresolved":false,"context_lines":[{"line_number":383,"context_line":""},{"line_number":384,"context_line":"        expected_attrs \u003d [\u0027pci_devices\u0027]"},{"line_number":385,"context_line":"        if is_detail:"},{"line_number":386,"context_line":"            if ((req.api_version_request \u003e\u003d"},{"line_number":387,"context_line":"                api_version_request.APIVersionRequest(\"2.14\")) and"},{"line_number":388,"context_line":"                soft_authorize(context, action\u003d\u0027show:host_status\u0027)):"},{"line_number":389,"context_line":"                expected_attrs.append(\u0027services\u0027)"},{"line_number":390,"context_line":"                is_host_statuses \u003d True"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a7e1126_42cc4d89","line":387,"range":{"start_line":386,"start_character":16,"end_line":387,"end_character":61},"updated":"2015-12-17 13:29:03.000000000","message":"You can use just:\n\n api_version_request.is_supported(req, minversion\u003d\"2.14\")","commit_id":"e53cd7b770e149066bb9bdcb86352eccb9b6ab4d"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"6311da5a505fd4e78f969e3f9a32aab3be28fc41","unresolved":false,"context_lines":[{"line_number":383,"context_line":""},{"line_number":384,"context_line":"        expected_attrs \u003d [\u0027pci_devices\u0027]"},{"line_number":385,"context_line":"        if is_detail:"},{"line_number":386,"context_line":"            if ((req.api_version_request \u003e\u003d"},{"line_number":387,"context_line":"                api_version_request.APIVersionRequest(\"2.14\")) and"},{"line_number":388,"context_line":"                soft_authorize(context, action\u003d\u0027show:host_status\u0027)):"},{"line_number":389,"context_line":"                expected_attrs.append(\u0027services\u0027)"},{"line_number":390,"context_line":"                is_host_statuses \u003d True"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a7e1126_8e5edee7","line":387,"range":{"start_line":386,"start_character":16,"end_line":387,"end_character":61},"in_reply_to":"3a7e1126_42cc4d89","updated":"2015-12-17 14:47:37.000000000","message":"Yes, I\u0027ll change this in next patch","commit_id":"e53cd7b770e149066bb9bdcb86352eccb9b6ab4d"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"1a800f3a7476ccb9378662b842cfd6e664b1bf07","unresolved":false,"context_lines":[{"line_number":524,"context_line":"        \"\"\"Returns server details by server id.\"\"\""},{"line_number":525,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":526,"context_line":"        authorize(context, action\u003d\"show\")"},{"line_number":527,"context_line":"        if ((req.api_version_request \u003e\u003d"},{"line_number":528,"context_line":"            api_version_request.APIVersionRequest(\"2.14\")) and"},{"line_number":529,"context_line":"            soft_authorize(context, action\u003d\u0027show:host_status\u0027)):"},{"line_number":530,"context_line":"            get_service \u003d True"},{"line_number":531,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a7e1126_0275e5f7","line":528,"range":{"start_line":527,"start_character":12,"end_line":528,"end_character":57},"updated":"2015-12-17 13:29:03.000000000","message":"ditto about is_supported() method","commit_id":"e53cd7b770e149066bb9bdcb86352eccb9b6ab4d"}],"nova/api/openstack/compute/views/servers.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"743a808f672f16c7c433eee014a818058d9228c5","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        if ((request.api_version_request \u003e\u003d"},{"line_number":317,"context_line":"            api_version_request.APIVersionRequest(\"2.13\")) and"},{"line_number":318,"context_line":"            soft_authorize(instance._context, action\u003d\u0027show:host_status\u0027)):"},{"line_number":319,"context_line":"            server[\"server\"][\"host_status\"] \u003d instance[\"host_status\"]"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"        return server"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_11c80e74","line":319,"range":{"start_line":319,"start_character":46,"end_line":319,"end_character":54},"updated":"2015-12-03 15:14:41.000000000","message":"instance is an object here, right? If so, we should be adding new code using attribute syntax and not dict syntax, regardless of the other offenses in the file here.","commit_id":"577783a6fdc71930e24da9f8f26d80611ad07440"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"ce8777c347e82b00ff75e84a47e55ba16f32c6ef","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        if ((request.api_version_request \u003e\u003d"},{"line_number":317,"context_line":"            api_version_request.APIVersionRequest(\"2.13\")) and"},{"line_number":318,"context_line":"            soft_authorize(instance._context, action\u003d\u0027show:host_status\u0027)):"},{"line_number":319,"context_line":"            server[\"server\"][\"host_status\"] \u003d instance[\"host_status\"]"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"        return server"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_a8598790","line":319,"in_reply_to":"7a740942_11c80e74","updated":"2015-12-03 16:45:15.000000000","message":"ok","commit_id":"577783a6fdc71930e24da9f8f26d80611ad07440"}],"nova/api/openstack/rest_api_version_history.rst":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a4a33097cf55b0a58509e03e5606cb4c91ac5a5a","unresolved":false,"context_lines":[{"line_number":155,"context_line":"----"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"  Exposes new host_status attribute for servers/detail and servers/{server_id}."},{"line_number":158,"context_line":"  Ability to get nova-compute status when querying servers."}],"source_content_type":"text/x-rst","patch_set":13,"id":"da6ed579_449bffc9","line":158,"updated":"2016-01-12 18:28:16.000000000","message":"Might be nice to say \"By default, this is only exposed to cloud administrators.\"","commit_id":"f35b4096172e74adce15c105a888ebd364d5219a"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"68212d7f2fcaf2a0676a7d7a3781db796b82f31b","unresolved":false,"context_lines":[{"line_number":155,"context_line":"----"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"  Exposes new host_status attribute for servers/detail and servers/{server_id}."},{"line_number":158,"context_line":"  Ability to get nova-compute status when querying servers."}],"source_content_type":"text/x-rst","patch_set":13,"id":"da6ed579_1fb0e442","line":158,"in_reply_to":"da6ed579_449bffc9","updated":"2016-01-12 19:20:30.000000000","message":"yes, good to mention as now just admin.","commit_id":"f35b4096172e74adce15c105a888ebd364d5219a"}],"nova/compute/api.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"5589f5155d966c592b357dc5a3ef16e61d1ab6a8","unresolved":false,"context_lines":[{"line_number":3366,"context_line":"    def get_instance_host_status(self, instance):"},{"line_number":3367,"context_line":"        if instance[\"host\"] and len(instance[\"services\"]):"},{"line_number":3368,"context_line":"            if instance[\"services\"][0][\u0027forced_down\u0027]:"},{"line_number":3369,"context_line":"                host_status \u003d \"DOWN\""},{"line_number":3370,"context_line":"            elif instance[\"services\"][0][\u0027disabled\u0027]:"},{"line_number":3371,"context_line":"                host_status \u003d \"MAINTENANCE\""},{"line_number":3372,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_5272f8ae","line":3369,"updated":"2015-12-09 20:51:03.000000000","message":"do you think it\u0027s worthy to define host status ? like VM_State ?","commit_id":"5224cb62de678ed91c3b47d3310fa67d3dd230fa"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"817428208860978665f529a5a645c795cdce2260","unresolved":false,"context_lines":[{"line_number":3366,"context_line":"    def get_instance_host_status(self, instance):"},{"line_number":3367,"context_line":"        if instance[\"host\"] and len(instance[\"services\"]):"},{"line_number":3368,"context_line":"            if instance[\"services\"][0][\u0027forced_down\u0027]:"},{"line_number":3369,"context_line":"                host_status \u003d \"DOWN\""},{"line_number":3370,"context_line":"            elif instance[\"services\"][0][\u0027disabled\u0027]:"},{"line_number":3371,"context_line":"                host_status \u003d \"MAINTENANCE\""},{"line_number":3372,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_71ba7570","line":3369,"in_reply_to":"7a740942_2f41ef39","updated":"2015-12-10 10:34:03.000000000","message":"yes, agree with should not expose too much detail","commit_id":"5224cb62de678ed91c3b47d3310fa67d3dd230fa"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"f774a06da5032a71449b29d4ac6be6729ece7946","unresolved":false,"context_lines":[{"line_number":3366,"context_line":"    def get_instance_host_status(self, instance):"},{"line_number":3367,"context_line":"        if instance[\"host\"] and len(instance[\"services\"]):"},{"line_number":3368,"context_line":"            if instance[\"services\"][0][\u0027forced_down\u0027]:"},{"line_number":3369,"context_line":"                host_status \u003d \"DOWN\""},{"line_number":3370,"context_line":"            elif instance[\"services\"][0][\u0027disabled\u0027]:"},{"line_number":3371,"context_line":"                host_status \u003d \"MAINTENANCE\""},{"line_number":3372,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_2f41ef39","line":3369,"in_reply_to":"7a740942_5272f8ae","updated":"2015-12-10 07:35:14.000000000","message":"So as basic principle this is important information to user to know if host is going for maintenance or if it goes suddenly down (forced_down). If this was the question, it is addressed with spec and adding this host_status is seen the thing to do. Also surely cannot expose too much from host as user should not be able to see admin kind of details.","commit_id":"5224cb62de678ed91c3b47d3310fa67d3dd230fa"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"5589f5155d966c592b357dc5a3ef16e61d1ab6a8","unresolved":false,"context_lines":[{"line_number":3390,"context_line":"            else:"},{"line_number":3391,"context_line":"                host_status \u003d None"},{"line_number":3392,"context_line":"            host_statuses[instance.uuid] \u003d host_status"},{"line_number":3393,"context_line":"        return host_statuses"},{"line_number":3394,"context_line":""},{"line_number":3395,"context_line":""},{"line_number":3396,"context_line":"class HostAPI(base.Base):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_b261dcd5","line":3393,"updated":"2015-12-09 20:51:03.000000000","message":"need test for those functions","commit_id":"5224cb62de678ed91c3b47d3310fa67d3dd230fa"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"f774a06da5032a71449b29d4ac6be6729ece7946","unresolved":false,"context_lines":[{"line_number":3390,"context_line":"            else:"},{"line_number":3391,"context_line":"                host_status \u003d None"},{"line_number":3392,"context_line":"            host_statuses[instance.uuid] \u003d host_status"},{"line_number":3393,"context_line":"        return host_statuses"},{"line_number":3394,"context_line":""},{"line_number":3395,"context_line":""},{"line_number":3396,"context_line":"class HostAPI(base.Base):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_0fe43339","line":3393,"in_reply_to":"7a740942_b261dcd5","updated":"2015-12-10 07:35:14.000000000","message":"Thanks, I will look to this after get all the comments of the implementation details.","commit_id":"5224cb62de678ed91c3b47d3310fa67d3dd230fa"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"1139184205a9ad9063ee6e39d957e9cfb5fe174c","unresolved":false,"context_lines":[{"line_number":3366,"context_line":"    def get_instance_host_status(self, instance):"},{"line_number":3367,"context_line":"        if instance[\"host\"] and len(instance[\"services\"]):"},{"line_number":3368,"context_line":"            if instance[\"services\"][0][\u0027forced_down\u0027]:"},{"line_number":3369,"context_line":"                host_status \u003d \"DOWN\""},{"line_number":3370,"context_line":"            elif instance[\"services\"][0][\u0027disabled\u0027]:"},{"line_number":3371,"context_line":"                host_status \u003d \"MAINTENANCE\""},{"line_number":3372,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a7e1126_483947d6","line":3369,"updated":"2015-12-21 10:32:09.000000000","message":"According to the spec http://specs.openstack.org/openstack/nova-specs/specs/mitaka/approved/get-valid-server-state.html , this case is \"EXTERNALLY_DEFINED_TO_BE_DOWN\" right?","commit_id":"bb2afbe940c9a69e124bf116d166b9a0dd924ca8"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"7de5f65cecd079cda433bfe7d1742beb360e03e2","unresolved":false,"context_lines":[{"line_number":3366,"context_line":"    def get_instance_host_status(self, instance):"},{"line_number":3367,"context_line":"        if instance[\"host\"] and len(instance[\"services\"]):"},{"line_number":3368,"context_line":"            if instance[\"services\"][0][\u0027forced_down\u0027]:"},{"line_number":3369,"context_line":"                host_status \u003d \"DOWN\""},{"line_number":3370,"context_line":"            elif instance[\"services\"][0][\u0027disabled\u0027]:"},{"line_number":3371,"context_line":"                host_status \u003d \"MAINTENANCE\""},{"line_number":3372,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a7e1126_639ea408","line":3369,"in_reply_to":"3a7e1126_483947d6","updated":"2015-12-21 11:01:38.000000000","message":"Hi, yes this has been argued that could be DOWN instead of EXTERNALLY_DEFINED_TO_BE_DOWN.","commit_id":"bb2afbe940c9a69e124bf116d166b9a0dd924ca8"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"2659ef46a7c7cb8d9fd379090924604c51e606b1","unresolved":false,"context_lines":[{"line_number":3366,"context_line":"    def get_instance_host_status(self, instance):"},{"line_number":3367,"context_line":"        if instance[\"host\"] and len(instance[\"services\"]):"},{"line_number":3368,"context_line":"            if instance[\"services\"][0][\u0027forced_down\u0027]:"},{"line_number":3369,"context_line":"                host_status \u003d \"DOWN\""},{"line_number":3370,"context_line":"            elif instance[\"services\"][0][\u0027disabled\u0027]:"},{"line_number":3371,"context_line":"                host_status \u003d \"MAINTENANCE\""},{"line_number":3372,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a7e1126_91d3d3d4","line":3369,"in_reply_to":"3a7e1126_639ea408","updated":"2015-12-21 12:38:47.000000000","message":"If necessary to change API side, it is nice to post a *nova-spec* patch before this.","commit_id":"bb2afbe940c9a69e124bf116d166b9a0dd924ca8"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"bb861058dc43714c8eea0bbcac70722bae9dd35e","unresolved":false,"context_lines":[{"line_number":3366,"context_line":"    def get_instance_host_status(self, instance):"},{"line_number":3367,"context_line":"        if instance[\"host\"] and len(instance[\"services\"]):"},{"line_number":3368,"context_line":"            if instance[\"services\"][0][\u0027forced_down\u0027]:"},{"line_number":3369,"context_line":"                host_status \u003d \"DOWN\""},{"line_number":3370,"context_line":"            elif instance[\"services\"][0][\u0027disabled\u0027]:"},{"line_number":3371,"context_line":"                host_status \u003d \"MAINTENANCE\""},{"line_number":3372,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a7e1126_b5bef0ab","line":3369,"in_reply_to":"3a7e1126_91d3d3d4","updated":"2015-12-21 16:11:01.000000000","message":"ok, have to deal with this. Either have code lined with spec or change spec if still can do that.","commit_id":"bb2afbe940c9a69e124bf116d166b9a0dd924ca8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a4a33097cf55b0a58509e03e5606cb4c91ac5a5a","unresolved":false,"context_lines":[{"line_number":3307,"context_line":"                context, instances_by_host[host], events_by_host[host])"},{"line_number":3308,"context_line":""},{"line_number":3309,"context_line":"    def get_instance_host_status(self, instance):"},{"line_number":3310,"context_line":"        if instance[\"host\"] and len(instance[\"services\"]):"},{"line_number":3311,"context_line":"            if instance[\"services\"][0][\u0027forced_down\u0027]:"},{"line_number":3312,"context_line":"                host_status \u003d \"DOWN\""},{"line_number":3313,"context_line":"            elif instance[\"services\"][0][\u0027disabled\u0027]:"}],"source_content_type":"text/x-python","patch_set":13,"id":"da6ed579_64d5e341","line":3310,"updated":"2016-01-12 18:28:16.000000000","message":"Please use object notation instead of dict notation, to be consistent with your use of object notation below.","commit_id":"f35b4096172e74adce15c105a888ebd364d5219a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a4a33097cf55b0a58509e03e5606cb4c91ac5a5a","unresolved":false,"context_lines":[{"line_number":3308,"context_line":""},{"line_number":3309,"context_line":"    def get_instance_host_status(self, instance):"},{"line_number":3310,"context_line":"        if instance[\"host\"] and len(instance[\"services\"]):"},{"line_number":3311,"context_line":"            if instance[\"services\"][0][\u0027forced_down\u0027]:"},{"line_number":3312,"context_line":"                host_status \u003d \"DOWN\""},{"line_number":3313,"context_line":"            elif instance[\"services\"][0][\u0027disabled\u0027]:"},{"line_number":3314,"context_line":"                host_status \u003d \"MAINTENANCE\""}],"source_content_type":"text/x-python","patch_set":13,"id":"da6ed579_195329e3","line":3311,"updated":"2016-01-12 18:28:16.000000000","message":"So, we are just taking the first service in the list returned? What if the nova-network service is returned, not the nova-compute service?","commit_id":"f35b4096172e74adce15c105a888ebd364d5219a"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"68212d7f2fcaf2a0676a7d7a3781db796b82f31b","unresolved":false,"context_lines":[{"line_number":3308,"context_line":""},{"line_number":3309,"context_line":"    def get_instance_host_status(self, instance):"},{"line_number":3310,"context_line":"        if instance[\"host\"] and len(instance[\"services\"]):"},{"line_number":3311,"context_line":"            if instance[\"services\"][0][\u0027forced_down\u0027]:"},{"line_number":3312,"context_line":"                host_status \u003d \"DOWN\""},{"line_number":3313,"context_line":"            elif instance[\"services\"][0][\u0027disabled\u0027]:"},{"line_number":3314,"context_line":"                host_status \u003d \"MAINTENANCE\""}],"source_content_type":"text/x-python","patch_set":13,"id":"da6ed579_7f46c024","line":3311,"in_reply_to":"da6ed579_195329e3","updated":"2016-01-12 19:20:30.000000000","message":"This was fast to implement like this and nova-compute is explicitly mentioned in model to be the only service currently fetched. Anyhow might be of concern if somebody will change that to get other service.","commit_id":"f35b4096172e74adce15c105a888ebd364d5219a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a4a33097cf55b0a58509e03e5606cb4c91ac5a5a","unresolved":false,"context_lines":[{"line_number":3311,"context_line":"            if instance[\"services\"][0][\u0027forced_down\u0027]:"},{"line_number":3312,"context_line":"                host_status \u003d \"DOWN\""},{"line_number":3313,"context_line":"            elif instance[\"services\"][0][\u0027disabled\u0027]:"},{"line_number":3314,"context_line":"                host_status \u003d \"MAINTENANCE\""},{"line_number":3315,"context_line":"            else:"},{"line_number":3316,"context_line":"                alive \u003d self.servicegroup_api.service_is_up("},{"line_number":3317,"context_line":"                        instance[\"services\"][0])"}],"source_content_type":"text/x-python","patch_set":13,"id":"da6ed579_b92c5d4b","line":3314,"updated":"2016-01-12 18:28:16.000000000","message":"suggestion for a future patch: would be good to convert these hard-coded strings into a nova.objects.fields.Enum type...","commit_id":"f35b4096172e74adce15c105a888ebd364d5219a"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"68212d7f2fcaf2a0676a7d7a3781db796b82f31b","unresolved":false,"context_lines":[{"line_number":3311,"context_line":"            if instance[\"services\"][0][\u0027forced_down\u0027]:"},{"line_number":3312,"context_line":"                host_status \u003d \"DOWN\""},{"line_number":3313,"context_line":"            elif instance[\"services\"][0][\u0027disabled\u0027]:"},{"line_number":3314,"context_line":"                host_status \u003d \"MAINTENANCE\""},{"line_number":3315,"context_line":"            else:"},{"line_number":3316,"context_line":"                alive \u003d self.servicegroup_api.service_is_up("},{"line_number":3317,"context_line":"                        instance[\"services\"][0])"}],"source_content_type":"text/x-python","patch_set":13,"id":"da6ed579_bf30b857","line":3314,"in_reply_to":"da6ed579_b92c5d4b","updated":"2016-01-12 19:20:30.000000000","message":"ok, I will look this. Was earlier wondering the enum stuff to return sting, but now I think I am getting this when looking that fields.py","commit_id":"f35b4096172e74adce15c105a888ebd364d5219a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"dcdd412f1fc55fbbfca798f6a255215df715debb","unresolved":false,"context_lines":[{"line_number":3321,"context_line":"                    host_status \u003d ((alive and fields_obj.HostStatus.UP) or"},{"line_number":3322,"context_line":"                                   fields_obj.HostStatus.UNKNOWN)"},{"line_number":3323,"context_line":"            except IndexError:"},{"line_number":3324,"context_line":"                host_status \u003d fields_obj.HostStatus.NONE"},{"line_number":3325,"context_line":"        else:"},{"line_number":3326,"context_line":"            host_status \u003d fields_obj.HostStatus.NONE"},{"line_number":3327,"context_line":"        return host_status"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_359a6e64","line":3324,"updated":"2016-01-13 17:54:29.000000000","message":"Hmm, why isn\u0027t this just None?","commit_id":"08467c0fcb624568c06ee6ff794336f167294b67"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"bf2c1d2a4323ffc4e89d7576c6018bd361aa53ff","unresolved":false,"context_lines":[{"line_number":3321,"context_line":"                    host_status \u003d ((alive and fields_obj.HostStatus.UP) or"},{"line_number":3322,"context_line":"                                   fields_obj.HostStatus.UNKNOWN)"},{"line_number":3323,"context_line":"            except IndexError:"},{"line_number":3324,"context_line":"                host_status \u003d fields_obj.HostStatus.NONE"},{"line_number":3325,"context_line":"        else:"},{"line_number":3326,"context_line":"            host_status \u003d fields_obj.HostStatus.NONE"},{"line_number":3327,"context_line":"        return host_status"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_d5543222","line":3324,"in_reply_to":"da6ed579_359a6e64","updated":"2016-01-13 17:57:38.000000000","message":"Yes, could as it is not really state for this.","commit_id":"08467c0fcb624568c06ee6ff794336f167294b67"}],"nova/objects/fields.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"50cee06fa1a63d2d880c05d92022e68f82998591","unresolved":false,"context_lines":[{"line_number":426,"context_line":"    DOWN \u003d \"DOWN\"  # The nova-compute is forced_down."},{"line_number":427,"context_line":"    MAINTENANCE \u003d \"MAINTENANCE\"  # The nova-compute is disabled."},{"line_number":428,"context_line":"    UNKNOWN \u003d \"UNKNOWN\"  # The nova-compute has not reported."},{"line_number":429,"context_line":"    NONE \u003d \"\"  # No host or nova-compute."},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"    ALL \u003d (UP, DOWN, MAINTENANCE, UNKNOWN, NONE)"},{"line_number":432,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"da6ed579_5fec2f8f","line":429,"updated":"2016-01-17 17:01:26.000000000","message":"This field isn\u0027t actually used by any objects at the moment (hence no hash changes in this patch) therefore it\u0027s fine to do with without any impact to versions, etc.","commit_id":"9345d5835fb8ff6a3534122c3c13620547862e95"}],"nova/objects/instance.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"20fc2abe1d3b555d6e9e1e21fff423c60b60f844","unresolved":false,"context_lines":[{"line_number":87,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":88,"context_line":"class Instance(base.NovaPersistentObject, base.NovaObject,"},{"line_number":89,"context_line":"               base.NovaObjectDictCompat):"},{"line_number":90,"context_line":"    # Version 2.0: Initial version"},{"line_number":91,"context_line":"    VERSION \u003d \u00272.1\u0027"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_badd1f16","line":90,"updated":"2015-12-04 12:44:53.000000000","message":"we should have \u00272.1\u0027\u0027s log at here.","commit_id":"577783a6fdc71930e24da9f8f26d80611ad07440"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"ed71a25e1c9498b7daeade4afee875475c29d338","unresolved":false,"context_lines":[{"line_number":87,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":88,"context_line":"class Instance(base.NovaPersistentObject, base.NovaObject,"},{"line_number":89,"context_line":"               base.NovaObjectDictCompat):"},{"line_number":90,"context_line":"    # Version 2.0: Initial version"},{"line_number":91,"context_line":"    VERSION \u003d \u00272.1\u0027"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_98783391","line":90,"in_reply_to":"7a740942_40867a66","updated":"2015-12-07 05:19:39.000000000","message":"yes","commit_id":"577783a6fdc71930e24da9f8f26d80611ad07440"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f6397265a2b7b1ab995c8378a1faee0952a5b8ad","unresolved":false,"context_lines":[{"line_number":87,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":88,"context_line":"class Instance(base.NovaPersistentObject, base.NovaObject,"},{"line_number":89,"context_line":"               base.NovaObjectDictCompat):"},{"line_number":90,"context_line":"    # Version 2.0: Initial version"},{"line_number":91,"context_line":"    VERSION \u003d \u00272.1\u0027"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_40867a66","line":90,"in_reply_to":"7a740942_badd1f16","updated":"2015-12-04 16:43:47.000000000","message":"Yep!","commit_id":"577783a6fdc71930e24da9f8f26d80611ad07440"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"743a808f672f16c7c433eee014a818058d9228c5","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        \u0027vm_state\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":110,"context_line":"        \u0027task_state\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        \u0027host_status\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        \u0027memory_mb\u0027: fields.IntegerField(nullable\u003dTrue),"},{"line_number":115,"context_line":"        \u0027vcpus\u0027: fields.IntegerField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_0ec46b3e","line":112,"updated":"2015-12-03 15:14:41.000000000","message":"So, I was actually thinking that we\u0027d return the actual service object here, instead of make the status a property of the instance. I\u0027m not sure I\u0027m opposed to doing it this way, but it would probably be good to get some feedback from other people on whether they think we should get back the calculated status, or the service object and calculate it in the api.\n\nEither way, if we are going to take the approach you have here, this needs to be an EnumField and not just a string.","commit_id":"577783a6fdc71930e24da9f8f26d80611ad07440"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"ce8777c347e82b00ff75e84a47e55ba16f32c6ef","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        \u0027vm_state\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":110,"context_line":"        \u0027task_state\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        \u0027host_status\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        \u0027memory_mb\u0027: fields.IntegerField(nullable\u003dTrue),"},{"line_number":115,"context_line":"        \u0027vcpus\u0027: fields.IntegerField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_551afb6f","line":112,"in_reply_to":"7a740942_0ec46b3e","updated":"2015-12-03 16:45:15.000000000","message":"yes, changing to enum. Otherwise totally agree about the more comments on which way to go.","commit_id":"577783a6fdc71930e24da9f8f26d80611ad07440"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"0fd913c00dcbc4baa187c35411400470f23ab1ab","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        \u0027vm_state\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":110,"context_line":"        \u0027task_state\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        \u0027host_status\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        \u0027memory_mb\u0027: fields.IntegerField(nullable\u003dTrue),"},{"line_number":115,"context_line":"        \u0027vcpus\u0027: fields.IntegerField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_8942553d","line":112,"in_reply_to":"7a740942_551afb6f","updated":"2015-12-04 15:17:09.000000000","message":"I think that the API should be provided the service object and calculate the status there.  I really don\u0027t see why the host is being attached to the instance object like this, I would expect the relationship to be the other way and a host has a list of instances.  But setting that aside why isn\u0027t _host_status_from_db_and_sg a compute/api.py method that the API can use to get this detail and not require the instance to carry around this data?","commit_id":"577783a6fdc71930e24da9f8f26d80611ad07440"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"ed71a25e1c9498b7daeade4afee875475c29d338","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        \u0027vm_state\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":110,"context_line":"        \u0027task_state\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        \u0027host_status\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        \u0027memory_mb\u0027: fields.IntegerField(nullable\u003dTrue),"},{"line_number":115,"context_line":"        \u0027vcpus\u0027: fields.IntegerField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_98511311","line":112,"in_reply_to":"7a740942_80e30233","updated":"2015-12-07 05:19:39.000000000","message":"Ok, I\u0027ll work have here some \"service\" then instead holding that object.","commit_id":"577783a6fdc71930e24da9f8f26d80611ad07440"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f6397265a2b7b1ab995c8378a1faee0952a5b8ad","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        \u0027vm_state\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":110,"context_line":"        \u0027task_state\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        \u0027host_status\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        \u0027memory_mb\u0027: fields.IntegerField(nullable\u003dTrue),"},{"line_number":115,"context_line":"        \u0027vcpus\u0027: fields.IntegerField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_80e30233","line":112,"in_reply_to":"7a740942_8942553d","updated":"2015-12-04 16:43:47.000000000","message":"Yeah, that\u0027s how I was originally expecting to do it and I think it makes more sense (pushes the view closer to the API). Grabbing the instance with its full service may be useful to other calls, and limiting this to just a calculated host state would limit that.","commit_id":"577783a6fdc71930e24da9f8f26d80611ad07440"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"743a808f672f16c7c433eee014a818058d9228c5","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                alive \u003d self.servicegroup_api.service_is_up(service)"},{"line_number":278,"context_line":"                self[\"host_status\"] \u003d (alive and \"UP\") or \"UNKNOWN\""},{"line_number":279,"context_line":"        except exception.ComputeHostNotFound:"},{"line_number":280,"context_line":"            self[\"host_status\"] \u003d \"\""},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def _set_host_status(self, host_status_dict\u003dNone):"},{"line_number":283,"context_line":"        \"\"\"Set nova-compute status information\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_eecb1f1d","line":280,"updated":"2015-12-03 15:14:41.000000000","message":"So, this ends up making two additional calls: one to the db to get the service object and another to the SG api to get the status. The latter is unavoidable I think, but I was thinking we\u0027d try to yank the service object with a join. However, I think we\u0027ll hit the same problem we did with sysmeta, where the service object and instance object rows are multiplied together, which makes it a very large result. So, maybe this is better.","commit_id":"577783a6fdc71930e24da9f8f26d80611ad07440"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"20fc2abe1d3b555d6e9e1e21fff423c60b60f844","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                alive \u003d self.servicegroup_api.service_is_up(service)"},{"line_number":278,"context_line":"                self[\"host_status\"] \u003d (alive and \"UP\") or \"UNKNOWN\""},{"line_number":279,"context_line":"        except exception.ComputeHostNotFound:"},{"line_number":280,"context_line":"            self[\"host_status\"] \u003d \"\""},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def _set_host_status(self, host_status_dict\u003dNone):"},{"line_number":283,"context_line":"        \"\"\"Set nova-compute status information\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_67f39b0b","line":280,"in_reply_to":"7a740942_08bbfbc5","updated":"2015-12-04 12:44:53.000000000","message":"I\u0027m thinking what happened for booting new server. When creating service, there isn\u0027t a host for new service. So the service field will be None. After the server created, we need query db again to get the service obj for instance.\nSo i\u0027m thinking maybe add host_status as python property is good. And the SG API\u0027s is_up was based on the service\u0027s update_at field. If we get the instance join with service obj in the early stage of the request, if someone try to get the host_status and use the existed old service obj, that will be wrong.","commit_id":"577783a6fdc71930e24da9f8f26d80611ad07440"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f6397265a2b7b1ab995c8378a1faee0952a5b8ad","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                alive \u003d self.servicegroup_api.service_is_up(service)"},{"line_number":278,"context_line":"                self[\"host_status\"] \u003d (alive and \"UP\") or \"UNKNOWN\""},{"line_number":279,"context_line":"        except exception.ComputeHostNotFound:"},{"line_number":280,"context_line":"            self[\"host_status\"] \u003d \"\""},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def _set_host_status(self, host_status_dict\u003dNone):"},{"line_number":283,"context_line":"        \"\"\"Set nova-compute status information\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_0013920e","line":280,"in_reply_to":"7a740942_67f39b0b","updated":"2015-12-04 16:43:47.000000000","message":"This is only an API-centric thing at the moment, so we don\u0027t have a long-lived instance object anyway.\n\nWhen we go to query the instance from the API side, we\u0027ll request that it include the service object (if any) and then we won\u0027t have to make further calls (except to the SG API) to get more information.","commit_id":"577783a6fdc71930e24da9f8f26d80611ad07440"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"ce8777c347e82b00ff75e84a47e55ba16f32c6ef","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                alive \u003d self.servicegroup_api.service_is_up(service)"},{"line_number":278,"context_line":"                self[\"host_status\"] \u003d (alive and \"UP\") or \"UNKNOWN\""},{"line_number":279,"context_line":"        except exception.ComputeHostNotFound:"},{"line_number":280,"context_line":"            self[\"host_status\"] \u003d \"\""},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def _set_host_status(self, host_status_dict\u003dNone):"},{"line_number":283,"context_line":"        \"\"\"Set nova-compute status information\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_08bbfbc5","line":280,"in_reply_to":"7a740942_eecb1f1d","updated":"2015-12-03 16:45:15.000000000","message":"I had to think this also for some time. Would need to carry all the useless service stuff in each instance object where as now only look each host/service pair once here and only carry then the translated result. There is really down side in both solutions while this one doesn\u0027t have now the easier approach if one wants to have something more from instance shown.","commit_id":"577783a6fdc71930e24da9f8f26d80611ad07440"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"743a808f672f16c7c433eee014a818058d9228c5","unresolved":false,"context_lines":[{"line_number":292,"context_line":"                    self[\"host_status\"] \u003d host_status_dict[self.host]"},{"line_number":293,"context_line":"        else:"},{"line_number":294,"context_line":"            # No host yet, so empty string"},{"line_number":295,"context_line":"            self[\"host_status\"] \u003d \"\""},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    @staticmethod"},{"line_number":298,"context_line":"    def _from_db_object(context, instance, db_inst, expected_attrs\u003dNone,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_31e42a3a","line":295,"updated":"2015-12-03 15:14:41.000000000","message":"This property should probably be nullable and \u003dNone if there is no host and thus no status.","commit_id":"577783a6fdc71930e24da9f8f26d80611ad07440"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"ce8777c347e82b00ff75e84a47e55ba16f32c6ef","unresolved":false,"context_lines":[{"line_number":292,"context_line":"                    self[\"host_status\"] \u003d host_status_dict[self.host]"},{"line_number":293,"context_line":"        else:"},{"line_number":294,"context_line":"            # No host yet, so empty string"},{"line_number":295,"context_line":"            self[\"host_status\"] \u003d \"\""},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    @staticmethod"},{"line_number":298,"context_line":"    def _from_db_object(context, instance, db_inst, expected_attrs\u003dNone,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_48c1032e","line":295,"in_reply_to":"7a740942_31e42a3a","updated":"2015-12-03 16:45:15.000000000","message":"yes","commit_id":"577783a6fdc71930e24da9f8f26d80611ad07440"}],"nova/tests/functional/api_sample_tests/api_samples/os-extended-server-attributes/v2.16/servers-detail-resp.json.tpl":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"e353bb4802a20f455d3b33d33af54db43bbfc244","unresolved":false,"context_lines":[{"line_number":4,"context_line":"            \"OS-EXT-SRV-ATTR:host\": \"%(compute_host)s\","},{"line_number":5,"context_line":"            \"OS-EXT-SRV-ATTR:hypervisor_hostname\": \"%(hypervisor_hostname)s\","},{"line_number":6,"context_line":"            \"OS-EXT-SRV-ATTR:instance_name\": \"%(instance_name)s\","},{"line_number":7,"context_line":"\t        \"OS-EXT-SRV-ATTR:hostname\": \"new-server-test\","},{"line_number":8,"context_line":"\t        \"OS-EXT-SRV-ATTR:launch_index\": \"0\","},{"line_number":9,"context_line":"\t        \"OS-EXT-SRV-ATTR:reservation_id\": \"%(reservation_id)s\","},{"line_number":10,"context_line":"\t        \"OS-EXT-SRV-ATTR:root_device_name\": \"/dev/sda\","},{"line_number":11,"context_line":"\t        \"OS-EXT-SRV-ATTR:kernel_id\": null,"},{"line_number":12,"context_line":"\t        \"OS-EXT-SRV-ATTR:ramdisk_id\": null,"},{"line_number":13,"context_line":"\t        \"OS-EXT-SRV-ATTR:user_data\": null,"},{"line_number":14,"context_line":"\t        \"locked\": false,"},{"line_number":15,"context_line":"            \"accessIPv4\": \"%(access_ip_v4)s\","},{"line_number":16,"context_line":"            \"accessIPv6\": \"%(access_ip_v6)s\","},{"line_number":17,"context_line":"            \"updated\": \"%(isotime)s\","}],"source_content_type":"text/x-smarty","patch_set":20,"id":"da6ed579_029c0e68","line":14,"range":{"start_line":7,"start_character":0,"end_line":14,"end_character":25},"updated":"2016-01-18 08:49:45.000000000","message":"ditto","commit_id":"9345d5835fb8ff6a3534122c3c13620547862e95"}],"nova/tests/unit/api/openstack/test_wsgi.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"2a3af5483551cda25a46497b0202d312df848171","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    @mock.patch(\"nova.api.openstack.api_version_request.max_api_version\")"},{"line_number":163,"context_line":"    def test_api_version_request_header(self, mock_maxver):"},{"line_number":164,"context_line":"        mock_maxver.return_value \u003d api_version.APIVersionRequest(\"2.16\")"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        request \u003d wsgi.Request.blank(\u0027/\u0027)"},{"line_number":167,"context_line":"        request.headers \u003d {self.header_name: \u00272.16\u0027}"},{"line_number":168,"context_line":"        request.set_api_version_request()"},{"line_number":169,"context_line":"        self.assertEqual(api_version.APIVersionRequest(\"2.16\"),"},{"line_number":170,"context_line":"                         request.api_version_request)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    @mock.patch(\"nova.api.openstack.api_version_request.max_api_version\")"},{"line_number":173,"context_line":"    def test_api_version_request_header_latest(self, mock_maxver):"}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_de615caa","line":170,"range":{"start_line":164,"start_character":8,"end_line":170,"end_character":53},"updated":"2016-01-15 00:35:58.000000000","message":"I thought we needn\u0027t change this test","commit_id":"b11fbf8ad9a85f6b07f8228aa2fe099879fb647d"},{"author":{"_account_id":15834,"name":"Tomi Juvonen","email":"tomi.juvonen@nokia.com","username":"tojuvone"},"change_message_id":"37f8d990e11ea6bfa37b7ccf190dcc078ae985bc","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    @mock.patch(\"nova.api.openstack.api_version_request.max_api_version\")"},{"line_number":163,"context_line":"    def test_api_version_request_header(self, mock_maxver):"},{"line_number":164,"context_line":"        mock_maxver.return_value \u003d api_version.APIVersionRequest(\"2.16\")"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        request \u003d wsgi.Request.blank(\u0027/\u0027)"},{"line_number":167,"context_line":"        request.headers \u003d {self.header_name: \u00272.16\u0027}"},{"line_number":168,"context_line":"        request.set_api_version_request()"},{"line_number":169,"context_line":"        self.assertEqual(api_version.APIVersionRequest(\"2.16\"),"},{"line_number":170,"context_line":"                         request.api_version_request)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    @mock.patch(\"nova.api.openstack.api_version_request.max_api_version\")"},{"line_number":173,"context_line":"    def test_api_version_request_header_latest(self, mock_maxver):"}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_637c50ec","line":170,"range":{"start_line":164,"start_character":8,"end_line":170,"end_character":53},"in_reply_to":"da6ed579_de615caa","updated":"2016-01-15 05:55:33.000000000","message":"ok, my bad. Got confuced by the max version thingy.","commit_id":"b11fbf8ad9a85f6b07f8228aa2fe099879fb647d"}],"nova/tests/unit/compute/test_compute_api.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9765cb1f650ba5f228652840019985a3d624cb5a","unresolved":false,"context_lines":[{"line_number":3035,"context_line":"        # test cases will work."},{"line_number":3036,"context_line":"        timeutils.clear_time_override()"},{"line_number":3037,"context_line":"        instances \u003d ["},{"line_number":3038,"context_line":"            objects.Instance(uuid\u003d\u0027uuid1\u0027, host\u003d\u0027host1\u0027, services\u003d"},{"line_number":3039,"context_line":"                             self._obj_to_list_obj(objects.ServiceList("},{"line_number":3040,"context_line":"                             self.context), objects.Service(id\u003d0, host\u003d\u0027host1\u0027,"},{"line_number":3041,"context_line":"                             disabled\u003dTrue, forced_down\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":19,"id":"da6ed579_bf4d2bc6","line":3038,"updated":"2016-01-17 17:00:24.000000000","message":"It would be good if you can follow up with a change to convert these to using the uuidsentinels approach that we\u0027re currently trying to pursue.","commit_id":"53898514fc00c9fff46680c9c3b678c04c051741"}]}
