Make DevStack create a freepool aggregate

Creating the Nova host aggregate used by Blazar as freepool for host
reservation was done automatically by the old extras.d plugin, but this
functionality was not migrated to the new DevStack plugin.

This commit creates the freepool before starting Blazar services. It
also uses the openstack client rather than the nova command.

Change-Id: Ifc6555855342ee274e01b1f1bc3ace913403d50a
This commit is contained in:
Pierre Riteau 2017-01-23 11:15:44 +00:00
parent 0ff134d458
commit c6f75760de
1 changed files with 3 additions and 1 deletions

View File

@ -104,7 +104,7 @@ function configure_blazar {
# create_blazar_aggregate_freepool() - Create a Nova aggregate to use as freepool (for host reservation)
function create_blazar_aggregate_freepool {
nova aggregate-create $BLAZAR_FREEPOOL_NAME
openstack aggregate create $BLAZAR_FREEPOOL_NAME
}
# create_blazar_accounts() - Set up common required BLAZAR accounts
@ -188,6 +188,8 @@ if is_service_enabled blazar blazar-m blazar-a; then
configure_blazar
create_blazar_accounts
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
echo_summary "Creating Nova aggregate used as freepool for Blazar Host Reservation"
create_blazar_aggregate_freepool
# Start the services
start_blazar
fi