Public bug reported:

GET os-instance-actions can return 'events' key in response if it corresponding 
policy permit it.
'events' in response is list of following elements:
{'event', 'start_time', 'finish_time', 'result', 'traceback'}

API ref mentioned those elements in 'events' response key as mandatory
which is not the case.

https://developer.openstack.org/api-ref/compute/?expanded=show-server-
action-details-detail#show-server-action-details

'events' response key can be empty list.

Events in DB are being created when event_start() is called from
decorator wrap_instance_event()

https://github.com/openstack/nova/blob/0ffe7b27892fde243fc1006f800f309c10d66028/nova/objects/instance_action.py#L169

https://github.com/openstack/nova/blob/0ffe7b27892fde243fc1006f800f309c10d66028/nova/db/sqlalchemy/api.py#L6159

and if no events in DB then API controller going to return 'events' as
empty list.

https://github.com/openstack/nova/blob/0ffe7b27892fde243fc1006f800f309c10d66028/nova/api/openstack/compute/instance_actions.py#L86

** Affects: nova
     Importance: Undecided
     Assignee: Ghanshyam Mann (ghanshyammann)
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1703844

Title:
  api-ref for GET os-instance-actions does not list event's
  key(start_time etc) as optional

Status in OpenStack Compute (nova):
  New

Bug description:
  GET os-instance-actions can return 'events' key in response if it 
corresponding policy permit it.
  'events' in response is list of following elements:
  {'event', 'start_time', 'finish_time', 'result', 'traceback'}

  API ref mentioned those elements in 'events' response key as mandatory
  which is not the case.

  https://developer.openstack.org/api-ref/compute/?expanded=show-server-
  action-details-detail#show-server-action-details

  'events' response key can be empty list.

  Events in DB are being created when event_start() is called from
  decorator wrap_instance_event()

  
https://github.com/openstack/nova/blob/0ffe7b27892fde243fc1006f800f309c10d66028/nova/objects/instance_action.py#L169

  
https://github.com/openstack/nova/blob/0ffe7b27892fde243fc1006f800f309c10d66028/nova/db/sqlalchemy/api.py#L6159

  and if no events in DB then API controller going to return 'events' as
  empty list.

  
https://github.com/openstack/nova/blob/0ffe7b27892fde243fc1006f800f309c10d66028/nova/api/openstack/compute/instance_actions.py#L86

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1703844/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to