Merge "Delete TimeoutException in tempest/exceptions.py"
diff --git a/tempest/api/baremetal/admin/test_nodestates.py b/tempest/api/baremetal/admin/test_nodestates.py
index 1ffea25..e74dd04 100644
--- a/tempest/api/baremetal/admin/test_nodestates.py
+++ b/tempest/api/baremetal/admin/test_nodestates.py
@@ -15,7 +15,7 @@
 from oslo_utils import timeutils
 
 from tempest.api.baremetal.admin import base
-from tempest import exceptions
+from tempest.lib import exceptions
 from tempest import test
 
 
diff --git a/tempest/api/compute/servers/test_attach_interfaces.py b/tempest/api/compute/servers/test_attach_interfaces.py
index a8c59ca..fc6a20f 100644
--- a/tempest/api/compute/servers/test_attach_interfaces.py
+++ b/tempest/api/compute/servers/test_attach_interfaces.py
@@ -20,7 +20,6 @@
 from tempest.common.utils import net_utils
 from tempest.common import waiters
 from tempest import config
-from tempest import exceptions
 from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
@@ -71,7 +70,7 @@
                            '(current %s) within the required time (%s s).' %
                            (port_id, status, interface_status,
                             self.build_timeout))
-                raise exceptions.TimeoutException(message)
+                raise lib_exc.TimeoutException(message)
 
         return body
 
@@ -99,7 +98,7 @@
                 message = ('Port %s failed to detach (device_id %s) within '
                            'the required time (%s s).' %
                            (port_id, device_id, self.build_timeout))
-                raise exceptions.TimeoutException(message)
+                raise lib_exc.TimeoutException(message)
 
         return port
 
@@ -197,7 +196,7 @@
             if len(ifs) == len(_ifs) and timed_out:
                 message = ('Failed to delete interface within '
                            'the required time: %s sec.' % self.build_timeout)
-                raise exceptions.TimeoutException(message)
+                raise lib_exc.TimeoutException(message)
 
         self.assertNotIn(iface['port_id'], [i['port_id'] for i in _ifs])
         return _ifs
diff --git a/tempest/api/orchestration/stacks/test_neutron_resources.py b/tempest/api/orchestration/stacks/test_neutron_resources.py
index 3f45634..a3792b4 100644
--- a/tempest/api/orchestration/stacks/test_neutron_resources.py
+++ b/tempest/api/orchestration/stacks/test_neutron_resources.py
@@ -18,7 +18,7 @@
 from tempest.api.orchestration import base
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
+from tempest.lib import exceptions
 from tempest import test
 
 CONF = config.CONF
diff --git a/tempest/common/waiters.py b/tempest/common/waiters.py
index c1942d6..92bce5f 100644
--- a/tempest/common/waiters.py
+++ b/tempest/common/waiters.py
@@ -92,7 +92,7 @@
             caller = test_utils.find_test_caller()
             if caller:
                 message = '(%s) %s' % (caller, message)
-            raise exceptions.TimeoutException(message)
+            raise lib_exc.TimeoutException(message)
         old_status = server_status
         old_task_state = task_state
 
@@ -111,7 +111,7 @@
             raise exceptions.BuildErrorException(server_id=server_id)
 
         if int(time.time()) - start_time >= client.build_timeout:
-            raise exceptions.TimeoutException
+            raise lib_exc.TimeoutException
 
         time.sleep(client.build_interval)
 
@@ -163,7 +163,7 @@
     caller = test_utils.find_test_caller()
     if caller:
         message = '(%s) %s' % (caller, message)
-    raise exceptions.TimeoutException(message)
+    raise lib_exc.TimeoutException(message)
 
 
 def wait_for_volume_status(client, volume_id, status):
@@ -186,7 +186,7 @@
                        'within the required time (%s s).' %
                        (volume_id, status, volume_status,
                         client.build_timeout))
-            raise exceptions.TimeoutException(message)
+            raise lib_exc.TimeoutException(message)
 
 
 def wait_for_snapshot_status(client, snapshot_id, status):
@@ -207,7 +207,7 @@
                        'within the required time (%s s).' %
                        (snapshot_id, status, snapshot_status,
                         client.build_timeout))
-            raise exceptions.TimeoutException(message)
+            raise lib_exc.TimeoutException(message)
 
 
 def wait_for_backup_status(client, backup_id, status):
@@ -228,7 +228,7 @@
                        '(current %s) within the required time (%s s).' %
                        (backup_id, status, backup_status,
                         client.build_timeout))
-            raise exceptions.TimeoutException(message)
+            raise lib_exc.TimeoutException(message)
 
 
 def wait_for_bm_node_status(client, node_id, attr, status):
@@ -257,7 +257,7 @@
             caller = test_utils.find_test_caller()
             if caller:
                 message = '(%s) %s' % (caller, message)
-            raise exceptions.TimeoutException(message)
+            raise lib_exc.TimeoutException(message)
 
 
 def wait_for_qos_operations(client, qos_id, operation, args=None):
@@ -288,5 +288,5 @@
             raise lib_exc.UnprocessableEntity(msg)
 
         if int(time.time()) - start_time >= client.build_timeout:
-            raise exceptions.TimeoutException
+            raise lib_exc.TimeoutException
         time.sleep(client.build_interval)
diff --git a/tempest/exceptions.py b/tempest/exceptions.py
index 727d54e..43f919a 100644
--- a/tempest/exceptions.py
+++ b/tempest/exceptions.py
@@ -21,10 +21,6 @@
     message = "Invalid service tag"
 
 
-class TimeoutException(exceptions.TempestException):
-    message = "Request timed out"
-
-
 class BuildErrorException(exceptions.TempestException):
     message = "Server %(server_id)s failed to build and is in ERROR status"
 
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 831be99..dd1adc7 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -1287,7 +1287,7 @@
             check_state, timeout, interval):
             msg = ("Timed out waiting for node %s to reach %s state(s) %s" %
                    (node_id, state_attr, target_states))
-            raise exceptions.TimeoutException(msg)
+            raise lib_exc.TimeoutException(msg)
 
     def wait_provisioning_state(self, node_id, state, timeout):
         self._node_state_timeout(
@@ -1311,7 +1311,7 @@
             _get_node, CONF.baremetal.association_timeout, 1):
             msg = ('Timed out waiting to get Ironic node by instance id %s'
                    % instance_id)
-            raise exceptions.TimeoutException(msg)
+            raise lib_exc.TimeoutException(msg)
 
     def get_node(self, node_id=None, instance_id=None):
         if node_id:
diff --git a/tempest/scenario/test_network_basic_ops.py b/tempest/scenario/test_network_basic_ops.py
index b527c3d..125d61a 100644
--- a/tempest/scenario/test_network_basic_ops.py
+++ b/tempest/scenario/test_network_basic_ops.py
@@ -22,9 +22,9 @@
 from tempest.common.utils import data_utils
 from tempest.common import waiters
 from tempest import config
-from tempest import exceptions
 from tempest.lib.common.utils import test_utils
 from tempest.lib import decorators
+from tempest.lib import exceptions
 from tempest.scenario import manager
 from tempest import test
 
diff --git a/tempest/scenario/test_stamp_pattern.py b/tempest/scenario/test_stamp_pattern.py
index 5fd934c..0f2c78c 100644
--- a/tempest/scenario/test_stamp_pattern.py
+++ b/tempest/scenario/test_stamp_pattern.py
@@ -21,7 +21,6 @@
 from tempest.common.utils import data_utils
 from tempest.common import waiters
 from tempest import config
-from tempest import exceptions
 from tempest.lib.common.utils import test_utils
 from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
@@ -93,7 +92,7 @@
         if not test_utils.call_until_true(_func,
                                           CONF.compute.build_timeout,
                                           CONF.compute.build_interval):
-            raise exceptions.TimeoutException
+            raise lib_exc.TimeoutException
 
     @decorators.skip_because(bug="1205344")
     @test.idempotent_id('10fd234a-515c-41e5-b092-8323060598c5')
diff --git a/tempest/services/orchestration/json/orchestration_client.py b/tempest/services/orchestration/json/orchestration_client.py
index ea5dbe5..9fec548 100644
--- a/tempest/services/orchestration/json/orchestration_client.py
+++ b/tempest/services/orchestration/json/orchestration_client.py
@@ -178,7 +178,7 @@
                            'within the required time (%s s).' %
                            (stack_name, status, stack_status,
                             self.build_timeout))
-                raise exceptions.TimeoutException(message)
+                raise lib_exc.TimeoutException(message)
             time.sleep(self.build_interval)
 
     def show_resource_metadata(self, stack_identifier, resource_name):
diff --git a/tempest/tests/common/test_waiters.py b/tempest/tests/common/test_waiters.py
index a826337..b113c04 100644
--- a/tempest/tests/common/test_waiters.py
+++ b/tempest/tests/common/test_waiters.py
@@ -18,6 +18,7 @@
 
 from tempest.common import waiters
 from tempest import exceptions
+from tempest.lib import exceptions as lib_exc
 from tempest.lib.services.volume.v2 import volumes_client
 from tempest.tests import base
 import tempest.tests.utils as utils
@@ -43,7 +44,7 @@
         time_mock.side_effect = utils.generate_timeout_series(1)
 
         self.client.show_image.return_value = ({'status': 'saving'})
-        self.assertRaises(exceptions.TimeoutException,
+        self.assertRaises(lib_exc.TimeoutException,
                           waiters.wait_for_image_status,
                           self.client, 'fake_image_id', 'active')