Merge "[S-RBAC] Switch to new policies by default"
diff --git a/neutron_tempest_plugin/scenario/base.py b/neutron_tempest_plugin/scenario/base.py
index c8eddd1..d972953 100644
--- a/neutron_tempest_plugin/scenario/base.py
+++ b/neutron_tempest_plugin/scenario/base.py
@@ -74,12 +74,12 @@
     return cmd
 
 
-def get_ncat_client_cmd(ip_address, port, protocol):
+def get_ncat_client_cmd(ip_address, port, protocol, ssh_client=None):
     udp = ''
     if protocol.lower() == neutron_lib_constants.PROTO_NAME_UDP:
         udp = '-u'
     cmd = 'echo "knock knock" | nc '
-    ncat_version = get_ncat_version()
+    ncat_version = get_ncat_version(ssh_client=ssh_client)
     if ncat_version > packaging_version.Version('7.60'):
         cmd += '-z '
     cmd += '-w 1 %(udp)s %(host)s %(port)s' % {
@@ -636,7 +636,8 @@
         If ssh_client is not given, it is executed locally on host where tests
         are executed. Otherwise ssh_client object is used to execute it.
         """
-        cmd = get_ncat_client_cmd(ip_address, port, protocol)
+        cmd = get_ncat_client_cmd(ip_address, port, protocol,
+                                  ssh_client=ssh_client)
         result = shell.execute(cmd, ssh_client=ssh_client)
         self.assertEqual(0, result.exit_status)
         return result.stdout
diff --git a/neutron_tempest_plugin/scenario/test_security_groups.py b/neutron_tempest_plugin/scenario/test_security_groups.py
index a74b7b7..d5f9b77 100644
--- a/neutron_tempest_plugin/scenario/test_security_groups.py
+++ b/neutron_tempest_plugin/scenario/test_security_groups.py
@@ -107,6 +107,8 @@
         self.addCleanup(test_utils.call_and_ignore_notfound_exc,
                         self.network_client.reset_quotas, self.project_id)
         self.network_client.update_quotas(self.project_id, security_group=-1)
+        self.network_client.update_quotas(self.project_id,
+                                          security_group_rule=-1)
 
     def create_vm_testing_sec_grp(self, num_servers=2, security_groups=None,
                                   ports=None, network_id=None,
diff --git a/zuul.d/master_jobs.yaml b/zuul.d/master_jobs.yaml
index dacf3d5..66b61da 100644
--- a/zuul.d/master_jobs.yaml
+++ b/zuul.d/master_jobs.yaml
@@ -1013,6 +1013,8 @@
       - ^neutron/tests/fullstack/.*
       - ^neutron/tests/functional/.*
       - ^neutron_tempest_plugin/api/test_.*$
+      - ^neutron_tempest_plugin/scenario/admin/.*$
+      - ^neutron_tempest_plugin/scenario/test_.*$
       - ^neutron_tempest_plugin/(bgpvpn|fwaas|neutron_dynamic_routing|tap_as_a_service|vpnaas).*$
       - ^neutron_tempest_plugin/services/bgp/.*$
       - ^tools/.*$
@@ -1076,6 +1078,8 @@
       - ^neutron/tests/fullstack/.*
       - ^neutron/tests/functional/.*
       - ^neutron_tempest_plugin/api/test_.*$
+      - ^neutron_tempest_plugin/scenario/admin/.*$
+      - ^neutron_tempest_plugin/scenario/test_.*$
       - ^neutron_tempest_plugin/(fwaas|neutron_dynamic_routing|sfc|tap_as_a_service|vpnaas).*$
       - ^neutron_tempest_plugin/services/bgp/.*$
       - ^tools/.*$
@@ -1108,24 +1112,7 @@
         - bgp_4byte_asn
       devstack_localrc:
         NETWORK_API_EXTENSIONS: "{{ (network_api_extensions_common + network_api_extensions_bgp) | join(',') }}"
-        Q_AGENT: openvswitch
-        Q_ML2_TENANT_NETWORK_TYPE: vxlan
-        Q_ML2_PLUGIN_MECHANISM_DRIVERS: openvswitch
       devstack_services:
-        # Disable OVN services
-        br-ex-tcpdump: false
-        br-int-flows: false
-        ovn-controller: false
-        ovn-northd: false
-        ovs-vswitchd: false
-        ovsdb-server: false
-        q-ovn-metadata-agent: false
-        # Neutron services
-        q-agt: true
-        q-dhcp: true
-        q-meta: true
-        q-metering: true
-        q-l3: true
         neutron-dr: true
         neutron-dr-agent: true
       tempest_concurrency: 1
@@ -1144,6 +1131,8 @@
       - ^neutron/tests/fullstack/.*
       - ^neutron/tests/functional/.*
       - ^neutron_tempest_plugin/api/test_.*$
+      - ^neutron_tempest_plugin/scenario/admin/.*$
+      - ^neutron_tempest_plugin/scenario/test_.*$
       - ^neutron_tempest_plugin/(bgpvpn|fwaas|sfc|tap_as_a_service|vpnaas).*$
       - ^tools/.*$
       - ^tox.ini$
@@ -1204,6 +1193,8 @@
       - ^neutron/tests/fullstack/.*
       - ^neutron/tests/functional/.*
       - ^neutron_tempest_plugin/api/test_.*$
+      - ^neutron_tempest_plugin/scenario/admin/.*$
+      - ^neutron_tempest_plugin/scenario/test_.*$
       - ^neutron_tempest_plugin/(bgpvpn|neutron_dynamic_routing|sfc|tap_as_a_service|vpnaas).*$
       - ^neutron_tempest_plugin/services/bgp/.*$
       - ^tools/.*$
@@ -1268,6 +1259,8 @@
       - ^neutron/tests/fullstack/.*
       - ^neutron/tests/functional/.*
       - ^neutron_tempest_plugin/api/test_.*$
+      - ^neutron_tempest_plugin/scenario/admin/.*$
+      - ^neutron_tempest_plugin/scenario/test_.*$
       - ^neutron_tempest_plugin/(bgpvpn|fwaas|neutron_dynamic_routing|sfc|tap_as_a_service).*$
       - ^neutron_tempest_plugin/services/bgp/.*$
       - ^tools/.*$
@@ -1374,6 +1367,8 @@
       - ^neutron/tests/fullstack/.*
       - ^neutron/tests/functional/.*
       - ^neutron_tempest_plugin/api/test_.*$
+      - ^neutron_tempest_plugin/scenario/admin/.*$
+      - ^neutron_tempest_plugin/scenario/test_.*$
       - ^neutron_tempest_plugin/(bgpvpn|fwaas|neutron_dynamic_routing|sfc|vpnaas).*$
       - ^neutron_tempest_plugin/services/bgp/.*$
       - ^tools/.*$
diff --git a/zuul.d/xena_jobs.yaml b/zuul.d/xena_jobs.yaml
index 595b4d8..5d0f617 100644
--- a/zuul.d/xena_jobs.yaml
+++ b/zuul.d/xena_jobs.yaml
@@ -205,6 +205,28 @@
     override-checkout: stable/xena
     vars:
       network_api_extensions_common: *api_extensions
+      devstack_localrc:
+        NETWORK_API_EXTENSIONS: "{{ (network_api_extensions_common + network_api_extensions_bgp) | join(',') }}"
+        Q_AGENT: openvswitch
+        Q_ML2_TENANT_NETWORK_TYPE: vxlan
+        Q_ML2_PLUGIN_MECHANISM_DRIVERS: openvswitch
+      devstack_services:
+        # Disable OVN services
+        br-ex-tcpdump: false
+        br-int-flows: false
+        ovn-controller: false
+        ovn-northd: false
+        ovs-vswitchd: false
+        ovsdb-server: false
+        q-ovn-metadata-agent: false
+        # Neutron services
+        q-agt: true
+        q-dhcp: true
+        q-meta: true
+        q-metering: true
+        q-l3: true
+        neutron-dr: true
+        neutron-dr-agent: true
 
 - job:
     name: neutron-tempest-plugin-vpnaas-xena
diff --git a/zuul.d/yoga_jobs.yaml b/zuul.d/yoga_jobs.yaml
index d47fc93..2dacd4b 100644
--- a/zuul.d/yoga_jobs.yaml
+++ b/zuul.d/yoga_jobs.yaml
@@ -209,6 +209,28 @@
     override-checkout: stable/yoga
     vars:
       network_api_extensions_common: *api_extensions
+      devstack_localrc:
+        NETWORK_API_EXTENSIONS: "{{ (network_api_extensions_common + network_api_extensions_bgp) | join(',') }}"
+        Q_AGENT: openvswitch
+        Q_ML2_TENANT_NETWORK_TYPE: vxlan
+        Q_ML2_PLUGIN_MECHANISM_DRIVERS: openvswitch
+      devstack_services:
+        # Disable OVN services
+        br-ex-tcpdump: false
+        br-int-flows: false
+        ovn-controller: false
+        ovn-northd: false
+        ovs-vswitchd: false
+        ovsdb-server: false
+        q-ovn-metadata-agent: false
+        # Neutron services
+        q-agt: true
+        q-dhcp: true
+        q-meta: true
+        q-metering: true
+        q-l3: true
+        neutron-dr: true
+        neutron-dr-agent: true
 
 - job:
     name: neutron-tempest-plugin-vpnaas-yoga
diff --git a/zuul.d/zed_jobs.yaml b/zuul.d/zed_jobs.yaml
index a11c2c8..0d846f7 100644
--- a/zuul.d/zed_jobs.yaml
+++ b/zuul.d/zed_jobs.yaml
@@ -220,6 +220,28 @@
     override-checkout: stable/zed
     vars:
       network_api_extensions_common: *api_extensions
+      devstack_localrc:
+        NETWORK_API_EXTENSIONS: "{{ (network_api_extensions_common + network_api_extensions_bgp) | join(',') }}"
+        Q_AGENT: openvswitch
+        Q_ML2_TENANT_NETWORK_TYPE: vxlan
+        Q_ML2_PLUGIN_MECHANISM_DRIVERS: openvswitch
+      devstack_services:
+        # Disable OVN services
+        br-ex-tcpdump: false
+        br-int-flows: false
+        ovn-controller: false
+        ovn-northd: false
+        ovs-vswitchd: false
+        ovsdb-server: false
+        q-ovn-metadata-agent: false
+        # Neutron services
+        q-agt: true
+        q-dhcp: true
+        q-meta: true
+        q-metering: true
+        q-l3: true
+        neutron-dr: true
+        neutron-dr-agent: true
 
 - job:
     name: neutron-tempest-plugin-fwaas-zed