Merge "Add RBAC scope and new defaults setting support for placement"
This commit is contained in:
commit
1ddae48da3
@ -48,6 +48,12 @@ fi
|
||||
PLACEMENT_SERVICE_PROTOCOL=${PLACEMENT_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
|
||||
PLACEMENT_SERVICE_HOST=${PLACEMENT_SERVICE_HOST:-$SERVICE_HOST}
|
||||
|
||||
# Flag to set the oslo_policy.enforce_scope and oslo_policy.enforce_new_defaults.
|
||||
# This is used to switch the Placement API policies scope and new defaults.
|
||||
# By Default, these flag are False.
|
||||
# For more detail: https://docs.openstack.org/oslo.policy/latest/configuration/index.html#oslo_policy.enforce_scope
|
||||
PLACEMENT_ENFORCE_SCOPE=$(trueorfalse False PLACEMENT_ENFORCE_SCOPE)
|
||||
|
||||
# Functions
|
||||
# ---------
|
||||
|
||||
@ -111,6 +117,10 @@ function configure_placement {
|
||||
else
|
||||
_config_placement_apache_wsgi
|
||||
fi
|
||||
if [[ "$PLACEMENT_ENFORCE_SCOPE" == "True" || "$ENFORCE_SCOPE" == "True" ]]; then
|
||||
iniset $PLACEMENT_CONF oslo_policy enforce_new_defaults True
|
||||
iniset $PLACEMENT_CONF oslo_policy enforce_scope True
|
||||
fi
|
||||
}
|
||||
|
||||
# create_placement_accounts() - Set up required placement accounts
|
||||
|
@ -678,6 +678,10 @@ function configure_tempest {
|
||||
iniset $TEMPEST_CONFIG enforce_scope nova true
|
||||
fi
|
||||
|
||||
if [[ "$PLACEMENT_ENFORCE_SCOPE" == True || "$ENFORCE_SCOPE" == True ]] ; then
|
||||
iniset $TEMPEST_CONFIG enforce_scope placement true
|
||||
fi
|
||||
|
||||
if [[ "$GLANCE_ENFORCE_SCOPE" == True || "$ENFORCE_SCOPE" == True ]] ; then
|
||||
iniset $TEMPEST_CONFIG enforce_scope glance true
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user