Codebase list cinder-tempest-plugin / eb7bb20
Merge tag '1.5.0' into debian/xena cinder-tempest-plugin 1.5.0 release meta:version: 1.5.0 meta:diff-start: - meta:series: xena meta:release-type: release meta:pypi: no meta:first: yes meta:release:Author: Ghanshyam Mann <gmann@ghanshyammann.com> meta:release:Commit: Ghanshyam <gmann@ghanshyammann.com> meta:release:Change-Id: I4face10976f5d5e6885cad8b4cd7e86066c32067 meta:release:Code-Review+1: Brian Rosmaita <rosmaita.fossdev@gmail.com> meta:release:Code-Review+2: Elod Illes <elod.illes@est.tech> meta:release:Code-Review+2: Hervé Beraud <herveberaud.pro@gmail.com> meta:release:Workflow+1: Hervé Beraud <herveberaud.pro@gmail.com> Thomas Goirand 4 years ago
7 changed file(s) with 245 addition(s) and 22 deletion(s). Raw diff Collapse all Expand all
44 check:
55 jobs:
66 - cinder-tempest-plugin-lvm-lio-barbican
7 - cinder-tempest-plugin-lvm-lio-barbican-centos-8:
7 - cinder-tempest-plugin-lvm-lio-barbican-centos-8-stream:
88 voting: false
99 - cinder-tempest-plugin-lvm-tgt-barbican
10 - nova-ceph-multistore:
11 voting: false
1012 - cinder-tempest-plugin-cbak-ceph
13 - cinder-tempest-plugin-cbak-s3
14 - cinder-tempest-plugin-basic-wallaby
1115 - cinder-tempest-plugin-basic-victoria
1216 - cinder-tempest-plugin-basic-ussuri
1317 - cinder-tempest-plugin-basic-train
18 # Set this job to voting once we have some actual tests to run
19 - cinder-tempest-plugin-protection-functional:
20 voting: false
1421 gate:
1522 jobs:
1623 - cinder-tempest-plugin-lvm-lio-barbican
1724 - cinder-tempest-plugin-lvm-tgt-barbican
1825 - cinder-tempest-plugin-cbak-ceph
19
20 - job:
21 name: cinder-tempest-plugin-lvm-barbican-base
26 experimental:
27 jobs:
28 - cinder-tempest-plugin-cbak-ceph-wallaby
29 - cinder-tempest-plugin-cbak-ceph-victoria
30 - cinder-tempest-plugin-cbak-ceph-ussuri
31 - cinder-tempest-plugin-cbak-ceph-train
32
33 - job:
34 name: cinder-tempest-plugin-protection-functional
35 parent: devstack-tempest
36 required-projects:
37 - opendev.org/openstack/cinder-tempest-plugin
38 - opendev.org/openstack/cinder
39 vars:
40 tox_envlist: all
41 tempest_test_regex: 'cinder_tempest_plugin.rbac'
42 devstack_local_conf:
43 test-config:
44 $CINDER_CONF:
45 oslo_policy:
46 enforce_new_defaults: True
47 $TEMPEST_CONFIG:
48 enforce_scope:
49 cinder: True
50 tempest_plugins:
51 - cinder-tempest-plugin
52
53 - job:
54 name: cinder-tempest-plugin-lvm-barbican-base-abstract
2255 description: |
2356 This is a base job for lvm with lio & tgt targets
2457 parent: devstack-tempest
58 abstract: true
2559 timeout: 10800
26 roles:
27 - zuul: opendev.org/openstack/cinderlib
2860 required-projects:
2961 - opendev.org/openstack/barbican
3062 - opendev.org/openstack/tempest
3163 - opendev.org/openstack/cinder-tempest-plugin
3264 - opendev.org/openstack/cinder
33 - opendev.org/openstack/cinderlib
34 run: playbooks/tempest-and-cinderlib-run.yaml
35 # Required to collect the tox-based logs of the cinderlib functional tests
36 post-run: playbooks/post-cinderlib.yaml
3765 host-vars:
3866 controller:
3967 devstack_plugins:
4068 barbican: https://opendev.org/openstack/barbican
4169 vars:
4270 tempest_test_regex: '(^tempest\.(api|scenario)|(^cinder_tempest_plugin))'
43 tempest_test_blacklist: '{{ ansible_user_dir }}/{{ zuul.projects["opendev.org/openstack/tempest"].src_dir }}/tools/tempest-integrated-gate-storage-blacklist.txt'
4471 tox_envlist: all
4572 devstack_localrc:
4673 CINDER_LVM_TYPE: thin
5885 barbican: true
5986 tempest_plugins:
6087 - cinder-tempest-plugin
61 fetch_subunit_output_additional_dirs:
62 - "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/cinderlib'].src_dir }}"
6388 irrelevant-files:
6489 - ^.*\.rst$
6590 - ^doc/.*$
6691 - ^releasenotes/.*$
6792
6893 - job:
94 name: cinder-tempest-plugin-lvm-barbican-base
95 description: |
96 This is a base job for lvm with lio & tgt targets
97 with cinderlib tests.
98 branches: ^(?!stable/(ocata|pike|queens|rocky|stein)).*$
99 parent: cinder-tempest-plugin-lvm-barbican-base-abstract
100 roles:
101 - zuul: opendev.org/openstack/cinderlib
102 required-projects:
103 - opendev.org/openstack/cinderlib
104 run: playbooks/tempest-and-cinderlib-run.yaml
105 # Required to collect the tox-based logs of the cinderlib functional tests
106 post-run: playbooks/post-cinderlib.yaml
107 vars:
108 fetch_subunit_output_additional_dirs:
109 - "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/cinderlib'].src_dir }}"
110 tempest_test_exclude_list: '{{ ansible_user_dir }}/{{ zuul.projects["opendev.org/openstack/tempest"].src_dir }}/tools/tempest-integrated-gate-storage-exclude-list.txt'
111
112 - job:
113 name: cinder-tempest-plugin-lvm-barbican-base
114 description: |
115 This is a base job for lvm with lio & tgt targets
116 branches: ^(?=stable/(ocata|pike|queens|rocky|stein)).*$
117 parent: cinder-tempest-plugin-lvm-barbican-base-abstract
118 required-projects:
119 - name: opendev.org/openstack/cinder-tempest-plugin
120 override-checkout: stein-last
121 vars:
122 tempest_test_blacklist: '{{ ansible_user_dir }}/{{ zuul.projects["opendev.org/openstack/tempest"].src_dir }}/tools/tempest-integrated-gate-storage-blacklist.txt'
123
124 - job:
69125 name: cinder-tempest-plugin-cbak-ceph
70126 parent: devstack-plugin-ceph-tempest-py3
71127 description: |
72128 Integration tests that runs with the ceph devstack plugin, py3
73129 and enable the backup service.
74130 vars:
75 tempest_black_regex: '(VolumesBackupsTest.test_bootable_volume_backup_and_restore|TestVolumeBackupRestore.test_volume_backup_restore)'
76131 devstack_local_conf:
77132 test-config:
78133 $TEMPEST_CONFIG:
81136 devstack_services:
82137 c-bak: true
83138
139 - job:
140 name: cinder-tempest-plugin-cbak-ceph-wallaby
141 parent: cinder-tempest-plugin-cbak-ceph
142 nodeset: openstack-single-node-focal
143 override-checkout: stable/wallaby
144
145 - job:
146 name: cinder-tempest-plugin-cbak-ceph-victoria
147 parent: cinder-tempest-plugin-cbak-ceph
148 nodeset: openstack-single-node-focal
149 override-checkout: stable/victoria
150
151 - job:
152 name: cinder-tempest-plugin-cbak-ceph-ussuri
153 parent: cinder-tempest-plugin-cbak-ceph
154 nodeset: openstack-single-node-bionic
155 override-checkout: stable/ussuri
156
157 - job:
158 name: cinder-tempest-plugin-cbak-ceph-train
159 parent: cinder-tempest-plugin-cbak-ceph
160 nodeset: openstack-single-node-bionic
161 override-checkout: stable/train
162
84163 # variant for pre-Ussuri branches (no volume revert for Ceph),
85164 # should this job be used on those branches
86165 - job:
87166 name: cinder-tempest-plugin-cbak-ceph
88167 branches: ^(?=stable/(ocata|pike|queens|rocky|stein|train)).*$
89168 vars:
90 tempest_black_regex: ''
91169 devstack_local_conf:
92170 test-config:
93171 $TEMPEST_CONFIG:
105183 CINDER_ISCSI_HELPER: lioadm
106184
107185 - job:
108 name: cinder-tempest-plugin-lvm-lio-barbican-centos-8
186 name: cinder-tempest-plugin-lvm-lio-barbican-centos-8-stream
109187 parent: cinder-tempest-plugin-lvm-lio-barbican
110 nodeset: devstack-single-node-centos-8
188 nodeset: devstack-single-node-centos-8-stream
111189 description: |
112190 This jobs configures Cinder with LVM, LIO, barbican and
113191 runs tempest tests and cinderlib tests on CentOS 8.
118196 This jobs configures Cinder with LVM, tgt, barbican and
119197 runs tempest tests and cinderlib tests.
120198 parent: cinder-tempest-plugin-lvm-barbican-base
121
199 vars:
200 devstack_localrc:
201 CINDER_ISCSI_HELPER: tgtadm
202
203 - job:
204 name: cinder-tempest-plugin-cbak-s3
205 parent: cinder-tempest-plugin-basic
206 description: |
207 Integration tests that runs with the s3 backup driver with
208 Swift S3 API.
209 vars:
210 devstack_localrc:
211 CINDER_BACKUP_DRIVER: 's3_swift'
212 devstack_services:
213 c-bak: true
214 s3api: true
215 # Workaround: TLS proxy seems to cause S3 signature mismatch.
216 tls-proxy: false
217 tempest_test_regex: '(test_volume_backup|test_volumes_backup|test_snapshot_backup)'
122218 - job:
123219 name: cinder-tempest-plugin-basic
124220 parent: devstack-tempest
140236 - ^releasenotes/.*$
141237
142238 - job:
239 name: cinder-tempest-plugin-basic-wallaby
240 parent: cinder-tempest-plugin-basic
241 nodeset: openstack-single-node-focal
242 override-checkout: stable/wallaby
243
244 - job:
143245 name: cinder-tempest-plugin-basic-victoria
144246 parent: cinder-tempest-plugin-basic
145247 nodeset: openstack-single-node-focal
2323 ::
2424
2525 [[local|localrc]]
26 VIRT_DRIVER=libvirt
2726 ADMIN_PASSWORD=secret
2827 SERVICE_TOKEN=$ADMIN_PASSWORD
2928 MYSQL_PASSWORD=$ADMIN_PASSWORD
3433 SYSLOG=False
3534 LOG_COLOR=False
3635 RECLONE=yes
37 ENABLED_SERVICES=c-api,c-sch,c-vol,cinder,dstat,g-api,g-reg,key,mysql,
38 n-api,n-cond,n-cpu,n-crt,n-net,n-sch,rabbit,tempest
36 ENABLED_SERVICES=c-api,c-bak,c-sch,c-vol,cinder,dstat,g-api,g-reg,key
37 ENABLED_SERVICES+=,mysql,n-api,n-cond,n-cpu,n-crt,n-sch,rabbit,tempest
3938 CINDER_ENABLED_BACKENDS=lvmdriver-1
4039 CINDER_DEFAULT_VOLUME_TYPE=lvmdriver-1
4140 CINDER_VOLUME_CLEAR=none
0 # Licensed under the Apache License, Version 2.0 (the "License"); you may
1 # not use this file except in compliance with the License. You may obtain
2 # a copy of the License at
3 #
4 # http://www.apache.org/licenses/LICENSE-2.0
5 #
6 # Unless required by applicable law or agreed to in writing, software
7 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
9 # License for the specific language governing permissions and limitations
10 # under the License.
11
12 from tempest import config
13
14 CONF = config.CONF
15
16
17 class VolumeV3RbacBaseTests(object):
18
19 identity_version = 'v3'
20
21 @classmethod
22 def skip_checks(cls):
23 super(VolumeV3RbacBaseTests, cls).skip_checks()
24 if not CONF.enforce_scope.cinder:
25 raise cls.skipException(
26 "Tempest is not configured to enforce_scope for cinder, "
27 "skipping RBAC tests. To enable these tests set "
28 "`tempest.conf [enforce_scope] cinder=True`."
29 )
30
31 def do_request(self, method, expected_status=200, client=None, **payload):
32 if not client:
33 client = self.client
34 if isinstance(expected_status, type(Exception)):
35 self.assertRaises(expected_status,
36 getattr(client, method),
37 **payload)
38 else:
39 response = getattr(client, method)(**payload)
40 self.assertEqual(response.response.status, expected_status)
41 return response
0 # Licensed under the Apache License, Version 2.0 (the "License"); you may
1 # not use this file except in compliance with the License. You may obtain
2 # a copy of the License at
3 #
4 # http://www.apache.org/licenses/LICENSE-2.0
5 #
6 # Unless required by applicable law or agreed to in writing, software
7 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
9 # License for the specific language governing permissions and limitations
10 # under the License.
11
12 import abc
13
14 from tempest.lib import exceptions
15
16 from cinder_tempest_plugin.api.volume import base
17 from cinder_tempest_plugin.rbac.v3 import base as rbac_base
18
19
20 class VolumeV3RbacCapabilityTests(rbac_base.VolumeV3RbacBaseTests,
21 metaclass=abc.ABCMeta):
22
23 @classmethod
24 def setup_clients(cls):
25 super().setup_clients()
26 cls.persona = getattr(cls, 'os_%s' % cls.credentials[0])
27 cls.client = cls.persona.volume_capabilities_client_latest
28 # NOTE(lbragstad): This admin_client will be more useful later when
29 # cinder supports system-scope and we need it for administrative
30 # operations. For now, keep os_project_admin as the admin client until
31 # we have system-scope.
32 admin_client = cls.os_project_admin
33 cls.admin_capabilities_client = (
34 admin_client.volume_capabilities_client_latest)
35 cls.admin_stats_client = (
36 admin_client.volume_scheduler_stats_client_latest)
37
38 @classmethod
39 def setup_credentials(cls):
40 super().setup_credentials()
41 cls.os_primary = getattr(cls, 'os_%s' % cls.credentials[0])
42
43 @abc.abstractmethod
44 def test_get_capabilities(self):
45 """Test volume_extension:capabilities policy.
46
47 This test must check:
48 * whether the persona can fetch capabilities for a host.
49
50 """
51 pass
52
53
54 class ProjectAdminTests(VolumeV3RbacCapabilityTests, base.BaseVolumeTest):
55
56 credentials = ['project_admin', 'system_admin']
57
58 def test_get_capabilities(self):
59 pools = self.admin_stats_client.list_pools()['pools']
60 host_name = pools[0]['name']
61 self.do_request('show_backend_capabilities', expected_status=200,
62 host=host_name)
63
64
65 class ProjectMemberTests(ProjectAdminTests, base.BaseVolumeTest):
66
67 credentials = ['project_member', 'project_admin', 'system_admin']
68
69 def test_get_capabilities(self):
70 pools = self.admin_stats_client.list_pools()['pools']
71 host_name = pools[0]['name']
72 self.do_request('show_backend_capabilities',
73 expected_status=exceptions.Forbidden,
74 host=host_name)
75
76
77 class ProjectReaderTests(ProjectMemberTests, base.BaseVolumeTest):
78
79 credentials = ['project_reader', 'project_admin', 'system_admin']
00 [tox]
1 minversion = 3.1.0
1 minversion = 3.18.0
22 envlist = pep8
33 skipsdist = True
44 # this allows tox to infer the base python from the environment name