'Returns the list of actions recorded for a given instance.'

@extensions.expected_errors(404)
def index(self, req, server_id):

    context = req.environ['nova.context']
    instance = self._get_instance(req, context, server_id)
    context.can(ia_policies.BASE_POLICY_NAME, instance)
    actions_raw = self.action_api.actions_get(context, instance)
    actions = [self._format_action(action) for action in actions_raw]
    return {'instanceActions': actions}
