Merge "Create image for suspended instance booted from volume"
This commit is contained in:
@@ -2326,7 +2326,8 @@ class API(base.Base):
|
||||
|
||||
# NOTE(melwitt): We don't check instance lock for snapshot because lock is
|
||||
# intended to prevent accidental change/delete of instances
|
||||
@check_instance_state(vm_state=[vm_states.ACTIVE, vm_states.STOPPED])
|
||||
@check_instance_state(vm_state=[vm_states.ACTIVE, vm_states.STOPPED,
|
||||
vm_states.SUSPENDED])
|
||||
def snapshot_volume_backed(self, context, instance, name,
|
||||
extra_properties=None):
|
||||
"""Snapshot the given volume-backed instance.
|
||||
|
||||
@@ -2405,6 +2405,14 @@ class _ComputeAPIUnitTestMixIn(object):
|
||||
self._test_snapshot_volume_backed(True, True,
|
||||
vm_state=vm_states.STOPPED)
|
||||
|
||||
def test_snapshot_volume_backed_with_quiesce_suspended(self):
|
||||
self._test_snapshot_volume_backed(True, True,
|
||||
vm_state=vm_states.SUSPENDED)
|
||||
|
||||
def test_snapshot_volume_backed_with_suspended(self):
|
||||
self._test_snapshot_volume_backed(False, True,
|
||||
vm_state=vm_states.SUSPENDED)
|
||||
|
||||
def test_volume_snapshot_create(self):
|
||||
volume_id = '1'
|
||||
create_info = {'id': 'eyedee'}
|
||||
|
||||
Reference in New Issue
Block a user