nova/nova/compute/instance_actions.py
He Jie Xu b9fbbc9df0 Report instance-actions for live migration force complete API
There isn't instance-action reported by new live migration force
complete API. This is async API, so there isn't a way for user
to know if there is error happened in this API. This patch add
instance-actions report to it

Change-Id: I29dc8ce0aa576ef55d2a4dfbaa6bd1f2bfd90371
Closes-Bug: #1553050
2016-03-10 15:02:35 +00:00

55 lines
1.7 KiB
Python

# Copyright 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""Possible actions on an instance.
Actions should probably match a user intention at the API level. Because they
can be user visible that should help to avoid confusion. For that reason they
tend to maintain the casing sent to the API.
Maintaining a list of actions here should protect against inconsistencies when
they are used.
The naming style of instance actions should be snake_case, as it will
consistent with the API names. Do not modify the old ones because they have
been exposed to users.
"""
CREATE = 'create'
DELETE = 'delete'
EVACUATE = 'evacuate'
RESTORE = 'restore'
STOP = 'stop'
START = 'start'
REBOOT = 'reboot'
REBUILD = 'rebuild'
REVERT_RESIZE = 'revertResize'
CONFIRM_RESIZE = 'confirmResize'
RESIZE = 'resize'
MIGRATE = 'migrate'
PAUSE = 'pause'
UNPAUSE = 'unpause'
SUSPEND = 'suspend'
RESUME = 'resume'
RESCUE = 'rescue'
UNRESCUE = 'unrescue'
CHANGE_PASSWORD = 'changePassword'
SHELVE = 'shelve'
UNSHELVE = 'unshelve'
LIVE_MIGRATION = 'live-migration'
LIVE_MIGRATION_CANCEL = 'live_migration_cancel'
LIVE_MIGRATION_FORCE_COMPLETE = 'live_migration_force_complete'
TRIGGER_CRASH_DUMP = 'trigger_crash_dump'