Generate Neutron policy.json (Patrole) 97/65997/4
authorCédric Ollivier <cedric.ollivier@orange.com>
Wed, 19 Dec 2018 22:22:58 +0000 (23:22 +0100)
committerCédric Ollivier <cedric.ollivier@orange.com>
Thu, 20 Dec 2018 14:17:05 +0000 (15:17 +0100)
Keystone policy.json et al will be managed in other changes to allow
cherry-picking.

It blacklists two subtests which requires policy actions not found in
policy files.

Change-Id: I5365fb1b24f7f07563037634d00cb9898fbde0fc
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
docker/smoke/Dockerfile
docker/smoke/testcases.yaml
functest/ci/testcases.yaml

index 47c6a20..19bea3a 100644 (file)
@@ -6,7 +6,6 @@ ARG REFSTACK_TARGET=2018.02
 ARG PATROLE_TAG=master
 ARG NEUTRON_TAG=master
 ARG BARBICAN_TAG=master
-ARG NEUTRON_RALLY_TAG=master
 
 RUN apk --no-cache add --virtual .build-deps --update \
         python-dev build-base linux-headers libffi-dev \
@@ -34,20 +33,20 @@ RUN apk --no-cache add --virtual .build-deps --update \
     pip install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \
         /src/patrole /src/barbican-tempest-plugin /src/neutron-tempest-plugin \
         networking-bgpvpn networking-sfc && \
-    rm -r upper-constraints.txt upper-constraints.opnfv.txt \
-        /src/patrole /src/barbican-tempest-plugin /src/neutron-tempest-plugin && \
     mkdir -p /home/opnfv/functest/data/refstack && \
     wget "https://refstack.openstack.org/api/v1/guidelines/${REFSTACK_TARGET}/tests?target=compute&type=required&alias=true&flag=false" \
         -O /home/opnfv/functest/data/refstack/defcore.txt && \
     mkdir -p /etc/neutron /etc/glance && \
     wget -q -O /etc/glance/policy.json https://git.openstack.org/cgit/openstack/glance/plain/etc/policy.json?h=$OPENSTACK_TAG && \
-    git init /src/neutron && \
-    (cd /src/neutron && \
-        git fetch --tags https://git.openstack.org/openstack/neutron.git $NEUTRON_RALLY_TAG && \
-        git checkout FETCH_HEAD) && \
+    virtualenv oslo && . oslo/bin/activate && \
+    pip install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \
+        oslo.policy -e git+https://git.openstack.org/openstack/neutron.git@$OPENSTACK_TAG#egg=neutron && \
+    oslopolicy-sample-generator  --format json --output-file /etc/neutron/policy.json --namespace neutron && \
+    deactivate && \
     mkdir -p /home/opnfv/functest/data/rally/neutron && \
     cp -r /src/neutron/rally-jobs /home/opnfv/functest/data/rally/neutron/rally-jobs && \
-    rm -r /src/neutron && \
+    rm -r oslo upper-constraints.txt upper-constraints.opnfv.txt \
+        /src/neutron /src/patrole /src/barbican-tempest-plugin /src/neutron-tempest-plugin && \
     apk del .build-deps
 COPY testcases.yaml /usr/lib/python2.7/site-packages/xtesting/ci/testcases.yaml
 CMD ["run_tests", "-t", "all"]
index c7f110a..6322f12 100644 (file)
@@ -90,7 +90,10 @@ tiers:
                         role: 'admin'
                         includes:
                             - 'image'
+                            - 'network'
                         excludes:
+                            - 'network.test_flavors_rbac'
+                            - 'network.test_network_ip_availability_rbac'
                             - 'test_networks_multiprovider_rbac'
                             - 'test_auto_allocated_topology_rbac'
 
index 0f83664..41e7aa0 100644 (file)
@@ -262,7 +262,10 @@ tiers:
                         role: 'admin'
                         includes:
                             - 'image'
+                            - 'network'
                         excludes:
+                            - 'network.test_flavors_rbac'
+                            - 'network.test_network_ip_availability_rbac'
                             - 'test_networks_multiprovider_rbac'
                             - 'test_auto_allocated_topology_rbac'