File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848PLACEMENT_SERVICE_PROTOCOL=${PLACEMENT_SERVICE_PROTOCOL:- $SERVICE_PROTOCOL }
4949PLACEMENT_SERVICE_HOST=${PLACEMENT_SERVICE_HOST:- $SERVICE_HOST }
5050
51+ # Flag to set the oslo_policy.enforce_scope and oslo_policy.enforce_new_defaults.
52+ # This is used to switch the Placement API policies scope and new defaults.
53+ # By Default, these flag are False.
54+ # For more detail: https://docs.openstack.org/oslo.policy/latest/configuration/index.html#oslo_policy.enforce_scope
55+ PLACEMENT_ENFORCE_SCOPE=$( trueorfalse False PLACEMENT_ENFORCE_SCOPE)
56+
5157# Functions
5258# ---------
5359
@@ -111,6 +117,10 @@ function configure_placement {
111117 else
112118 _config_placement_apache_wsgi
113119 fi
120+ if [[ " $PLACEMENT_ENFORCE_SCOPE " == " True" || " $ENFORCE_SCOPE " == " True" ]]; then
121+ iniset $PLACEMENT_CONF oslo_policy enforce_new_defaults True
122+ iniset $PLACEMENT_CONF oslo_policy enforce_scope True
123+ fi
114124}
115125
116126# create_placement_accounts() - Set up required placement accounts
Original file line number Diff line number Diff line change @@ -678,6 +678,10 @@ function configure_tempest {
678678 iniset $TEMPEST_CONFIG enforce_scope nova true
679679 fi
680680
681+ if [[ " $PLACEMENT_ENFORCE_SCOPE " == True || " $ENFORCE_SCOPE " == True ]] ; then
682+ iniset $TEMPEST_CONFIG enforce_scope placement true
683+ fi
684+
681685 if [[ " $GLANCE_ENFORCE_SCOPE " == True || " $ENFORCE_SCOPE " == True ]] ; then
682686 iniset $TEMPEST_CONFIG enforce_scope glance true
683687 fi
You can’t perform that action at this time.
0 commit comments