Fix flake8 H404 errors
Fix H404 error and start enforcing it.
Trivialfix
Change-Id: I0c062733660031faf43838798a697daf6674ef14
diff --git a/neutron_tempest_plugin/api/admin/test_agent_availability_zone.py b/neutron_tempest_plugin/api/admin/test_agent_availability_zone.py
index 245715f..c69c63d 100644
--- a/neutron_tempest_plugin/api/admin/test_agent_availability_zone.py
+++ b/neutron_tempest_plugin/api/admin/test_agent_availability_zone.py
@@ -40,9 +40,10 @@
@testtools.skipUnless(CONF.neutron_plugin_options.agent_availability_zone,
"Need a single availability_zone assumption.")
def test_agents_availability_zone(self):
- """
- Test list agents availability_zone, only L3 and DHCP agent support
- availability_zone, default availability_zone is "nova".
+ """Test list agents availability_zone
+
+ Only L3 and DHCP agent support availability_zone, default
+ availability_zone is "nova".
"""
body = self.admin_client.list_agents()
agents = body['agents']
diff --git a/neutron_tempest_plugin/api/admin/test_agent_management.py b/neutron_tempest_plugin/api/admin/test_agent_management.py
index 72cba62..ad0368a 100644
--- a/neutron_tempest_plugin/api/admin/test_agent_management.py
+++ b/neutron_tempest_plugin/api/admin/test_agent_management.py
@@ -81,9 +81,7 @@
self.assertEqual(updated_description, description)
def _restore_agent(self, dyn_agent):
- """
- Restore the agent description after update test.
- """
+ """Restore the agent description after update test."""
description = dyn_agent['description']
origin_agent = {'description': description}
self.admin_client.update_agent(agent_id=dyn_agent['id'],
diff --git a/neutron_tempest_plugin/api/admin/test_routers_dvr.py b/neutron_tempest_plugin/api/admin/test_routers_dvr.py
index 644bc38..8d80ba6 100644
--- a/neutron_tempest_plugin/api/admin/test_routers_dvr.py
+++ b/neutron_tempest_plugin/api/admin/test_routers_dvr.py
@@ -44,7 +44,8 @@
@decorators.idempotent_id('08a2a0a8-f1e4-4b34-8e30-e522e836c44e')
def test_distributed_router_creation(self):
- """
+ """Test distributed router creation
+
Test uses administrative credentials to creates a
DVR (Distributed Virtual Routing) router using the
distributed=True.
@@ -61,7 +62,8 @@
@decorators.idempotent_id('8a0a72b4-7290-4677-afeb-b4ffe37bc352')
def test_centralized_router_creation(self):
- """
+ """Test centralized router creation
+
Test uses administrative credentials to creates a
CVR (Centralized Virtual Routing) router using the
distributed=False.
@@ -84,7 +86,8 @@
@decorators.idempotent_id('acd43596-c1fb-439d-ada8-31ad48ae3c2e')
def test_centralized_router_update_to_dvr(self):
- """
+ """Test centralized to DVR router update
+
Test uses administrative credentials to creates a
CVR (Centralized Virtual Routing) router using the
distributed=False.Then it will "update" the router
diff --git a/neutron_tempest_plugin/api/admin/test_routers_ha.py b/neutron_tempest_plugin/api/admin/test_routers_ha.py
index d9aafe9..b717a10 100644
--- a/neutron_tempest_plugin/api/admin/test_routers_ha.py
+++ b/neutron_tempest_plugin/api/admin/test_routers_ha.py
@@ -40,7 +40,8 @@
@decorators.idempotent_id('8abc177d-14f1-4018-9f01-589b299cbee1')
def test_ha_router_creation(self):
- """
+ """Test HA router creation
+
Test uses administrative credentials to create a
HA (High Availability) router using the ha=True.
@@ -53,7 +54,8 @@
@decorators.idempotent_id('97b5f7ef-2192-4fa3-901e-979cd5c1097a')
def test_legacy_router_creation(self):
- """
+ """Test legacy router creation
+
Test uses administrative credentials to create a
SF (Single Failure) router using the ha=False.
@@ -68,7 +70,8 @@
@decorators.idempotent_id('5a6bfe82-5b23-45a4-b027-5160997d4753')
def test_legacy_router_update_to_ha(self):
- """
+ """Test legacy to HA router update
+
Test uses administrative credentials to create a
SF (Single Failure) router using the ha=False.
Then it will "update" the router ha attribute to True
diff --git a/neutron_tempest_plugin/api/base.py b/neutron_tempest_plugin/api/base.py
index df0f4fa..c4bc71d 100644
--- a/neutron_tempest_plugin/api/base.py
+++ b/neutron_tempest_plugin/api/base.py
@@ -34,8 +34,7 @@
class BaseNetworkTest(test.BaseTestCase):
- """
- Base class for the Neutron tests that use the Tempest Neutron REST client
+ """Base class for Neutron tests that use the Tempest Neutron REST client
Per the Neutron API Guide, API v1.x was removed from the source code tree
(docs.openstack.org/api/openstack-network/2.0/content/Overview-d1e71.html)
diff --git a/neutron_tempest_plugin/api/clients.py b/neutron_tempest_plugin/api/clients.py
index ee0289c..407e694 100644
--- a/neutron_tempest_plugin/api/clients.py
+++ b/neutron_tempest_plugin/api/clients.py
@@ -29,9 +29,7 @@
class Manager(manager.Manager):
- """
- Top level manager for OpenStack tempest clients
- """
+ """Top level manager for OpenStack tempest clients"""
default_params = {
'disable_ssl_certificate_validation':
CONF.identity.disable_ssl_certificate_validation,
diff --git a/neutron_tempest_plugin/api/test_allowed_address_pair.py b/neutron_tempest_plugin/api/test_allowed_address_pair.py
index f34cc5b..0137ff2 100644
--- a/neutron_tempest_plugin/api/test_allowed_address_pair.py
+++ b/neutron_tempest_plugin/api/test_allowed_address_pair.py
@@ -20,7 +20,8 @@
class AllowedAddressPairTestJSON(base.BaseNetworkTest):
- """
+ """AllowedAddressPairTestJSON class
+
Tests the Neutron Allowed Address Pair API extension using the Tempest
REST client. The following API operations are tested with this extension:
diff --git a/neutron_tempest_plugin/api/test_auto_allocated_topology.py b/neutron_tempest_plugin/api/test_auto_allocated_topology.py
index 0baa2a8..4d70bfc 100644
--- a/neutron_tempest_plugin/api/test_auto_allocated_topology.py
+++ b/neutron_tempest_plugin/api/test_auto_allocated_topology.py
@@ -21,8 +21,8 @@
class TestAutoAllocatedTopology(base.BaseAdminNetworkTest):
+ """Tests Get-Me-A-Network
- """
Tests the Get-Me-A-Network operations in the Neutron API
using the REST client for Neutron.
"""
diff --git a/neutron_tempest_plugin/api/test_extra_dhcp_options.py b/neutron_tempest_plugin/api/test_extra_dhcp_options.py
index e5f73b2..cb4dba8 100644
--- a/neutron_tempest_plugin/api/test_extra_dhcp_options.py
+++ b/neutron_tempest_plugin/api/test_extra_dhcp_options.py
@@ -20,8 +20,8 @@
class ExtraDHCPOptionsTestJSON(base.BaseNetworkTest):
+ """Test Extra DHCP Options
- """
Tests the following operations with the Extra DHCP Options Neutron API
extension:
diff --git a/neutron_tempest_plugin/api/test_flavors_extensions.py b/neutron_tempest_plugin/api/test_flavors_extensions.py
index 30f1eb6..42eb7b1 100644
--- a/neutron_tempest_plugin/api/test_flavors_extensions.py
+++ b/neutron_tempest_plugin/api/test_flavors_extensions.py
@@ -19,8 +19,8 @@
class TestFlavorsJson(base.BaseAdminNetworkTest):
+ """Test Flavors
- """
Tests the following operations in the Neutron API using the REST client for
Neutron:
diff --git a/neutron_tempest_plugin/api/test_metering_extensions.py b/neutron_tempest_plugin/api/test_metering_extensions.py
index 745a8d0..ceeb2b6 100644
--- a/neutron_tempest_plugin/api/test_metering_extensions.py
+++ b/neutron_tempest_plugin/api/test_metering_extensions.py
@@ -23,8 +23,8 @@
class MeteringTestJSON(base.BaseAdminNetworkTest):
+ """Test Metering
- """
Tests the following operations in the Neutron API using the REST client for
Neutron:
diff --git a/neutron_tempest_plugin/api/test_network_ip_availability.py b/neutron_tempest_plugin/api/test_network_ip_availability.py
index 10aee2e..1cdfc7e 100644
--- a/neutron_tempest_plugin/api/test_network_ip_availability.py
+++ b/neutron_tempest_plugin/api/test_network_ip_availability.py
@@ -37,8 +37,8 @@
class NetworksIpAvailabilityTest(base.BaseAdminNetworkTest):
+ """Tests Networks IP Availability
- """
Tests the following operations in the Neutron API using the REST client for
Neutron:
diff --git a/neutron_tempest_plugin/api/test_networks.py b/neutron_tempest_plugin/api/test_networks.py
index 63e8ae5..f9d52ba 100644
--- a/neutron_tempest_plugin/api/test_networks.py
+++ b/neutron_tempest_plugin/api/test_networks.py
@@ -22,8 +22,8 @@
class NetworksTestJSON(base.BaseNetworkTest):
+ """Test Networks
- """
Tests the following operations in the Neutron API using the REST client for
Neutron:
diff --git a/neutron_tempest_plugin/api/test_subnetpools.py b/neutron_tempest_plugin/api/test_subnetpools.py
index 25d9780..9d927cf 100644
--- a/neutron_tempest_plugin/api/test_subnetpools.py
+++ b/neutron_tempest_plugin/api/test_subnetpools.py
@@ -58,7 +58,8 @@
new_prefix = u'10.11.15.0/24'
larger_prefix = u'10.11.0.0/16'
- """
+ """Test Subnet Pools
+
Tests the following operations in the Neutron API using the REST client for
Neutron:
@@ -327,9 +328,7 @@
@decorators.idempotent_id('4c6963c2-f54c-4347-b288-75d18421c4c4')
@utils.requires_ext(extension='default-subnetpools', service='network')
def test_tenant_create_non_default_subnetpool(self):
- """
- Test creates a subnetpool, the "is_default" attribute is False.
- """
+ """Test creates a subnetpool, the "is_default" attribute is False."""
created_subnetpool = self._create_subnetpool()
self.assertFalse(created_subnetpool['is_default'])
diff --git a/neutron_tempest_plugin/common/utils.py b/neutron_tempest_plugin/common/utils.py
index c42d984..76fb38f 100644
--- a/neutron_tempest_plugin/common/utils.py
+++ b/neutron_tempest_plugin/common/utils.py
@@ -54,8 +54,8 @@
def wait_until_true(predicate, timeout=60, sleep=1, exception=None):
- """
- Wait until callable predicate is evaluated as True
+ """Wait until callable predicate is evaluated as True
+
:param predicate: Callable deciding whether waiting should continue.
Best practice is to instantiate predicate with functools.partial()
:param timeout: Timeout in seconds how long should function wait.
diff --git a/neutron_tempest_plugin/services/network/json/network_client.py b/neutron_tempest_plugin/services/network/json/network_client.py
index 0d26a0e..58dfbf4 100644
--- a/neutron_tempest_plugin/services/network/json/network_client.py
+++ b/neutron_tempest_plugin/services/network/json/network_client.py
@@ -19,8 +19,8 @@
class NetworkClientJSON(service_client.RestClient):
+ """NetworkClientJSON class
- """
Tempest REST client for Neutron. Uses v2 of the Neutron API, since the
V1 API has been removed from the code base.
@@ -447,7 +447,8 @@
return service_client.ResponseBody(resp, body)
def update_agent(self, agent_id, agent_info):
- """
+ """Update an agent
+
:param agent_info: Agent update information.
E.g {"admin_state_up": True}
"""