Step 1 of refactoring compute tests
* Move all compute tests under /tempest/tests/compute
* Add standard license header for all compute tests
* Fix all imports to align with HACKING standards
Change-Id: If90b65eeda7938d7dafee0590df854ffb34b1350
diff --git a/tempest/tests/compute/admin/test_flavors.py b/tempest/tests/compute/admin/test_flavors.py
index e6e48ce..3f21ece 100644
--- a/tempest/tests/compute/admin/test_flavors.py
+++ b/tempest/tests/compute/admin/test_flavors.py
@@ -1,9 +1,27 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
from nose import SkipTest
+
import tempest.config
from tempest import exceptions
from tempest import openstack
-from tempest.tests.base_compute_test import BaseComputeTest
+from tempest.tests.compute.base import BaseComputeTest
class FlavorsAdminTest(BaseComputeTest):
@@ -19,7 +37,7 @@
cls.admin_password = cls.config.compute_admin.password
cls.admin_tenant = cls.config.compute_admin.tenant_name
- if not(cls.admin_username and cls.admin_password and cls.admin_tenant):
+ if not cls.admin_username and cls.admin_password and cls.admin_tenant:
raise SkipTest("Missing Admin credentials in configuration")
else:
cls.admin_os = openstack.AdminManager()
diff --git a/tempest/tests/base_compute_test.py b/tempest/tests/compute/base.py
similarity index 84%
rename from tempest/tests/base_compute_test.py
rename to tempest/tests/compute/base.py
index d7dac10..120de01 100644
--- a/tempest/tests/base_compute_test.py
+++ b/tempest/tests/compute/base.py
@@ -1,7 +1,25 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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.
+
+import unittest2 as unittest
+
from tempest import exceptions
from tempest import openstack
from tempest.common.utils.data_utils import rand_name
-import unittest2 as unittest
class BaseComputeTest(unittest.TestCase):
@@ -17,6 +35,7 @@
security_groups_client = os.security_groups_client
console_outputs_client = os.console_outputs_client
limits_client = os.limits_client
+ volumes_client = os.volumes_client
config = os.config
build_interval = config.compute.build_interval
build_timeout = config.compute.build_timeout
diff --git a/tempest/tests/test_authorization.py b/tempest/tests/compute/test_authorization.py
similarity index 96%
rename from tempest/tests/test_authorization.py
rename to tempest/tests/compute/test_authorization.py
index 8a0cf1b..3788a16 100644
--- a/tempest/tests/test_authorization.py
+++ b/tempest/tests/compute/test_authorization.py
@@ -1,7 +1,23 @@
-import unittest2 as unittest
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
from nose.tools import raises
+import unittest2 as unittest
from tempest import openstack
from tempest.common.utils.data_utils import rand_name, parse_image_id
diff --git a/tempest/tests/test_console_output.py b/tempest/tests/compute/test_console_output.py
similarity index 76%
rename from tempest/tests/test_console_output.py
rename to tempest/tests/compute/test_console_output.py
index 1aa4a1c..3bd3010 100644
--- a/tempest/tests/test_console_output.py
+++ b/tempest/tests/compute/test_console_output.py
@@ -1,8 +1,25 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
-from tempest import openstack
+
from tempest import exceptions
-from base_compute_test import BaseComputeTest
from tempest.common.utils.data_utils import rand_name
+from tempest.tests.compute.base import BaseComputeTest
class ConsoleOutputTest(BaseComputeTest):
diff --git a/tempest/tests/compute/test_create_server.py b/tempest/tests/compute/test_create_server.py
index c51afce..9b50870 100644
--- a/tempest/tests/compute/test_create_server.py
+++ b/tempest/tests/compute/test_create_server.py
@@ -1,11 +1,29 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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.
+
import base64
-import unittest2 as unittest
+
from nose.plugins.attrib import attr
-from tempest import openstack
+import unittest2 as unittest
+
import tempest.config
from tempest.common.utils.data_utils import rand_name
from tempest.common.utils.linux.remote_client import RemoteClient
-from tempest.tests.base_compute_test import BaseComputeTest
+from tempest.tests.compute.base import BaseComputeTest
class ServersTest(BaseComputeTest):
diff --git a/tempest/tests/compute/test_disk_config.py b/tempest/tests/compute/test_disk_config.py
index fca83be..7dd40c8 100644
--- a/tempest/tests/compute/test_disk_config.py
+++ b/tempest/tests/compute/test_disk_config.py
@@ -1,10 +1,28 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
+import unittest2 as unittest
+
from tempest.common.utils.data_utils import rand_name
from tempest import exceptions
from tempest import openstack
import tempest.config
from tempest.tests import utils
-import unittest2 as unittest
-from nose.plugins.attrib import attr
class TestServerDiskConfig(unittest.TestCase):
diff --git a/tempest/tests/compute/test_extensions.py b/tempest/tests/compute/test_extensions.py
new file mode 100644
index 0000000..c1edc9d
--- /dev/null
+++ b/tempest/tests/compute/test_extensions.py
@@ -0,0 +1,34 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
+
+from tempest.tests.compute.base import BaseComputeTest
+
+
+class ExtensionsTest(BaseComputeTest):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.client = cls.extensions_client
+
+ @attr(type='smoke')
+ def test_list_extensions(self):
+ """List of all extensions"""
+ resp, extensions = self.client.list_extensions()
+ self.assertTrue("extensions" in extensions)
+ self.assertEqual(200, resp.status)
diff --git a/tempest/tests/test_flavors.py b/tempest/tests/compute/test_flavors.py
similarity index 87%
rename from tempest/tests/test_flavors.py
rename to tempest/tests/compute/test_flavors.py
index 6a38e3b..c7bbc54 100644
--- a/tempest/tests/test_flavors.py
+++ b/tempest/tests/compute/test_flavors.py
@@ -1,6 +1,24 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
+
from tempest import exceptions
-from base_compute_test import BaseComputeTest
+from tempest.tests.compute.base import BaseComputeTest
class FlavorsTest(BaseComputeTest):
@@ -121,6 +139,5 @@
@attr(type='negative')
def test_get_flavor_details_for_invalid_flavor_id(self):
"""Ensure 404 returned for non-existant flavor ID"""
-
self.assertRaises(exceptions.NotFound, self.client.get_flavor_details,
9999)
diff --git a/tempest/tests/test_floating_ips_actions.py b/tempest/tests/compute/test_floating_ips_actions.py
similarity index 91%
rename from tempest/tests/test_floating_ips_actions.py
rename to tempest/tests/compute/test_floating_ips_actions.py
index 9a84a21..efef11c 100644
--- a/tempest/tests/test_floating_ips_actions.py
+++ b/tempest/tests/compute/test_floating_ips_actions.py
@@ -1,11 +1,27 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
import unittest2 as unittest
-from unittest2.case import SkipTest
from tempest import openstack
from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
-from base_compute_test import BaseComputeTest
+from tempest.tests.compute.base import BaseComputeTest
class FloatingIPsTest(BaseComputeTest):
diff --git a/tempest/tests/test_image_metadata.py b/tempest/tests/compute/test_image_metadata.py
similarity index 89%
rename from tempest/tests/test_image_metadata.py
rename to tempest/tests/compute/test_image_metadata.py
index 7309bcb..931097b 100644
--- a/tempest/tests/test_image_metadata.py
+++ b/tempest/tests/compute/test_image_metadata.py
@@ -1,8 +1,25 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
-from tempest import openstack
+
from tempest.common.utils.data_utils import rand_name
from tempest import exceptions
-from base_compute_test import BaseComputeTest
+from tempest.tests.compute.base import BaseComputeTest
class ImagesMetadataTest(BaseComputeTest):
diff --git a/tempest/tests/test_images.py b/tempest/tests/compute/test_images.py
similarity index 95%
rename from tempest/tests/test_images.py
rename to tempest/tests/compute/test_images.py
index c5ea509..59bc58f 100644
--- a/tempest/tests/test_images.py
+++ b/tempest/tests/compute/test_images.py
@@ -1,12 +1,29 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
import unittest2 as unittest
from tempest.common.utils.data_utils import rand_name
-from base_compute_test import BaseComputeTest
import tempest.config
+from tempest import exceptions
from tempest import openstack
from tempest.common.utils import data_utils
-from tempest import exceptions
+from tempest.tests.compute.base import BaseComputeTest
from tempest.tests import utils
diff --git a/tempest/tests/test_keypairs.py b/tempest/tests/compute/test_keypairs.py
similarity index 91%
rename from tempest/tests/test_keypairs.py
rename to tempest/tests/compute/test_keypairs.py
index 809aa8e..db77416 100644
--- a/tempest/tests/test_keypairs.py
+++ b/tempest/tests/compute/test_keypairs.py
@@ -1,9 +1,26 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
import unittest2 as unittest
-from tempest import openstack
-from base_compute_test import BaseComputeTest
-from tempest.common.utils.data_utils import rand_name
+
from tempest import exceptions
+from tempest.common.utils.data_utils import rand_name
+from tempest.tests.compute.base import BaseComputeTest
class KeyPairsTest(BaseComputeTest):
diff --git a/tempest/tests/test_list_floating_ips.py b/tempest/tests/compute/test_list_floating_ips.py
similarity index 81%
rename from tempest/tests/test_list_floating_ips.py
rename to tempest/tests/compute/test_list_floating_ips.py
index 03ed089..221a2c2 100644
--- a/tempest/tests/test_list_floating_ips.py
+++ b/tempest/tests/compute/test_list_floating_ips.py
@@ -1,10 +1,27 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
-from tempest import openstack
-from tempest import exceptions
-from base_compute_test import BaseComputeTest
-from tempest.common.utils.data_utils import rand_name
import unittest2 as unittest
+from tempest import exceptions
+from tempest.common.utils.data_utils import rand_name
+from tempest.tests.compute.base import BaseComputeTest
+
class FloatingIPDetailsTest(BaseComputeTest):
diff --git a/tempest/tests/test_list_images.py b/tempest/tests/compute/test_list_images.py
similarity index 93%
rename from tempest/tests/test_list_images.py
rename to tempest/tests/compute/test_list_images.py
index 098667c..09a73aa 100644
--- a/tempest/tests/test_list_images.py
+++ b/tempest/tests/compute/test_list_images.py
@@ -1,8 +1,25 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
from tempest import exceptions
-from base_compute_test import BaseComputeTest
from tempest.common.utils.data_utils import rand_name, parse_image_id
+from tempest.tests.compute.base import BaseComputeTest
class ListImagesTest(BaseComputeTest):
diff --git a/tempest/tests/test_list_servers.py b/tempest/tests/compute/test_list_servers.py
similarity index 91%
rename from tempest/tests/test_list_servers.py
rename to tempest/tests/compute/test_list_servers.py
index eaca477..aa10129 100644
--- a/tempest/tests/test_list_servers.py
+++ b/tempest/tests/compute/test_list_servers.py
@@ -1,11 +1,26 @@
-import unittest2 as unittest
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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.
import nose.plugins.skip
+import unittest2 as unittest
-from tempest import openstack
from tempest import exceptions
-from base_compute_test import BaseComputeTest
from tempest.common.utils.data_utils import rand_name
+from tempest.tests.compute.base import BaseComputeTest
from tempest.tests import utils
diff --git a/tempest/tests/test_list_servers_negative.py b/tempest/tests/compute/test_list_servers_negative.py
similarity index 95%
rename from tempest/tests/test_list_servers_negative.py
rename to tempest/tests/compute/test_list_servers_negative.py
index 0729e57..7d79a15 100644
--- a/tempest/tests/test_list_servers_negative.py
+++ b/tempest/tests/compute/test_list_servers_negative.py
@@ -1,10 +1,29 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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.
+
import re
import sys
+
import unittest2 as unittest
+
from tempest import exceptions
-from base_compute_test import BaseComputeTest
from tempest import openstack
from tempest.common.utils.data_utils import rand_name
+from tempest.tests.compute.base import BaseComputeTest
class ServerDetailsNegativeTest(BaseComputeTest):
diff --git a/tempest/tests/test_security_group_rules.py b/tempest/tests/compute/test_security_group_rules.py
similarity index 92%
rename from tempest/tests/test_security_group_rules.py
rename to tempest/tests/compute/test_security_group_rules.py
index 6c8cb8f..a0bc630 100644
--- a/tempest/tests/test_security_group_rules.py
+++ b/tempest/tests/compute/test_security_group_rules.py
@@ -1,12 +1,28 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
-from tempest import openstack
+
from tempest import exceptions
-from base_compute_test import BaseComputeTest
from tempest.common.utils.data_utils import rand_name
-import time
+from tempest.tests.compute.base import BaseComputeTest
-class SecurityGroupsTest(BaseComputeTest):
+class SecurityGroupRulesTest(BaseComputeTest):
@classmethod
def setUpClass(cls):
diff --git a/tempest/tests/test_security_groups.py b/tempest/tests/compute/test_security_groups.py
similarity index 92%
rename from tempest/tests/test_security_groups.py
rename to tempest/tests/compute/test_security_groups.py
index b51192b..e75a352 100644
--- a/tempest/tests/test_security_groups.py
+++ b/tempest/tests/compute/test_security_groups.py
@@ -1,9 +1,25 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
-from tempest import openstack
+
from tempest import exceptions
-from base_compute_test import BaseComputeTest
from tempest.common.utils.data_utils import rand_name
-import time
+from tempest.tests.compute.base import BaseComputeTest
class SecurityGroupsTest(BaseComputeTest):
diff --git a/tempest/tests/test_server_actions.py b/tempest/tests/compute/test_server_actions.py
similarity index 89%
rename from tempest/tests/test_server_actions.py
rename to tempest/tests/compute/test_server_actions.py
index 4515b5e..3bbcbec 100644
--- a/tempest/tests/test_server_actions.py
+++ b/tempest/tests/compute/test_server_actions.py
@@ -1,14 +1,30 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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.
+
import base64
import time
-import unittest2 as unittest
-
-from tempest import exceptions
-from base_compute_test import BaseComputeTest
-from tempest.common.utils.data_utils import rand_name
-import tempest.config
-from tempest import openstack
from nose.plugins.attrib import attr
+import unittest2 as unittest
+
+import tempest.config
+from tempest import exceptions
+from tempest.common.utils.data_utils import rand_name
+from tempest.tests.compute.base import BaseComputeTest
class ServerActionsTest(BaseComputeTest):
diff --git a/tempest/tests/compute/test_server_addresses.py b/tempest/tests/compute/test_server_addresses.py
index 6658ccc..74d1d3a 100644
--- a/tempest/tests/compute/test_server_addresses.py
+++ b/tempest/tests/compute/test_server_addresses.py
@@ -1,19 +1,32 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
-import unittest2 as unittest
-from tempest import openstack
-from tempest.common.utils.data_utils import rand_name
+
from tempest import exceptions
+from tempest.common.utils.data_utils import rand_name
+from tempest.tests.compute.base import BaseComputeTest
-class ServerAddressesTest(unittest.TestCase):
+class ServerAddressesTest(BaseComputeTest):
@classmethod
def setUpClass(cls):
- cls.os = openstack.Manager()
- cls.client = cls.os.servers_client
- cls.config = cls.os.config
- cls.image_ref = cls.config.compute.image_ref
- cls.flavor_ref = cls.config.compute.flavor_ref
+ cls.client = cls.servers_client
cls.name = rand_name('server')
resp, cls.server = cls.client.create_server(cls.name,
diff --git a/tempest/tests/test_server_metadata.py b/tempest/tests/compute/test_server_metadata.py
similarity index 90%
rename from tempest/tests/test_server_metadata.py
rename to tempest/tests/compute/test_server_metadata.py
index 61254f2..b2220f1 100644
--- a/tempest/tests/test_server_metadata.py
+++ b/tempest/tests/compute/test_server_metadata.py
@@ -1,7 +1,24 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
-from tempest import openstack
-from base_compute_test import BaseComputeTest
+
from tempest.common.utils.data_utils import rand_name
+from tempest.tests.compute.base import BaseComputeTest
class ServerMetadataTest(BaseComputeTest):
diff --git a/tempest/tests/test_server_personality.py b/tempest/tests/compute/test_server_personality.py
similarity index 76%
rename from tempest/tests/test_server_personality.py
rename to tempest/tests/compute/test_server_personality.py
index d4a66ad..4a8fece 100644
--- a/tempest/tests/test_server_personality.py
+++ b/tempest/tests/compute/test_server_personality.py
@@ -1,10 +1,28 @@
-from nose.plugins.attrib import attr
-from tempest import openstack
-from tempest import exceptions
-from base_compute_test import BaseComputeTest
-from tempest.common.utils.data_utils import rand_name
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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.
+
import base64
+from nose.plugins.attrib import attr
+
+from tempest import exceptions
+from tempest.common.utils.data_utils import rand_name
+from tempest.tests.compute.base import BaseComputeTest
+
class ServerPersonalityTest(BaseComputeTest):
_multiprocess_shared_ = True
diff --git a/tempest/tests/test_servers.py b/tempest/tests/compute/test_servers.py
similarity index 88%
rename from tempest/tests/test_servers.py
rename to tempest/tests/compute/test_servers.py
index 42e6f77..fc7439f 100644
--- a/tempest/tests/test_servers.py
+++ b/tempest/tests/compute/test_servers.py
@@ -1,6 +1,24 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
-from base_compute_test import BaseComputeTest
+
from tempest.common.utils.data_utils import rand_name
+from tempest.tests.compute.base import BaseComputeTest
class ServersTest(BaseComputeTest):
diff --git a/tempest/tests/test_servers_negative.py b/tempest/tests/compute/test_servers_negative.py
similarity index 92%
rename from tempest/tests/test_servers_negative.py
rename to tempest/tests/compute/test_servers_negative.py
index 48c22d3..31f737c 100644
--- a/tempest/tests/test_servers_negative.py
+++ b/tempest/tests/compute/test_servers_negative.py
@@ -1,10 +1,29 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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.
+
import sys
-import unittest2 as unittest
+
from nose.plugins.attrib import attr
-from tempest.common.utils.data_utils import rand_name
-from base_compute_test import BaseComputeTest
+import unittest2 as unittest
+
from tempest import exceptions
from tempest import openstack
+from tempest.common.utils.data_utils import rand_name
+from tempest.tests.compute.base import BaseComputeTest
class ServersNegativeTest(BaseComputeTest):
diff --git a/tempest/tests/test_volumes_get.py b/tempest/tests/compute/test_volumes_get.py
similarity index 81%
rename from tempest/tests/test_volumes_get.py
rename to tempest/tests/compute/test_volumes_get.py
index 94de178..b32a667 100644
--- a/tempest/tests/test_volumes_get.py
+++ b/tempest/tests/compute/test_volumes_get.py
@@ -1,14 +1,31 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
import unittest2 as unittest
-from tempest import openstack
+
from tempest.common.utils.data_utils import rand_name
+from tempest.tests.compute.base import BaseComputeTest
-class VolumesGetTest(unittest.TestCase):
+class VolumesGetTest(BaseComputeTest):
@classmethod
def setUpClass(cls):
- cls.os = openstack.Manager()
cls.client = cls.os.volumes_client
@attr(type='smoke')
diff --git a/tempest/tests/test_volumes_list.py b/tempest/tests/compute/test_volumes_list.py
similarity index 96%
rename from tempest/tests/test_volumes_list.py
rename to tempest/tests/compute/test_volumes_list.py
index 0a2e4e6..821cc09 100644
--- a/tempest/tests/test_volumes_list.py
+++ b/tempest/tests/compute/test_volumes_list.py
@@ -19,11 +19,11 @@
import nose
-from tempest import openstack
from tempest.common.utils.data_utils import rand_name
+from tempest.tests.compute.base import BaseComputeTest
-class VolumesTest(unittest.TestCase):
+class VolumesTest(BaseComputeTest):
"""
This test creates a number of 1G volumes. To run successfully,
@@ -37,8 +37,7 @@
@classmethod
def setUpClass(cls):
- cls.os = openstack.Manager()
- cls.client = cls.os.volumes_client
+ cls.client = cls.volumes_client
# Create 3 Volumes
cls.volume_list = list()
cls.volume_id_list = list()
diff --git a/tempest/tests/test_volumes_negative.py b/tempest/tests/compute/test_volumes_negative.py
similarity index 84%
rename from tempest/tests/test_volumes_negative.py
rename to tempest/tests/compute/test_volumes_negative.py
index 5346b06..5a84b1b 100644
--- a/tempest/tests/test_volumes_negative.py
+++ b/tempest/tests/compute/test_volumes_negative.py
@@ -1,17 +1,34 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack, LLC
+# All Rights Reserved.
+#
+# 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 nose.plugins.attrib import attr
-import unittest2 as unittest
-from tempest import openstack
-from tempest.common.utils.data_utils import rand_name
-from tempest import exceptions
from nose.tools import raises
+import unittest2 as unittest
+
+from tempest import exceptions
+from tempest.common.utils.data_utils import rand_name
+from tempest.tests.compute.base import BaseComputeTest
-class VolumesTest(unittest.TestCase):
+class VolumesTest(BaseComputeTest):
@classmethod
def setUpClass(cls):
- cls.os = openstack.Manager()
- cls.client = cls.os.volumes_client
+ cls.client = cls.volumes_client
@attr(type='negative')
def test_volume_get_nonexistant_volume_id(self):
diff --git a/tempest/tests/test_extensions.py b/tempest/tests/test_extensions.py
deleted file mode 100644
index 9c1bac6..0000000
--- a/tempest/tests/test_extensions.py
+++ /dev/null
@@ -1,18 +0,0 @@
-from nose.plugins.attrib import attr
-from tempest import openstack
-import tempest.config
-from base_compute_test import BaseComputeTest
-
-
-class ExtentionsTest(BaseComputeTest):
-
- @classmethod
- def setUpClass(cls):
- cls.client = cls.extensions_client
-
- @attr(type='smoke')
- def test_list_extensions(self):
- """List of all extensions"""
- resp, extensions = self.client.list_extensions()
- self.assertTrue("extensions" in extensions)
- self.assertEqual(200, resp.status)