Merge "Null out instance.availability_zone on shelve offload"
This commit is contained in:
commit
37a4299062
|
@ -3,6 +3,7 @@
|
|||
"payload":{
|
||||
"$ref":"common_payloads/InstanceActionPayload.json#",
|
||||
"nova_object.data":{
|
||||
"availability_zone": null,
|
||||
"block_devices":[],
|
||||
"deleted_at":"2012-10-29T13:42:11Z",
|
||||
"host":null,
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
"payload":{
|
||||
"$ref":"common_payloads/InstanceActionPayload.json#",
|
||||
"nova_object.data":{
|
||||
"availability_zone": null,
|
||||
"block_devices":[],
|
||||
"host":null,
|
||||
"ip_addresses":[],
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
"payload":{
|
||||
"$ref": "common_payloads/InstanceActionPayload.json#",
|
||||
"nova_object.data":{
|
||||
"availability_zone": null,
|
||||
"state": "shelved_offloaded",
|
||||
"power_state": "shutdown",
|
||||
"host": null,
|
||||
|
|
|
@ -578,6 +578,9 @@ class ComputeManager(manager.Manager):
|
|||
# to the database layer.
|
||||
instance.host = None
|
||||
instance.node = None
|
||||
# If the instance is not on a host, it's not in an aggregate and
|
||||
# therefore is not in an availability zone.
|
||||
instance.availability_zone = None
|
||||
|
||||
def _set_instance_obj_error_state(self, context, instance,
|
||||
clean_task_state=False):
|
||||
|
|
|
@ -2756,7 +2756,8 @@ class ServerMovingTests(integrated_helpers.ProviderUsageBaseTestCase):
|
|||
self.api.post_server_action(server['id'], req)
|
||||
self._wait_for_server_parameter(
|
||||
self.api, server, {'status': 'SHELVED_OFFLOADED',
|
||||
'OS-EXT-SRV-ATTR:host': None})
|
||||
'OS-EXT-SRV-ATTR:host': None,
|
||||
'OS-EXT-AZ:availability_zone': ''})
|
||||
source_usages = self._get_provider_usages(source_rp_uuid)
|
||||
self.assertEqual({'VCPU': 0,
|
||||
'MEMORY_MB': 0,
|
||||
|
|
Loading…
Reference in New Issue