glance-tempest-plugin/glance_tempest_plugin/config.py
Ghanshyam Mann a7f1754075 Assert on system scope permission based on supported flag
system scope is dropped from API policy in zed release
- https://review.opendev.org/c/openstack/glance/+/855435

and so does we addded some assert in glance-tempest-plugin rbac
tests for system scope permissions
- https://review.opendev.org/c/openstack/glance-tempest-plugin/+/855440

As glance-tempest-plugins should work on stable/xena onwards, we need to
make sure those system scope not allowed testing is done only
for stable/zed onwards where it is dropped.

This adds the config option and based on that assert on system scope
permissions. This config flag will be set as True for <=stable/yoga
so that these asserts can be skipped.

Change-Id: Ic6c09ced0eca03d0966154d3d7c6dfe1c38c3b13
2023-05-05 19:52:42 -05:00

22 lines
941 B
Python

# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
glance_api_group = cfg.OptGroup(name="glance_api",
title="Glance API Service Options")
GlanceAPIGroup = [cfg.BoolOpt("system_scope_supported",
default=False,
help="Whether or not system scope "
"is supported")]