renames the stress test class to include the Volume keyword
tries to pick a better naming for the volume stress test class and
unifies stress test/class/file naming trying to serve as "guidance"
for future usage
Change-Id: Ie1b4aa4a4d2587fb1499604ecbc22f9b8f374c67
diff --git a/tempest/stress/actions/server_create_destroy.py b/tempest/stress/actions/server_create_destroy.py
new file mode 100644
index 0000000..1a1e30b
--- /dev/null
+++ b/tempest/stress/actions/server_create_destroy.py
@@ -0,0 +1,39 @@
+# Copyright 2013 Quanta Research Cambridge, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from tempest.common.utils.data_utils import rand_name
+import tempest.stress.stressaction as stressaction
+
+
+class ServerCreateDestroyTest(stressaction.StressAction):
+
+ def setUp(self, **kwargs):
+ self.image = self.manager.config.compute.image_ref
+ self.flavor = self.manager.config.compute.flavor_ref
+
+ def run(self):
+ name = rand_name("instance")
+ self.logger.info("creating %s" % name)
+ resp, server = self.manager.servers_client.create_server(
+ name, self.image, self.flavor)
+ server_id = server['id']
+ assert(resp.status == 202)
+ self.manager.servers_client.wait_for_server_status(server_id,
+ 'ACTIVE')
+ self.logger.info("created %s" % server_id)
+ self.logger.info("deleting %s" % name)
+ resp, _ = self.manager.servers_client.delete_server(server_id)
+ assert(resp.status == 204)
+ self.manager.servers_client.wait_for_server_termination(server_id)
+ self.logger.info("deleted %s" % server_id)