)]}'
{"tempest/lib/api_schema/response/compute/v2_1/servers.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"62f065869caf3a59c75a8207cc907aefca8f87df","unresolved":false,"context_lines":[{"line_number":421,"context_line":"            \u0027event\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":422,"context_line":"            \u0027start_time\u0027: parameter_types.date_time,"},{"line_number":423,"context_line":"            \u0027finish_time\u0027: parameter_types.date_time_or_null,"},{"line_number":424,"context_line":"            \u0027result\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":425,"context_line":"            \u0027traceback\u0027: {\u0027type\u0027: [\u0027string\u0027, \u0027null\u0027]}"},{"line_number":426,"context_line":"        },"},{"line_number":427,"context_line":"        \u0027additionalProperties\u0027: False,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f1d235d_b0c9c126","line":424,"updated":"2017-07-06 23:16:31.000000000","message":"Same issue for result - it\u0027s None until the event is actually finished, and that\u0027s when finish_time, result and optionally traceback will be set:\n\nhttp://logs.openstack.org/78/480778/2/check/gate-tempest-dsvm-neutron-full-ubuntu-xenial/5db458f/console.html#_2017-07-06_22_23_47_998707","commit_id":"9150de50af79384cbe35734a42ce433a8c90e707"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"013daf84ac9de640c1ed35c646c4332b54613fc7","unresolved":false,"context_lines":[{"line_number":419,"context_line":"        \u0027type\u0027: \u0027object\u0027,"},{"line_number":420,"context_line":"        \u0027properties\u0027: {"},{"line_number":421,"context_line":"            \u0027event\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":422,"context_line":"            \u0027start_time\u0027: parameter_types.date_time,"},{"line_number":423,"context_line":"            # The finish_time, result and optionally traceback are all"},{"line_number":424,"context_line":"            # possibly None (null) until the event is actually finished."},{"line_number":425,"context_line":"            # The traceback would only be set if there was an error, but"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f1d235d_b170400a","line":422,"range":{"start_line":422,"start_character":0,"end_line":422,"end_character":52},"updated":"2017-07-11 09:31:31.000000000","message":"this also can be null. as you mentioned in commit msg- Decorator wrap_instance_event() is used on nova compute service side in manager.py [1] and for async call controller(n-api service) can return even before event_start()[2].\nIn that case start_time also can be null. Although the time diff will be minimal. \n\nI tested this locally(with reboot) and found api service return before ~1 sec event_start() and ~7 sec before event_finish().\nso theoretically, a paralleled API call to instance action can give you start_time also null.\n\n\n.. 1 https://github.com/openstack/nova/blob/0b9bacb3ef29f59f1461ce62f65f9d1f6efab761/nova/compute/manager.py#L3020\n\n..2 https://github.com/openstack/nova/blob/4f91ed3a547965ed96a22520edcfb783e7936e95/nova/objects/instance_action.py#L166","commit_id":"88119644bca5cb84aa7b0b32675373468f8c5a02"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"606e2df621fd72aa6366ca5f0d7ea19ccb6e17e7","unresolved":false,"context_lines":[{"line_number":419,"context_line":"        \u0027type\u0027: \u0027object\u0027,"},{"line_number":420,"context_line":"        \u0027properties\u0027: {"},{"line_number":421,"context_line":"            \u0027event\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":422,"context_line":"            \u0027start_time\u0027: parameter_types.date_time,"},{"line_number":423,"context_line":"            # The finish_time, result and optionally traceback are all"},{"line_number":424,"context_line":"            # possibly None (null) until the event is actually finished."},{"line_number":425,"context_line":"            # The traceback would only be set if there was an error, but"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_41a961dd","line":422,"range":{"start_line":422,"start_character":0,"end_line":422,"end_character":52},"in_reply_to":"3f1d235d_a927b0b6","updated":"2017-07-12 14:38:31.000000000","message":"yea, you are right, events in DB are created from event_start so start_time is always non none.\n\nWhile checking this, i found all those keys are optional. i mean \u0027events\u0027 response key can be empty list.\n\nBut this schema as well as nova api-ref shows them as mandatory.\ncreated Bug got nova api-ref - https://bugs.launchpad.net/nova/+bug/1703844\n\nBut if you can fix schema for that case also. i commented on tempest bug.","commit_id":"88119644bca5cb84aa7b0b32675373468f8c5a02"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"de429ab9e4d45a49feeba7df75b58ce939619722","unresolved":false,"context_lines":[{"line_number":419,"context_line":"        \u0027type\u0027: \u0027object\u0027,"},{"line_number":420,"context_line":"        \u0027properties\u0027: {"},{"line_number":421,"context_line":"            \u0027event\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":422,"context_line":"            \u0027start_time\u0027: parameter_types.date_time,"},{"line_number":423,"context_line":"            # The finish_time, result and optionally traceback are all"},{"line_number":424,"context_line":"            # possibly None (null) until the event is actually finished."},{"line_number":425,"context_line":"            # The traceback would only be set if there was an error, but"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f1d235d_a927b0b6","line":422,"range":{"start_line":422,"start_character":0,"end_line":422,"end_character":52},"in_reply_to":"3f1d235d_b170400a","updated":"2017-07-11 13:54:37.000000000","message":"When an instance action event is created, it\u0027s start_time is set, so yes the API will return before the compute hits the event_start in the decorator, but the creation of the event is atomic with setting the start_time, right? So if you query before event_start, you won\u0027t have an event, so it doesn\u0027t matter, and if you query when there is an event, it would have a start_time set. Am I missing something?","commit_id":"88119644bca5cb84aa7b0b32675373468f8c5a02"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"606e2df621fd72aa6366ca5f0d7ea19ccb6e17e7","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            \u0027traceback\u0027: {\u0027type\u0027: [\u0027string\u0027, \u0027null\u0027]}"},{"line_number":431,"context_line":"        },"},{"line_number":432,"context_line":"        \u0027additionalProperties\u0027: False,"},{"line_number":433,"context_line":"        \u0027required\u0027: [\u0027event\u0027, \u0027start_time\u0027, \u0027finish_time\u0027, \u0027result\u0027,"},{"line_number":434,"context_line":"                     \u0027traceback\u0027]"},{"line_number":435,"context_line":"    }"},{"line_number":436,"context_line":"}"},{"line_number":437,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_a1839556","line":434,"range":{"start_line":433,"start_character":0,"end_line":434,"end_character":33},"updated":"2017-07-12 14:38:31.000000000","message":"this is wrong, none of them are mandatory in response.","commit_id":"88119644bca5cb84aa7b0b32675373468f8c5a02"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"4ff5367ef0fa18a12cf71917523b8dec2a094aed","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            \u0027traceback\u0027: {\u0027type\u0027: [\u0027string\u0027, \u0027null\u0027]}"},{"line_number":431,"context_line":"        },"},{"line_number":432,"context_line":"        \u0027additionalProperties\u0027: False,"},{"line_number":433,"context_line":"        \u0027required\u0027: [\u0027event\u0027, \u0027start_time\u0027, \u0027finish_time\u0027, \u0027result\u0027,"},{"line_number":434,"context_line":"                     \u0027traceback\u0027]"},{"line_number":435,"context_line":"    }"},{"line_number":436,"context_line":"}"},{"line_number":437,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_5e623340","line":434,"range":{"start_line":433,"start_character":0,"end_line":434,"end_character":33},"in_reply_to":"1f1a1f67_8b455373","updated":"2017-07-13 13:27:41.000000000","message":"true but from coding on controller side it is possible :). i commented on nova change - https://review.openstack.org/#/c/482994/1\n\nanyways m not blocking this fix and let\u0027s fix other one if it is bug.","commit_id":"88119644bca5cb84aa7b0b32675373468f8c5a02"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0bd3dc28b5cf4755651a88503b0ff7586e137dbe","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            \u0027traceback\u0027: {\u0027type\u0027: [\u0027string\u0027, \u0027null\u0027]}"},{"line_number":431,"context_line":"        },"},{"line_number":432,"context_line":"        \u0027additionalProperties\u0027: False,"},{"line_number":433,"context_line":"        \u0027required\u0027: [\u0027event\u0027, \u0027start_time\u0027, \u0027finish_time\u0027, \u0027result\u0027,"},{"line_number":434,"context_line":"                     \u0027traceback\u0027]"},{"line_number":435,"context_line":"    }"},{"line_number":436,"context_line":"}"},{"line_number":437,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_8b455373","line":434,"range":{"start_line":433,"start_character":0,"end_line":434,"end_character":33},"in_reply_to":"1f1a1f67_a1839556","updated":"2017-07-12 16:07:53.000000000","message":"I also commented on that in https://review.openstack.org/#/c/482994/ - if they are required or not really depends on the policy. If the policy allows, or you\u0027re an admin, then the \u0027events\u0027 are returned and if the events are returned, then these are all required fields in the response. So the thing that\u0027s really optional at a top level is the \u0027evnents\u0027 key in the response. If that\u0027s not there, then none of these are going to be there as they are sub-items of the \u0027events\u0027 dict. But that\u0027s already covered in instance_actions_with_events where \u0027events\u0027 is added but it\u0027s not required.","commit_id":"88119644bca5cb84aa7b0b32675373468f8c5a02"}]}
