From 8e78bd0560f174de90fc84cf94561cd177486961 Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Tue, 16 Jul 2019 11:55:15 +0200 Subject: [PATCH 1/2] Pin pydocstyle Reference: PyCQA/pydocstyle#375 --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 307fa94..1ee936a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,6 +7,7 @@ PyYAML<=4.2,>=3.0 flake8>=2.2.4,<=3.5.0 flake8-docstrings flake8-per-file-ignores +pydocstyle<4.0.0 coverage mock>=1.2 nose>=1.3.7 @@ -36,4 +37,4 @@ paramiko # Documentation requirements sphinx sphinxcontrib-asyncio -git+https://github.com/openstack-charmers/zaza#egg=zaza \ No newline at end of file +git+https://github.com/openstack-charmers/zaza#egg=zaza From cbcbb9092205bbf68a29885580c57881d01f749b Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Tue, 16 Jul 2019 09:29:10 +0200 Subject: [PATCH 2/2] octavia: Fix gathering of payload ips The existing code lead to intermittent failures as there are a few Neutron ports tagged with ``device:owner`` ``compute:nova`` that has nothing to do with our payload instances. Get IP information by asking Nova to list instances instead. --- zaza/openstack/charm_tests/octavia/tests.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/zaza/openstack/charm_tests/octavia/tests.py b/zaza/openstack/charm_tests/octavia/tests.py index d32dfd1..14ef685 100644 --- a/zaza/openstack/charm_tests/octavia/tests.py +++ b/zaza/openstack/charm_tests/octavia/tests.py @@ -52,12 +52,13 @@ class LBAASv2Test(test_utils.OpenStackBaseTest): keystone_session = openstack_utils.get_overcloud_keystone_session() neutron_client = openstack_utils.get_neutron_session_client( keystone_session) + nova_client = openstack_utils.get_nova_session_client( + keystone_session) # Get IP of the prepared payload instances - resp = neutron_client.list_ports(device_owner='compute:nova') payload_ips = [] - for port in resp['ports']: - payload_ips.append(port['fixed_ips'][0]['ip_address']) + for server in nova_client.servers.list(): + payload_ips.append(server.networks['private'][0]) self.assertTrue(len(payload_ips) > 0) resp = neutron_client.list_networks(name='private') @@ -175,4 +176,8 @@ class LBAASv2Test(test_utils.OpenStackBaseTest): ['wget', '-O', '-', 'http://{}/'.format(lb_fp['floating_ip_address'])], universal_newlines=True) - assert 'This is the default welcome page' in get_payload() + snippet = 'This is the default welcome page' + assert snippet in get_payload() + logging.info('Found "{}" in page retrieved through load balancer at ' + '"http://{}/"' + .format(snippet, lb_fp['floating_ip_address']))