create early_create phase

For projects that need to setup custom networking we need an
early_create phase that has only gotten the base neutron network setup
which they can then work with and make changes as appropriate.

Create this new hook point, and move the neutron create to this early
phase.

Change-Id: Ifb1903f8d3cb11bc4db33f8acdea342e6373f864
This commit is contained in:
Sean Dague 2016-05-12 07:59:36 -04:00
parent fce63f40d2
commit ae1837e18d
3 changed files with 17 additions and 3 deletions

View File

@ -68,6 +68,17 @@ Calling Interface
The following is the supported calling interface
- resources.sh early_create
creates a set of sample resources that should survive very early in
the upgrade process. This should only be used for horizontal
resources that impact other services, that *have* to be available
before they do any of their setup. For instance setup of neutron
networks.
Do not use the phase unless you really know why ``create`` will not
work for you.
- resources.sh create
creates a set of sample resources that should survive

View File

@ -255,6 +255,9 @@ if [[ "$RUN_BASE" == "True" ]]; then
fi
stop $STOP base-smoke 110
# Early Create resources, used largely for network setup
resources early_create
# Create resources
resources create

View File

@ -29,7 +29,7 @@ NEUTRON_NET=neutron_grenade
# resource flow can be sorted out, unwinding what's currently hard
# coded in javelin is a little odd.
function create {
function early_create {
# this builds a default network for other services to use
local net_id=$(neutron net-create --shared $NEUTRON_NET | grep ' id ' | get_field 2)
resource_save network net_id $net_id
@ -71,8 +71,8 @@ id) || /bin/true
# Dispatcher
case $1 in
"create")
create
"early_create")
early_create
;;
"verify_noapi")
verify_noapi