nova/nova
Matt Riedemann 70afc0d540 Handle conflicts for os-assisted-volume-snapshots
Since a guest-assisted disk snapshot is performed on the compute
that the instance is running on, there are only certain states
that the instance can be in to perform this operation. For example,
if the instance is shelved_offloaded then the instance does not
have a host and we can't cast to a compute to perform the snapshot.

Given how unrestrictive this API was before, the only restriction
we place on the state is that the instance does not have a task_state
set. We allow any vm_state for performing the operation as long as
there is a host and no task_state.

As noted in the code, we'd normally return a 409 in this case but
according to our microversion docs [1] that would be a new error
code and require a version bump, so this change just uses 400 and
leaves a TODO to make this 409 in a later mass return code update
microversion.

[1] https://docs.openstack.org/developer/nova/api_microversion_dev.html#f1

Change-Id: I1dc54a38f02bb48921bcbc4c2fdcc2c946e783c1
Closes-Bug: #1657585
2017-03-02 15:10:26 -05:00
..
api Handle conflicts for os-assisted-volume-snapshots 2017-03-02 15:10:26 -05:00
CA
cells Remove straggling use of main db flavors in cellsv1 code 2017-02-10 11:59:13 -08:00
cert Integrate OSProfiler and Nova 2017-01-18 15:00:14 +07:00
cloudpipe Rename security_group parameter in compute.API:create 2016-11-10 11:25:43 -05:00
cmd Merge "Fix nova-manage cell_v2 metavar strings" 2017-02-23 18:44:46 +00:00
common cors: update default configuration in config 2016-11-05 20:17:42 -04:00
compute Handle conflicts for os-assisted-volume-snapshots 2017-03-02 15:10:26 -05:00
conductor Make conductor create InstanceAction in the proper cell 2017-02-22 14:40:26 -08:00
conf Fix typos detected by toolkit misspellings. 2017-02-26 13:50:17 +08:00
console Fix novncproxy for python3 2017-02-16 10:04:33 +01:00
consoleauth Integrate OSProfiler and Nova 2017-01-18 15:00:14 +07:00
db Merge "[placement] Add Traits related table to the api database" 2017-03-01 02:16:24 +00:00
hacking Enable global hacking checks and removed local checks 2017-02-10 15:09:37 +01:00
image Merge "conf: remove deprecated image url options" 2017-02-09 12:23:19 +00:00
ipv6
keymgr
locale Imported Translations from Zanata 2016-10-27 08:19:38 +00:00
network Add device_id when creating ports 2017-02-28 13:19:20 +00:00
notifications Merge "[2/3]Replace six.iteritems() with .items()" 2017-01-21 06:55:52 +00:00
objects Merge "Remove unused logging import" 2017-02-27 17:24:54 +00:00
pci [2/3]Replace six.iteritems() with .items() 2017-01-09 09:11:00 +00:00
policies Separate CRUD policy for server_groups 2016-11-21 11:43:13 -05:00
scheduler Merge "Make scheduler get hosts from all cells" 2017-02-23 15:42:32 +00:00
servicegroup Don't use 'updated_at' to check service's status 2016-12-08 09:51:03 +00:00
tests Handle conflicts for os-assisted-volume-snapshots 2017-03-02 15:10:26 -05:00
virt Remove check_attach 2017-02-26 20:34:05 -05:00
vnc
volume Remove check_attach 2017-02-26 20:34:05 -05:00
wsgi Clarify the language in the apache wsgi sample 2017-02-02 15:43:25 -08:00
__init__.py
availability_zones.py Port test_metadata to Python 3 2016-11-29 11:28:24 +08:00
baserpc.py
block_device.py Merge "Fix some typo errors" 2017-02-23 04:09:33 +00:00
cache_utils.py
config.py Integrate OSProfiler and Nova 2017-01-18 15:00:14 +07:00
context.py Make servers API use cell-targeted context 2017-02-22 10:33:51 -08:00
crypto.py
debugger.py
exception_wrapper.py [2/3]Replace six.iteritems() with .items() 2017-01-09 09:11:00 +00:00
exception.py Merge "Raise correct error instead of class exist in Placement API" 2017-02-20 17:20:38 +00:00
filters.py
hash_ring.py
hooks.py
i18n.py
loadables.py
manager.py Integrate OSProfiler and Nova 2017-01-18 15:00:14 +07:00
policy.py [2/3]Replace six.iteritems() with .items() 2017-01-09 09:11:00 +00:00
profiler.py Integrate OSProfiler and Nova 2017-01-18 15:00:14 +07:00
quota.py [2/3]Replace six.iteritems() with .items() 2017-01-09 09:11:00 +00:00
rpc.py Added instance.reboot.error to the legacy notifications 2017-01-27 19:15:41 +00:00
safe_utils.py
service_auth.py Add service_token for nova-cinder interaction 2017-01-11 15:49:16 +00:00
service.py Integrate OSProfiler and Nova 2017-01-18 15:00:14 +07:00
signature_utils.py
test.py Merge "Tests: improve assertJsonEqual diagnostic message" 2017-02-20 21:10:08 +00:00
utils.py Merge "[2/3]Replace six.iteritems() with .items()" 2017-01-21 06:55:52 +00:00
version.py
weights.py Correct some spelling errors 2017-02-25 02:45:30 +00:00
wsgi.py [2/3]Replace six.iteritems() with .items() 2017-01-09 09:11:00 +00:00