pep8 fixes

This commit is contained in:
Andrew McLeod
2019-09-30 16:39:27 +02:00
2 changed files with 11 additions and 1 deletions
+9
View File
@@ -17,6 +17,7 @@
"""Encapsulate Aodh testing."""
import logging
import tenacity
import zaza.model
import zaza.openstack.charm_tests.test_utils as test_utils
@@ -59,6 +60,12 @@ class AodhTest(test_utils.OpenStackBaseTest):
logging.info('Waiting for alarm cache to clear')
telemetry_utils.alarm_cache_wait()
@tenacity.retry(wait=tenacity.wait_exponential(multiplier=1, max=60),
reraise=True, stop=tenacity.stop_after_attempt(8))
def query_aodh_api(self):
"""Check that aodh api is responding."""
self.aodh_client.alarm.list()
@property
def services(self):
"""Return a list of the service that should be running."""
@@ -122,6 +129,7 @@ class AodhTest(test_utils.OpenStackBaseTest):
{'DEFAULT': {'debug': ['False']}},
{'DEFAULT': {'debug': ['True']}},
self.services)
self.query_aodh_api()
def test_901_pause_resume(self):
"""Run pause and resume tests.
@@ -133,3 +141,4 @@ class AodhTest(test_utils.OpenStackBaseTest):
self.services,
pgrep_full=False):
logging.info("Testing pause resume")
self.query_aodh_api()
+2 -1
View File
@@ -609,8 +609,9 @@ def configure_gateway_ext_port(novaclient, neutronclient,
server.interface_attach(port_id=port['port']['id'],
net_id=None, fixed_ip=None)
if add_dataport_to_netplan:
mac_address = get_mac_from_port(port, neutronclient)
add_interface_to_netplan(server.name,
mac_address=get_mac_from_port(port, neutronclient),
mac_address=mac_address,
dvr_mode=dvr_mode)
ext_br_macs = []
for port in neutronclient.list_ports(network_id=net_id)['ports']: