Merge "Enable bridge debugging services on the ci jobs"
diff --git a/neutron_tempest_plugin/api/test_qos.py b/neutron_tempest_plugin/api/test_qos.py
index 0fc7b15..5fb0511 100644
--- a/neutron_tempest_plugin/api/test_qos.py
+++ b/neutron_tempest_plugin/api/test_qos.py
@@ -82,6 +82,33 @@
retrieved_policy = policies[0]
self.assertEqual('test', retrieved_policy['name'])
+ @decorators.idempotent_id('dde0b449-a400-4a87-b5a5-4d1c413c917b')
+ def test_list_policy_sort_by_name(self):
+ policyA = 'A' + data_utils.rand_name("policy")
+ policyB = 'B' + data_utils.rand_name("policy")
+ self.create_qos_policy(name=policyA, description='test policy',
+ shared=False)
+ self.create_qos_policy(name=policyB, description='test policy',
+ shared=False)
+
+ param = {
+ 'sort_key': 'name',
+ 'sort_dir': 'asc'
+ }
+ policies = (self.admin_client.list_qos_policies(**param)['policies'])
+ policy_names = [p['name'] for p in policies]
+ self.assertLess(policy_names.index(policyA),
+ policy_names.index(policyB))
+
+ param = {
+ 'sort_key': 'name',
+ 'sort_dir': 'desc'
+ }
+ policies = (self.admin_client.list_qos_policies(**param)['policies'])
+ policy_names = [p['name'] for p in policies]
+ self.assertLess(policy_names.index(policyB),
+ policy_names.index(policyA))
+
@decorators.idempotent_id('8e88a54b-f0b2-4b7d-b061-a15d93c2c7d6')
def test_policy_update(self):
policy = self.create_qos_policy(name='test-policy',
diff --git a/neutron_tempest_plugin/common/ip.py b/neutron_tempest_plugin/common/ip.py
index 592f040..a286d6b 100644
--- a/neutron_tempest_plugin/common/ip.py
+++ b/neutron_tempest_plugin/common/ip.py
@@ -22,8 +22,10 @@
from neutron_lib import constants
from oslo_log import log
from oslo_utils import excutils
+from tempest.common import waiters
from neutron_tempest_plugin.common import shell
+from neutron_tempest_plugin.common import utils as common_utils
LOG = log.getLogger(__name__)
@@ -375,3 +377,25 @@
if used_cidr:
exception_str += ', used CIDR %s' % used_cidr
raise Exception(exception_str)
+
+
+def wait_for_interface_status(client, server_id, port_id, status,
+ ssh_client=None, mac_address=None):
+ """Waits for an interface to reach a given status and checks VM NIC
+
+ This method enhances the tempest one. Apart from checking the interface
+ status returned by Nova, this methods access the VM to check if the NIC
+ interface is already detected by the kernel.
+ """
+ body = waiters.wait_for_interface_status(client, server_id, port_id,
+ status)
+
+ if ssh_client and mac_address:
+ ip_command = IPCommand(ssh_client)
+ common_utils.wait_until_true(
+ lambda: ip_command.get_nic_name_by_mac(mac_address),
+ timeout=10,
+ exception=RuntimeError('Interface with MAC %s not present in the '
+ 'VM' % mac_address))
+
+ return body
diff --git a/neutron_tempest_plugin/common/utils.py b/neutron_tempest_plugin/common/utils.py
index 34e7464..f03762c 100644
--- a/neutron_tempest_plugin/common/utils.py
+++ b/neutron_tempest_plugin/common/utils.py
@@ -26,8 +26,10 @@
from urllib import parse as urlparse
import eventlet
+
from tempest.lib import exceptions
+
SCHEMA_PORT_MAPPING = {
"http": 80,
"https": 443,
diff --git a/neutron_tempest_plugin/scenario/base.py b/neutron_tempest_plugin/scenario/base.py
index f7e7ec8..35e5c31 100644
--- a/neutron_tempest_plugin/scenario/base.py
+++ b/neutron_tempest_plugin/scenario/base.py
@@ -259,8 +259,10 @@
'server']['id'])['ports'][0]
self.fip = self.create_floatingip(port=self.port)
- def check_connectivity(self, host, ssh_user, ssh_key, servers=None):
- ssh_client = ssh.Client(host, ssh_user, pkey=ssh_key)
+ def check_connectivity(self, host, ssh_user, ssh_key,
+ servers=None, ssh_timeout=None):
+ ssh_client = ssh.Client(host, ssh_user,
+ pkey=ssh_key, timeout=ssh_timeout)
try:
ssh_client.test_connection_auth()
except lib_exc.SSHTimeout as ssh_e:
diff --git a/neutron_tempest_plugin/scenario/test_floatingip.py b/neutron_tempest_plugin/scenario/test_floatingip.py
index 2a137b5..7c59d3a 100644
--- a/neutron_tempest_plugin/scenario/test_floatingip.py
+++ b/neutron_tempest_plugin/scenario/test_floatingip.py
@@ -459,7 +459,26 @@
self.create_pingable_secgroup_rule(
secgroup_id=self.secgroup['id'])
- def _create_network_and_servers(self, servers_num=1, fip_addresses=None):
+ def _delete_floating_ip(self, fip_address):
+ ip_address = fip_address['floating_ip_address']
+
+ def _fip_is_free():
+ fips = self.os_admin.network_client.list_floatingips()
+ for fip in fips['floatingips']:
+ if ip_address == fip['floating_ip_address']:
+ return False
+ return True
+
+ self.delete_floatingip(fip_address)
+ try:
+ common_utils.wait_until_true(_fip_is_free, timeout=30, sleep=5)
+ except common_utils.WaitTimeout:
+ self.fail("Can't reuse IP address %s because it is not free" %
+ ip_address)
+
+ def _create_network_and_servers(self, servers_num=1, fip_addresses=None,
+ delete_fip_ids=None):
+ delete_fip_ids = delete_fip_ids or []
if fip_addresses:
self.assertEqual(servers_num, len(fip_addresses),
('Number of specified fip addresses '
@@ -472,12 +491,15 @@
fips = []
for server in range(servers_num):
fip = fip_addresses[server] if fip_addresses else None
+ delete_fip = fip['id'] in delete_fip_ids if fip else False
fips.append(
- self._create_server_and_fip(
- network=network, fip_address=fip))
+ self._create_server_and_fip(network=network,
+ fip_address=fip,
+ delete_fip_address=delete_fip))
return fips
- def _create_server_and_fip(self, network, fip_address=None):
+ def _create_server_and_fip(self, network, fip_address=None,
+ delete_fip_address=False):
server = self.create_server(
flavor_ref=CONF.compute.flavor_ref,
image_ref=CONF.compute.image_ref,
@@ -492,8 +514,10 @@
device_id=server['server']['id'])['ports'][0]
if fip_address:
+ if delete_fip_address:
+ self._delete_floating_ip(fip_address)
fip = self.create_floatingip(
- floating_ip_address=fip_address,
+ floating_ip_address=fip_address['floating_ip_address'],
client=self.os_admin.network_client,
port=port)
self.addCleanup(
@@ -524,11 +548,13 @@
3. Create and connect 2 VMs to the internal network.
4. Create FIPs in the external network for the VMs.
5. Make sure that VM1 can ping VM2 FIP address.
- 6. Delete VM2 FIP but save IP address that it used.
- 7. Create and connect one more router to the external network.
- 8. Create and connect an internal network to the second router.
- 9. Create and connect a VM (VM3) to the internal network of
+ 6. Create and connect one more router to the external network.
+ 7. Create and connect an internal network to the second router.
+ 8. Create and connect a VM (VM3) to the internal network of
the second router.
+ 9. Delete VM2 FIP but save IP address that it used. The FIP is
+ deleted just before the creation of the new IP to "reserve" the
+ IP address associated (see LP#1880976).
10. Create a FIP for the VM3 in the external network with
the same IP address that was used for VM2.
11. Make sure that now VM1 is able to reach VM3 using the FIP.
@@ -542,23 +568,7 @@
[mutable_fip, permanent_fip] = (
self._create_network_and_servers(servers_num=2))
self._check_fips_connectivity(mutable_fip, permanent_fip)
- ip_address = mutable_fip['floating_ip_address']
- self.delete_floatingip(mutable_fip)
-
- def _fip_is_free():
- fips = self.os_admin.network_client.list_floatingips(
- )['floatingips']
- for fip in fips:
- if ip_address == fip['floating_ip_address']:
- return False
- return True
-
- try:
- common_utils.wait_until_true(lambda: _fip_is_free(),
- timeout=30, sleep=5)
- except common_utils.WaitTimeout:
- self.fail("Can't reuse IP address because it is not free")
-
[mutable_fip] = self._create_network_and_servers(
- servers_num=1, fip_addresses=[ip_address])
+ servers_num=1, fip_addresses=[mutable_fip],
+ delete_fip_ids=[mutable_fip['id']])
self._check_fips_connectivity(mutable_fip, permanent_fip)
diff --git a/neutron_tempest_plugin/scenario/test_ipv6.py b/neutron_tempest_plugin/scenario/test_ipv6.py
index 844f995..02e2846 100644
--- a/neutron_tempest_plugin/scenario/test_ipv6.py
+++ b/neutron_tempest_plugin/scenario/test_ipv6.py
@@ -16,7 +16,6 @@
from neutron_lib import constants as lib_constants
from oslo_log import log
from tempest.common import utils as tempest_utils
-from tempest.common import waiters
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest.lib import exceptions as lib_exc
@@ -158,9 +157,10 @@
# And plug VM to the second IPv6 network
ipv6_port = self.create_port(ipv6_networks[1])
self.create_interface(vm['id'], ipv6_port['id'])
- waiters.wait_for_interface_status(
+ ip.wait_for_interface_status(
self.os_primary.interfaces_client, vm['id'],
- ipv6_port['id'], lib_constants.PORT_STATUS_ACTIVE)
+ ipv6_port['id'], lib_constants.PORT_STATUS_ACTIVE,
+ ssh_client=ssh_client, mac_address=ipv6_port['mac_address'])
self._test_ipv6_address_configured(ssh_client, vm, ipv6_port)
@decorators.idempotent_id('b13e5408-5250-4a42-8e46-6996ce613e91')
diff --git a/neutron_tempest_plugin/vpnaas/scenario/test_vpnaas.py b/neutron_tempest_plugin/vpnaas/scenario/test_vpnaas.py
index 1e5c60a..1a51198 100644
--- a/neutron_tempest_plugin/vpnaas/scenario/test_vpnaas.py
+++ b/neutron_tempest_plugin/vpnaas/scenario/test_vpnaas.py
@@ -17,6 +17,7 @@
from oslo_config import cfg
import testtools
+from neutron_lib.utils import test
from tempest.common import utils
from tempest.common import waiters
from tempest.lib.common import ssh
@@ -220,6 +221,7 @@
subnet_id, port)
raise self.fail(msg)
+ @test.unstable_test("bug 1882220")
def _test_vpnaas(self):
# RIGHT
right_server = self._create_server(network=self._right_network,
diff --git a/zuul.d/master_jobs.yaml b/zuul.d/master_jobs.yaml
index d4927c5..7e93aaf 100644
--- a/zuul.d/master_jobs.yaml
+++ b/zuul.d/master_jobs.yaml
@@ -418,27 +418,6 @@
networking-bagpipe: https://git.openstack.org/openstack/networking-bagpipe
- job:
- name: neutron-tempest-plugin-fwaas
- parent: neutron-tempest-plugin-base
- timeout: 10800
- required-projects:
- - openstack/devstack-gate
- - openstack/neutron-fwaas
- - openstack/neutron
- - openstack/neutron-tempest-plugin
- - openstack/tempest
- vars:
- tempest_test_regex: ^neutron_tempest_plugin\.fwaas
- devstack_plugins:
- neutron-fwaas: https://opendev.org/openstack/neutron-fwaas.git
- neutron-tempest-plugin: https://opendev.org/openstack/neutron-tempest-plugin.git
- network_api_extensions_common: *api_extensions
- network_api_extensions_fwaas:
- - fwaas_v2
- devstack_localrc:
- NETWORK_API_EXTENSIONS: "{{ (network_api_extensions_common + network_api_extensions_fwaas) | join(',') }}"
-
-- job:
name: neutron-tempest-plugin-dynamic-routing
parent: neutron-tempest-plugin-base
description: |
diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml
index c6bf1a0..80c3a72 100644
--- a/zuul.d/project.yaml
+++ b/zuul.d/project.yaml
@@ -4,7 +4,6 @@
jobs:
- neutron-tempest-plugin-api
- neutron-tempest-plugin-designate-scenario
- - neutron-tempest-plugin-dvr-multinode-scenario
- neutron-tempest-plugin-scenario-linuxbridge
- neutron-tempest-plugin-scenario-openvswitch
- neutron-tempest-plugin-scenario-openvswitch-iptables_hybrid
@@ -14,19 +13,30 @@
- neutron-tempest-plugin-scenario-linuxbridge
- neutron-tempest-plugin-scenario-openvswitch
- neutron-tempest-plugin-scenario-openvswitch-iptables_hybrid
+ #TODO(slaweq): Move neutron-tempest-plugin-dvr-multinode-scenario out of
+ # the experimental queue when it will be more stable
+ experimental:
+ jobs:
+ - neutron-tempest-plugin-dvr-multinode-scenario
+
- project-template:
name: neutron-tempest-plugin-jobs-queens
check:
jobs:
- neutron-tempest-plugin-api-queens
- - neutron-tempest-plugin-designate-scenario-queens
- neutron-tempest-plugin-dvr-multinode-scenario-queens
- neutron-tempest-plugin-scenario-linuxbridge-queens
- neutron-tempest-plugin-scenario-openvswitch-queens
gate:
jobs:
- neutron-tempest-plugin-api-queens
+ #TODO(slaweq): Move neutron-tempest-plugin-dvr-multinode-scenario out of
+ # the experimental queue when it will be more stable
+ experimental:
+ jobs:
+ - neutron-tempest-plugin-dvr-multinode-scenario-queens
+
- project-template:
name: neutron-tempest-plugin-jobs-rocky
@@ -34,13 +44,18 @@
jobs:
- neutron-tempest-plugin-api-rocky
- neutron-tempest-plugin-designate-scenario-rocky
- - neutron-tempest-plugin-dvr-multinode-scenario-rocky
- neutron-tempest-plugin-scenario-linuxbridge-rocky
- neutron-tempest-plugin-scenario-openvswitch-rocky
- neutron-tempest-plugin-scenario-openvswitch-iptables_hybrid-rocky
gate:
jobs:
- neutron-tempest-plugin-api-rocky
+ #TODO(slaweq): Move neutron-tempest-plugin-dvr-multinode-scenario out of
+ # the experimental queue when it will be more stable
+ experimental:
+ jobs:
+ - neutron-tempest-plugin-dvr-multinode-scenario-rocky
+
- project-template:
name: neutron-tempest-plugin-jobs-stein
@@ -48,13 +63,18 @@
jobs:
- neutron-tempest-plugin-api-stein
- neutron-tempest-plugin-designate-scenario-stein
- - neutron-tempest-plugin-dvr-multinode-scenario-stein
- neutron-tempest-plugin-scenario-linuxbridge-stein
- neutron-tempest-plugin-scenario-openvswitch-stein
- neutron-tempest-plugin-scenario-openvswitch-iptables_hybrid-stein
gate:
jobs:
- neutron-tempest-plugin-api-stein
+ #TODO(slaweq): Move neutron-tempest-plugin-dvr-multinode-scenario out of
+ # the experimental queue when it will be more stable
+ experimental:
+ jobs:
+ - neutron-tempest-plugin-dvr-multinode-scenario-stein
+
- project-template:
name: neutron-tempest-plugin-jobs-train
@@ -62,13 +82,18 @@
jobs:
- neutron-tempest-plugin-api-train
- neutron-tempest-plugin-designate-scenario-train
- - neutron-tempest-plugin-dvr-multinode-scenario-train
- neutron-tempest-plugin-scenario-linuxbridge-train
- neutron-tempest-plugin-scenario-openvswitch-train
- neutron-tempest-plugin-scenario-openvswitch-iptables_hybrid-train
gate:
jobs:
- neutron-tempest-plugin-api-train
+ #TODO(slaweq): Move neutron-tempest-plugin-dvr-multinode-scenario out of
+ # the experimental queue when it will be more stable
+ experimental:
+ jobs:
+ - neutron-tempest-plugin-dvr-multinode-scenario-train
+
- project-template:
name: neutron-tempest-plugin-jobs-ussuri
@@ -76,13 +101,18 @@
jobs:
- neutron-tempest-plugin-api-ussuri
- neutron-tempest-plugin-designate-scenario-ussuri
- - neutron-tempest-plugin-dvr-multinode-scenario-ussuri
- neutron-tempest-plugin-scenario-linuxbridge-ussuri
- neutron-tempest-plugin-scenario-openvswitch-ussuri
- neutron-tempest-plugin-scenario-openvswitch-iptables_hybrid-ussuri
gate:
jobs:
- neutron-tempest-plugin-api-ussuri
+ #TODO(slaweq): Move neutron-tempest-plugin-dvr-multinode-scenario out of
+ # the experimental queue when it will be more stable
+ experimental:
+ jobs:
+ - neutron-tempest-plugin-dvr-multinode-scenario-ussuri
+
- project:
templates:
@@ -102,10 +132,6 @@
- neutron-tempest-plugin-bgpvpn-bagpipe
- neutron-tempest-plugin-bgpvpn-bagpipe-train
- neutron-tempest-plugin-bgpvpn-bagpipe-ussuri
- - neutron-tempest-plugin-fwaas:
- # TODO(slaweq): switch it to be voting when bug
- # https://bugs.launchpad.net/neutron/+bug/1858645 will be fixed
- voting: false
- neutron-tempest-plugin-fwaas-train:
# TODO(slaweq): switch it to be voting when bug
# https://bugs.launchpad.net/neutron/+bug/1858645 will be fixed
@@ -123,7 +149,4 @@
jobs:
- neutron-tempest-plugin-sfc
- neutron-tempest-plugin-bgpvpn-bagpipe
- # TODO(slaweq): bring it back to gate queue
- # https://bugs.launchpad.net/neutron/+bug/1858645 will be fixed
- # - neutron-tempest-plugin-fwaas
- neutron-tempest-plugin-dynamic-routing
diff --git a/zuul.d/train_jobs.yaml b/zuul.d/train_jobs.yaml
index f2dd6b7..132873b 100644
--- a/zuul.d/train_jobs.yaml
+++ b/zuul.d/train_jobs.yaml
@@ -144,7 +144,7 @@
- job:
name: neutron-tempest-plugin-fwaas-train
- parent: neutron-tempest-plugin-fwaas
+ parent: neutron-tempest-plugin-fwaas-ussuri
override-checkout: stable/train
vars:
branch_override: stable/train
diff --git a/zuul.d/ussuri_jobs.yaml b/zuul.d/ussuri_jobs.yaml
index a9c369f..4e7bd5d 100644
--- a/zuul.d/ussuri_jobs.yaml
+++ b/zuul.d/ussuri_jobs.yaml
@@ -148,11 +148,26 @@
- job:
name: neutron-tempest-plugin-fwaas-ussuri
- parent: neutron-tempest-plugin-fwaas
+ parent: neutron-tempest-plugin-base
+ timeout: 10800
override-checkout: stable/ussuri
+ required-projects:
+ - openstack/devstack-gate
+ - openstack/neutron-fwaas
+ - openstack/neutron
+ - openstack/neutron-tempest-plugin
+ - openstack/tempest
vars:
branch_override: stable/ussuri
+ tempest_test_regex: ^neutron_tempest_plugin\.fwaas
+ devstack_plugins:
+ neutron-fwaas: https://opendev.org/openstack/neutron-fwaas.git
+ neutron-tempest-plugin: https://opendev.org/openstack/neutron-tempest-plugin.git
network_api_extensions_common: *api_extensions
+ network_api_extensions_fwaas:
+ - fwaas_v2
+ devstack_localrc:
+ NETWORK_API_EXTENSIONS: "{{ (network_api_extensions_common + network_api_extensions_fwaas) | join(',') }}"
- job:
name: neutron-tempest-plugin-dynamic-routing-ussuri