diff --git a/heat/engine/clients/os/nova.py b/heat/engine/clients/os/nova.py index cd19b2ea50..311eb713f1 100644 --- a/heat/engine/clients/os/nova.py +++ b/heat/engine/clients/os/nova.py @@ -47,7 +47,7 @@ CLIENT_NAME = 'nova' class NovaClientPlugin(microversion_mixin.MicroversionMixin, client_plugin.ClientPlugin): - deferred_server_statuses = ['BUILD', + deferred_server_statuses = {'BUILD', 'HARD_REBOOT', 'PASSWORD', 'REBOOT', @@ -56,7 +56,7 @@ class NovaClientPlugin(microversion_mixin.MicroversionMixin, 'REVERT_RESIZE', 'SHUTOFF', 'SUSPENDED', - 'VERIFY_RESIZE'] + 'VERIFY_RESIZE'} exceptions_module = exceptions diff --git a/heat/engine/resources/aws/ec2/instance.py b/heat/engine/resources/aws/ec2/instance.py index a829dec051..fc536c29fd 100644 --- a/heat/engine/resources/aws/ec2/instance.py +++ b/heat/engine/resources/aws/ec2/instance.py @@ -865,7 +865,7 @@ class Instance(resource.Resource, sh.SchedulerHintsMixin): status = cp.get_status(server) LOG.debug('%(name)s check_suspend_complete status = %(status)s', {'name': self.name, 'status': status}) - if status in list(cp.deferred_server_statuses + ['ACTIVE']): + if status in (cp.deferred_server_statuses | {'ACTIVE'}): return status == 'SUSPENDED' else: exc = exception.ResourceUnknownStatus( diff --git a/heat/engine/resources/openstack/nova/server.py b/heat/engine/resources/openstack/nova/server.py index c6210f8b97..b48fa83345 100644 --- a/heat/engine/resources/openstack/nova/server.py +++ b/heat/engine/resources/openstack/nova/server.py @@ -1708,7 +1708,7 @@ class Server(server_base.BaseServer, sh.SchedulerHintsMixin, status = cp.get_status(server) LOG.debug('%(name)s check_suspend_complete status = %(status)s', {'name': self.name, 'status': status}) - if status in list(cp.deferred_server_statuses + ['ACTIVE']): + if status in (cp.deferred_server_statuses | {'ACTIVE'}): return status == 'SUSPENDED' else: exc = exception.ResourceUnknownStatus(