Remove unused wait_for function
In {volume,orchestration}/base.py, there are same wait_for functions.
However, they are not used now.
This commit removes them.
Change-Id: I796ea1f80e03be3f0a1b5272c7e2b5235291807d
diff --git a/tempest/api/orchestration/base.py b/tempest/api/orchestration/base.py
index f3ef99f..b6c03e0 100644
--- a/tempest/api/orchestration/base.py
+++ b/tempest/api/orchestration/base.py
@@ -12,8 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-import time
-
from tempest import clients
from tempest.common.utils import data_utils
from tempest.openstack.common import log as logging
@@ -118,21 +116,6 @@
cls.clear_keypairs()
super(BaseOrchestrationTest, cls).tearDownClass()
- def wait_for(self, condition):
- """Repeatedly calls condition() until a timeout."""
- start_time = int(time.time())
- while True:
- try:
- condition()
- except Exception:
- pass
- else:
- return
- if int(time.time()) - start_time >= self.build_timeout:
- condition()
- return
- time.sleep(self.build_interval)
-
@staticmethod
def stack_output(stack, output_key):
"""Return a stack output value for a give key."""
diff --git a/tempest/api/volume/base.py b/tempest/api/volume/base.py
index ba99309..af307ea 100644
--- a/tempest/api/volume/base.py
+++ b/tempest/api/volume/base.py
@@ -15,8 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-import time
-
from tempest import clients
from tempest.openstack.common import log as logging
import tempest.test
@@ -114,21 +112,6 @@
except Exception:
pass
- def wait_for(self, condition):
- """Repeatedly calls condition() until a timeout."""
- start_time = int(time.time())
- while True:
- try:
- condition()
- except Exception:
- pass
- else:
- return
- if int(time.time()) - start_time >= self.build_timeout:
- condition()
- return
- time.sleep(self.build_interval)
-
class BaseVolumeAdminTest(BaseVolumeTest):
"""Base test case class for all Volume Admin API tests."""