Update heat policy.json

This patch sets stacks:global_index to role:admin in /etc/heat/policy.json,
so that an admin role can look for all stacks in heat, which a magnum periodic
task will be benefited from it.

Partial-Implements: blueprint add-periodic-task
Change-Id: I4669ef355d302607f42df182bba680dc548e9618
This commit is contained in:
Eli Qiao 2015-07-02 16:59:41 +08:00
parent eb7abda967
commit 5ff28550be
1 changed files with 7 additions and 0 deletions

View File

@ -88,6 +88,7 @@ function configure_magnum {
# Rebuild the config file from scratch
create_magnum_conf
update_heat_policy
}
# create_magnum_accounts() - Set up common required magnum accounts
@ -169,6 +170,12 @@ function create_magnum_conf {
fi
}
function update_heat_policy {
# enable stacks globel_index search so that magnum can use
# list(global_tenant=True)
sed 's/\("stacks:global_index":\).*$/\1 "role:admin",/' $HEAT_CONF_DIR/policy.json
}
function create_magnum_conf_magnum_network {
iniset $MAGNUM_CONF DEFAULT network_manager "magnum.network.manager.$NETWORK_MANAGER"
iniset $MAGNUM_CONF DEFAULT public_interface "$PUBLIC_INTERFACE"