diff --git a/tempest/api/compute/admin/test_agents.py b/tempest/api/compute/admin/test_agents.py index 38f5fb7d2b..d2b3a81446 100644 --- a/tempest/api/compute/admin/test_agents.py +++ b/tempest/api/compute/admin/test_agents.py @@ -23,9 +23,7 @@ LOG = log.getLogger(__name__) class AgentsAdminTestJSON(base.BaseV2ComputeAdminTest): - """ - Tests Agents API - """ + """Tests Agents API""" @classmethod def setup_clients(cls): diff --git a/tempest/api/compute/admin/test_aggregates.py b/tempest/api/compute/admin/test_aggregates.py index 4d05ff75ca..ddd9aa0fac 100644 --- a/tempest/api/compute/admin/test_aggregates.py +++ b/tempest/api/compute/admin/test_aggregates.py @@ -22,10 +22,7 @@ from tempest import test class AggregatesAdminTestJSON(base.BaseV2ComputeAdminTest): - - """ - Tests Aggregates API that require admin privileges - """ + """Tests Aggregates API that require admin privileges""" _host_key = 'OS-EXT-SRV-ATTR:host' diff --git a/tempest/api/compute/admin/test_aggregates_negative.py b/tempest/api/compute/admin/test_aggregates_negative.py index bc1a854756..181533b522 100644 --- a/tempest/api/compute/admin/test_aggregates_negative.py +++ b/tempest/api/compute/admin/test_aggregates_negative.py @@ -22,10 +22,7 @@ from tempest import test class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest): - - """ - Tests Aggregates API that require admin privileges - """ + """Tests Aggregates API that require admin privileges""" @classmethod def setup_clients(cls): diff --git a/tempest/api/compute/admin/test_availability_zone.py b/tempest/api/compute/admin/test_availability_zone.py index 5b02761c3f..5befa53206 100644 --- a/tempest/api/compute/admin/test_availability_zone.py +++ b/tempest/api/compute/admin/test_availability_zone.py @@ -18,9 +18,7 @@ from tempest import test class AZAdminV2TestJSON(base.BaseV2ComputeAdminTest): - """ - Tests Availability Zone API List - """ + """Tests Availability Zone API List""" @classmethod def setup_clients(cls): diff --git a/tempest/api/compute/admin/test_availability_zone_negative.py b/tempest/api/compute/admin/test_availability_zone_negative.py index be1c2898f3..fe979d4e16 100644 --- a/tempest/api/compute/admin/test_availability_zone_negative.py +++ b/tempest/api/compute/admin/test_availability_zone_negative.py @@ -19,10 +19,7 @@ from tempest import test class AZAdminNegativeTestJSON(base.BaseV2ComputeAdminTest): - - """ - Tests Availability Zone API List - """ + """Tests Availability Zone API List""" @classmethod def setup_clients(cls): diff --git a/tempest/api/compute/admin/test_flavors.py b/tempest/api/compute/admin/test_flavors.py index 085916ef8e..1ef8f67d16 100644 --- a/tempest/api/compute/admin/test_flavors.py +++ b/tempest/api/compute/admin/test_flavors.py @@ -23,10 +23,7 @@ from tempest import test class FlavorsAdminTestJSON(base.BaseV2ComputeAdminTest): - - """ - Tests Flavors API Create and Delete that require admin privileges - """ + """Tests Flavors API Create and Delete that require admin privileges""" @classmethod def skip_checks(cls): diff --git a/tempest/api/compute/admin/test_flavors_access.py b/tempest/api/compute/admin/test_flavors_access.py index 0a11d52f6d..2063267a24 100644 --- a/tempest/api/compute/admin/test_flavors_access.py +++ b/tempest/api/compute/admin/test_flavors_access.py @@ -19,9 +19,8 @@ from tempest import test class FlavorsAccessTestJSON(base.BaseV2ComputeAdminTest): + """Tests Flavor Access API extension. - """ - Tests Flavor Access API extension. Add and remove Flavor Access require admin privileges. """ diff --git a/tempest/api/compute/admin/test_flavors_access_negative.py b/tempest/api/compute/admin/test_flavors_access_negative.py index 89ae1b5d4b..5070fd72f7 100644 --- a/tempest/api/compute/admin/test_flavors_access_negative.py +++ b/tempest/api/compute/admin/test_flavors_access_negative.py @@ -23,9 +23,8 @@ from tempest import test class FlavorsAccessNegativeTestJSON(base.BaseV2ComputeAdminTest): + """Tests Flavor Access API extension. - """ - Tests Flavor Access API extension. Add and remove Flavor Access require admin privileges. """ diff --git a/tempest/api/compute/admin/test_flavors_extra_specs.py b/tempest/api/compute/admin/test_flavors_extra_specs.py index 25dce6a1f5..661cd18ba0 100644 --- a/tempest/api/compute/admin/test_flavors_extra_specs.py +++ b/tempest/api/compute/admin/test_flavors_extra_specs.py @@ -19,9 +19,8 @@ from tempest import test class FlavorsExtraSpecsTestJSON(base.BaseV2ComputeAdminTest): + """Tests Flavor Extra Spec API extension. - """ - Tests Flavor Extra Spec API extension. SET, UNSET, UPDATE Flavor Extra specs require admin privileges. GET Flavor Extra specs can be performed even by without admin privileges. """ diff --git a/tempest/api/compute/admin/test_flavors_extra_specs_negative.py b/tempest/api/compute/admin/test_flavors_extra_specs_negative.py index aa95454519..14646e84d8 100644 --- a/tempest/api/compute/admin/test_flavors_extra_specs_negative.py +++ b/tempest/api/compute/admin/test_flavors_extra_specs_negative.py @@ -22,9 +22,8 @@ from tempest import test class FlavorsExtraSpecsNegativeTestJSON(base.BaseV2ComputeAdminTest): + """Negative Tests Flavor Extra Spec API extension. - """ - Negative Tests Flavor Extra Spec API extension. SET, UNSET, UPDATE Flavor Extra specs require admin privileges. """ diff --git a/tempest/api/compute/admin/test_floating_ips_bulk.py b/tempest/api/compute/admin/test_floating_ips_bulk.py index e9796161c5..fe05ddbd42 100644 --- a/tempest/api/compute/admin/test_floating_ips_bulk.py +++ b/tempest/api/compute/admin/test_floating_ips_bulk.py @@ -24,9 +24,8 @@ CONF = config.CONF class FloatingIPsBulkAdminTestJSON(base.BaseV2ComputeAdminTest): - """ - Tests Floating IPs Bulk APIs Create, List and Delete that - require admin privileges. + """Tests Floating IPs Bulk APIs that require admin privileges. + API documentation - http://docs.openstack.org/api/openstack-compute/2/ content/ext-os-floating-ips-bulk.html """ diff --git a/tempest/api/compute/admin/test_hosts.py b/tempest/api/compute/admin/test_hosts.py index 6d8788f95c..f6ea3a4e32 100644 --- a/tempest/api/compute/admin/test_hosts.py +++ b/tempest/api/compute/admin/test_hosts.py @@ -18,10 +18,7 @@ from tempest import test class HostsAdminTestJSON(base.BaseV2ComputeAdminTest): - - """ - Tests hosts API using admin privileges. - """ + """Tests hosts API using admin privileges.""" @classmethod def setup_clients(cls): diff --git a/tempest/api/compute/admin/test_hosts_negative.py b/tempest/api/compute/admin/test_hosts_negative.py index 4c8d8a2b93..65ada4d194 100644 --- a/tempest/api/compute/admin/test_hosts_negative.py +++ b/tempest/api/compute/admin/test_hosts_negative.py @@ -20,10 +20,7 @@ from tempest import test class HostsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest): - - """ - Tests hosts API using admin privileges. - """ + """Tests hosts API using admin privileges.""" @classmethod def setup_clients(cls): diff --git a/tempest/api/compute/admin/test_hypervisor.py b/tempest/api/compute/admin/test_hypervisor.py index 186867e32c..113ec40a0a 100644 --- a/tempest/api/compute/admin/test_hypervisor.py +++ b/tempest/api/compute/admin/test_hypervisor.py @@ -18,10 +18,7 @@ from tempest import test class HypervisorAdminTestJSON(base.BaseV2ComputeAdminTest): - - """ - Tests Hypervisors API that require admin privileges - """ + """Tests Hypervisors API that require admin privileges""" @classmethod def setup_clients(cls): diff --git a/tempest/api/compute/admin/test_hypervisor_negative.py b/tempest/api/compute/admin/test_hypervisor_negative.py index ca4a691a51..0e8012ac4e 100644 --- a/tempest/api/compute/admin/test_hypervisor_negative.py +++ b/tempest/api/compute/admin/test_hypervisor_negative.py @@ -23,10 +23,7 @@ from tempest import test class HypervisorAdminNegativeTestJSON(base.BaseV2ComputeAdminTest): - - """ - Tests Hypervisors API that require admin privileges - """ + """Tests Hypervisors API that require admin privileges""" @classmethod def setup_clients(cls): diff --git a/tempest/api/compute/admin/test_networks.py b/tempest/api/compute/admin/test_networks.py index c4aa81b03d..e5c8790644 100644 --- a/tempest/api/compute/admin/test_networks.py +++ b/tempest/api/compute/admin/test_networks.py @@ -21,9 +21,8 @@ CONF = config.CONF class NetworksTest(base.BaseV2ComputeAdminTest): + """Tests Nova Networks API that usually requires admin privileges. - """ - Tests Nova Networks API that usually requires admin privileges. API docs: http://developer.openstack.org/api-ref-compute-v2-ext.html#ext-os-networks """ diff --git a/tempest/api/compute/admin/test_quotas.py b/tempest/api/compute/admin/test_quotas.py index dbca6bbdac..fa1c666384 100644 --- a/tempest/api/compute/admin/test_quotas.py +++ b/tempest/api/compute/admin/test_quotas.py @@ -151,8 +151,7 @@ class QuotasAdminTestJSON(base.BaseV2ComputeAdminTest): class QuotaClassesAdminTestJSON(base.BaseV2ComputeAdminTest): - """Tests the os-quota-class-sets API to update default quotas. - """ + """Tests the os-quota-class-sets API to update default quotas.""" def setUp(self): # All test cases in this class need to externally lock on doing diff --git a/tempest/api/compute/admin/test_servers_negative.py b/tempest/api/compute/admin/test_servers_negative.py index c2dc94c217..3d0ce35907 100644 --- a/tempest/api/compute/admin/test_servers_negative.py +++ b/tempest/api/compute/admin/test_servers_negative.py @@ -28,10 +28,7 @@ CONF = config.CONF class ServersAdminNegativeTestJSON(base.BaseV2ComputeAdminTest): - - """ - Tests Servers API using admin privileges - """ + """Tests Servers API using admin privileges""" @classmethod def setup_clients(cls): diff --git a/tempest/api/compute/admin/test_services.py b/tempest/api/compute/admin/test_services.py index 4d7dea589f..8648b9fa16 100644 --- a/tempest/api/compute/admin/test_services.py +++ b/tempest/api/compute/admin/test_services.py @@ -19,10 +19,7 @@ from tempest import test class ServicesAdminTestJSON(base.BaseV2ComputeAdminTest): - - """ - Tests Services API. List and Enable/Disable require admin privileges. - """ + """Tests Services API. List and Enable/Disable require admin privileges.""" @classmethod def setup_clients(cls): diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py index b006fc063d..a5c06005b8 100644 --- a/tempest/api/compute/base.py +++ b/tempest/api/compute/base.py @@ -138,6 +138,7 @@ class BaseV2ComputeTest(tempest.test.BaseTestCase): @classmethod def server_check_teardown(cls): """Checks is the shared server clean enough for subsequent test. + Method will delete the server when it's dirty. The setUp method is responsible for creating a new server. Exceptions raised in tearDown class are fails the test case, diff --git a/tempest/api/compute/servers/test_availability_zone.py b/tempest/api/compute/servers/test_availability_zone.py index 8f1f360fe1..76da317654 100644 --- a/tempest/api/compute/servers/test_availability_zone.py +++ b/tempest/api/compute/servers/test_availability_zone.py @@ -18,9 +18,7 @@ from tempest import test class AZV2TestJSON(base.BaseV2ComputeTest): - """ - Tests Availability Zone API List - """ + """Tests Availability Zone API List""" @classmethod def setup_clients(cls): diff --git a/tempest/api/compute/servers/test_multiple_create.py b/tempest/api/compute/servers/test_multiple_create.py index a9454110e1..eb1beb1f1e 100644 --- a/tempest/api/compute/servers/test_multiple_create.py +++ b/tempest/api/compute/servers/test_multiple_create.py @@ -25,10 +25,9 @@ class MultipleCreateTestJSON(base.BaseV2ComputeTest): return data_utils.rand_name(self._name) def _create_multiple_servers(self, name=None, wait_until=None, **kwargs): - """ - This is the right way to create_multiple servers and manage to get the - created servers into the servers list to be cleaned up after all. - """ + # NOTE: This is the right way to create_multiple servers and manage to + # get the created servers into the servers list to be cleaned up after + # all. kwargs['name'] = name if name else self._generate_name() if wait_until: kwargs['wait_until'] = wait_until diff --git a/tempest/api/compute/servers/test_multiple_create_negative.py b/tempest/api/compute/servers/test_multiple_create_negative.py index 8135768889..3d8a732e8b 100644 --- a/tempest/api/compute/servers/test_multiple_create_negative.py +++ b/tempest/api/compute/servers/test_multiple_create_negative.py @@ -27,10 +27,8 @@ class MultipleCreateNegativeTestJSON(base.BaseV2ComputeTest): return data_utils.rand_name(self._name) def _create_multiple_servers(self, name=None, wait_until=None, **kwargs): - """ - This is the right way to create_multiple servers and manage to get the - created servers into the servers list to be cleaned up after all. - """ + # This is the right way to create_multiple servers and manage to get + # the created servers into the servers list to be cleaned up after all. kwargs['name'] = kwargs.get('name', self._generate_name()) body = self.create_test_server(**kwargs) diff --git a/tempest/api/compute/servers/test_server_group.py b/tempest/api/compute/servers/test_server_group.py index 9a04556073..c23b36578b 100644 --- a/tempest/api/compute/servers/test_server_group.py +++ b/tempest/api/compute/servers/test_server_group.py @@ -21,8 +21,8 @@ from tempest import test class ServerGroupTestJSON(base.BaseV2ComputeTest): - """ - These tests check for the server-group APIs + """These tests check for the server-group APIs + They create/delete server-groups with different policies. policies = affinity/anti-affinity It also adds the tests for list and get details of server-groups diff --git a/tempest/api/compute/volumes/test_volumes_list.py b/tempest/api/compute/volumes/test_volumes_list.py index f0ed141d7a..990e42994a 100644 --- a/tempest/api/compute/volumes/test_volumes_list.py +++ b/tempest/api/compute/volumes/test_volumes_list.py @@ -23,14 +23,11 @@ CONF = config.CONF class VolumesTestJSON(base.BaseV2ComputeTest): - - """ - This test creates a number of 1G volumes. To run successfully, - ensure that the backing file for the volume group that Nova uses - has space for at least 3 1G volumes! - If you are running a Devstack environment, ensure that the - VOLUME_BACKING_FILE_SIZE is atleast 4G in your localrc - """ + # NOTE: This test creates a number of 1G volumes. To run successfully, + # ensure that the backing file for the volume group that Nova uses + # has space for at least 3 1G volumes! + # If you are running a Devstack environment, ensure that the + # VOLUME_BACKING_FILE_SIZE is atleast 4G in your localrc @classmethod def skip_checks(cls):