Merge "Fix H404/405 violations for api tests(3/3)"
diff --git a/tempest/api/compute/admin/test_agents.py b/tempest/api/compute/admin/test_agents.py
index 38f5fb7..d2b3a81 100644
--- a/tempest/api/compute/admin/test_agents.py
+++ b/tempest/api/compute/admin/test_agents.py
@@ -23,9 +23,7 @@
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 4d05ff7..ddd9aa0 100644
--- a/tempest/api/compute/admin/test_aggregates.py
+++ b/tempest/api/compute/admin/test_aggregates.py
@@ -22,10 +22,7 @@
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 bc1a854..181533b 100644
--- a/tempest/api/compute/admin/test_aggregates_negative.py
+++ b/tempest/api/compute/admin/test_aggregates_negative.py
@@ -22,10 +22,7 @@
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 5b02761..5befa53 100644
--- a/tempest/api/compute/admin/test_availability_zone.py
+++ b/tempest/api/compute/admin/test_availability_zone.py
@@ -18,9 +18,7 @@
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 be1c289..fe979d4 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 @@
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 085916e..1ef8f67 100644
--- a/tempest/api/compute/admin/test_flavors.py
+++ b/tempest/api/compute/admin/test_flavors.py
@@ -23,10 +23,7 @@
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 0a11d52..2063267 100644
--- a/tempest/api/compute/admin/test_flavors_access.py
+++ b/tempest/api/compute/admin/test_flavors_access.py
@@ -19,9 +19,8 @@
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 89ae1b5..5070fd7 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 @@
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 25dce6a..661cd18 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 @@
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 aa95454..14646e8 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 @@
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 e979616..fe05ddb 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 @@
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 6d8788f..f6ea3a4 100644
--- a/tempest/api/compute/admin/test_hosts.py
+++ b/tempest/api/compute/admin/test_hosts.py
@@ -18,10 +18,7 @@
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 4c8d8a2..65ada4d 100644
--- a/tempest/api/compute/admin/test_hosts_negative.py
+++ b/tempest/api/compute/admin/test_hosts_negative.py
@@ -20,10 +20,7 @@
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 186867e..113ec40 100644
--- a/tempest/api/compute/admin/test_hypervisor.py
+++ b/tempest/api/compute/admin/test_hypervisor.py
@@ -18,10 +18,7 @@
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 ca4a691..0e8012a 100644
--- a/tempest/api/compute/admin/test_hypervisor_negative.py
+++ b/tempest/api/compute/admin/test_hypervisor_negative.py
@@ -23,10 +23,7 @@
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 c4aa81b..e5c8790 100644
--- a/tempest/api/compute/admin/test_networks.py
+++ b/tempest/api/compute/admin/test_networks.py
@@ -21,9 +21,8 @@
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 dbca6bb..fa1c666 100644
--- a/tempest/api/compute/admin/test_quotas.py
+++ b/tempest/api/compute/admin/test_quotas.py
@@ -151,8 +151,7 @@
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 c2dc94c..3d0ce35 100644
--- a/tempest/api/compute/admin/test_servers_negative.py
+++ b/tempest/api/compute/admin/test_servers_negative.py
@@ -28,10 +28,7 @@
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 4d7dea5..8648b9f 100644
--- a/tempest/api/compute/admin/test_services.py
+++ b/tempest/api/compute/admin/test_services.py
@@ -19,10 +19,7 @@
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 b006fc0..a5c0600 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -138,6 +138,7 @@
@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 8f1f360..76da317 100644
--- a/tempest/api/compute/servers/test_availability_zone.py
+++ b/tempest/api/compute/servers/test_availability_zone.py
@@ -18,9 +18,7 @@
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 a945411..eb1beb1 100644
--- a/tempest/api/compute/servers/test_multiple_create.py
+++ b/tempest/api/compute/servers/test_multiple_create.py
@@ -25,10 +25,9 @@
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 8135768..3d8a732 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 @@
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 9a04556..c23b365 100644
--- a/tempest/api/compute/servers/test_server_group.py
+++ b/tempest/api/compute/servers/test_server_group.py
@@ -21,8 +21,8 @@
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 f0ed141..990e429 100644
--- a/tempest/api/compute/volumes/test_volumes_list.py
+++ b/tempest/api/compute/volumes/test_volumes_list.py
@@ -23,14 +23,11 @@
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):