Add admin actions extension
The optional os-admin-actions extension adds new wsgi_actions to the
volumes/action resource and a new snapshots/action endpoint.
With this extension both controllers will support an os-reset_status
action to force a database update of a volume or snapshot that is stuck
in a failed/incorrect status. The os-reset_status action works
similarly to the compute api's os-reset_state action for instances.
The os-force_delete action behaves similarly to the "cinder-manage
volume delete" command and allows operators/admins to retry the delete
operation after it has gone into an error_deleting status with an admin
api call.
The os-admin-actions extension is enabled by default, but limited to the
admin api by the default policy.json rules. Individual admin actions
can be disabled with policy rules as well.
Example of os-reset_status action on a volume:
curl http://localhost:8776/v1/${PROJECT_ID}/volumes/${VOLUME_ID}/action \
-H 'x-auth-token: ${ADMIN_AUTH_TOKEN}' \
-H 'content-type: application/json' \
-d '{"os-reset_status": {"status": "error"}}'
The new admin only api can assist deployers who encounter bugs or
operational issues that result in failed actions.
It can also be used by future storage backends to support async callback
style status updates from long running actions or operations which have
encountered an error will be retried.
Also updates the api.openstack.wsgi.ControllerMetaclass to support
sub-classing wsgi.Controllers that define wsgi_actions.
Partial fix for bug #
1039706
Change-Id: I29f4b892a99108b6c24eebc3eb58033a9e01e679