|
...
|
...
|
@@ -885,6 +885,12 @@ function _configure_neutron_common {
|
|
885
|
885
|
|
|
886
|
886
|
cp $NEUTRON_DIR/etc/neutron.conf $NEUTRON_CONF
|
|
887
|
887
|
|
|
|
888
|
+ Q_POLICY_FILE=$NEUTRON_CONF_DIR/policy.json
|
|
|
889
|
+ cp $NEUTRON_DIR/etc/policy.json $Q_POLICY_FILE
|
|
|
890
|
+
|
|
|
891
|
+ # allow neutron user to administer neutron to match neutron account
|
|
|
892
|
+ sed -i 's/"context_is_admin": "role:admin"/"context_is_admin": "role:admin or user_name:neutron"/g' $Q_POLICY_FILE
|
|
|
893
|
+
|
|
888
|
894
|
# Set plugin-specific variables ``Q_DB_NAME``, ``Q_PLUGIN_CLASS``.
|
|
889
|
895
|
# For main plugin config file, set ``Q_PLUGIN_CONF_PATH``, ``Q_PLUGIN_CONF_FILENAME``.
|
|
890
|
896
|
# For addition plugin config files, set ``Q_PLUGIN_EXTRA_CONF_PATH``,
|
|
...
|
...
|
@@ -1111,13 +1117,7 @@ function _configure_neutron_plugin_agent {
|
|
1111
|
1111
|
# It is called when q-svc is enabled.
|
|
1112
|
1112
|
function _configure_neutron_service {
|
|
1113
|
1113
|
Q_API_PASTE_FILE=$NEUTRON_CONF_DIR/api-paste.ini
|
|
1114
|
|
- Q_POLICY_FILE=$NEUTRON_CONF_DIR/policy.json
|
|
1115
|
|
-
|
|
1116
|
1114
|
cp $NEUTRON_DIR/etc/api-paste.ini $Q_API_PASTE_FILE
|
|
1117
|
|
- cp $NEUTRON_DIR/etc/policy.json $Q_POLICY_FILE
|
|
1118
|
|
-
|
|
1119
|
|
- # allow neutron user to administer neutron to match neutron account
|
|
1120
|
|
- sed -i 's/"context_is_admin": "role:admin"/"context_is_admin": "role:admin or user_name:neutron"/g' $Q_POLICY_FILE
|
|
1121
|
1115
|
|
|
1122
|
1116
|
# Update either configuration file with plugin
|
|
1123
|
1117
|
iniset $NEUTRON_CONF DEFAULT core_plugin $Q_PLUGIN_CLASS
|