Skip to content

Commit

Permalink
pep8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdmcleod committed Sep 30, 2019
2 parents 2a917f5 + 529516d commit cd7b3a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions zaza/openstack/charm_tests/aodh/tests.py
Expand Up @@ -17,6 +17,7 @@
"""Encapsulate Aodh testing."""

import logging
import tenacity

import zaza.model
import zaza.openstack.charm_tests.test_utils as test_utils
Expand Down Expand Up @@ -59,6 +60,12 @@ def tearDown(cls):
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."""
Expand Down Expand Up @@ -122,6 +129,7 @@ def test_900_restart_on_config_change(self):
{'DEFAULT': {'debug': ['False']}},
{'DEFAULT': {'debug': ['True']}},
self.services)
self.query_aodh_api()

def test_901_pause_resume(self):
"""Run pause and resume tests.
Expand All @@ -133,3 +141,4 @@ def test_901_pause_resume(self):
self.services,
pgrep_full=False):
logging.info("Testing pause resume")
self.query_aodh_api()
3 changes: 2 additions & 1 deletion zaza/openstack/utilities/openstack.py
Expand Up @@ -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']:
Expand Down

0 comments on commit cd7b3a1

Please sign in to comment.