diff --git a/openstack/clustering/v1/_proxy.py b/openstack/clustering/v1/_proxy.py index 01602607d..95e444b85 100644 --- a/openstack/clustering/v1/_proxy.py +++ b/openstack/clustering/v1/_proxy.py @@ -1089,7 +1089,7 @@ class Proxy(proxy2.BaseProxy): """ return self._list(_event.Event, paginated=True, **query) - def wait_for_status(self, resource, status, failures=[], interval=2, + def wait_for_status(self, resource, status, failures=None, interval=2, wait=120): """Wait for a resource to be in a particular status. @@ -1111,6 +1111,7 @@ class Proxy(proxy2.BaseProxy): :raises: :class:`~AttributeError` if the resource does not have a ``status`` attribute. """ + failures = [] if failures is None else failures return resource2.wait_for_status(self, resource, status, failures, interval, wait) diff --git a/openstack/proxy.py b/openstack/proxy.py index f2f286ce5..739301b57 100644 --- a/openstack/proxy.py +++ b/openstack/proxy.py @@ -246,7 +246,7 @@ class BaseProxy(_adapter.OpenStackSDKAdapter): return res.head(self) - def wait_for_status(self, value, status, failures=[], interval=2, + def wait_for_status(self, value, status, failures=None, interval=2, wait=120): """Wait for a resource to be in a particular status. @@ -267,6 +267,7 @@ class BaseProxy(_adapter.OpenStackSDKAdapter): :raises: :class:`~AttributeError` if the resource does not have a status attribute """ + failures = [] if failures is None else failures return resource.wait_for_status(self, value, status, failures, interval, wait) diff --git a/openstack/proxy2.py b/openstack/proxy2.py index c6295699f..9db09fe41 100644 --- a/openstack/proxy2.py +++ b/openstack/proxy2.py @@ -264,7 +264,7 @@ class BaseProxy(_adapter.OpenStackSDKAdapter): "service-specific subclasses should expose " "this as needed. See resource2.wait_for_status " "for this behavior")) - def wait_for_status(self, value, status, failures=[], interval=2, + def wait_for_status(self, value, status, failures=None, interval=2, wait=120): """Wait for a resource to be in a particular status. @@ -285,6 +285,7 @@ class BaseProxy(_adapter.OpenStackSDKAdapter): :raises: :class:`~AttributeError` if the resource does not have a status attribute """ + failures = [] if failures is None else failures return resource2.wait_for_status(self, value, status, failures, interval, wait)