Create initial network when using Cisco N1k plugin

This patch creates an initial network when using the Cisco n1k plugin,
as it fails otherwise.

Change-Id: Ieceac0e2518bf5ca4cd808f6719b73aad0db903b
Closes-Bug: 1399389
This commit is contained in:
Rob 2014-12-04 20:32:22 +00:00 committed by Rob Cresswell
parent 116f9f826e
commit d06a6d9d8b
2 changed files with 9 additions and 0 deletions

View File

@ -534,6 +534,11 @@ function create_neutron_initial_network {
TENANT_ID=$(openstack project list | grep " demo " | get_field 1)
die_if_not_set $LINENO TENANT_ID "Failure retrieving TENANT_ID for demo"
# Allow drivers that need to create an initial network to do so here
if type -p neutron_plugin_create_initial_network_profile > /dev/null; then
neutron_plugin_create_initial_network_profile $PHYSICAL_NETWORK
fi
if is_provider_network; then
die_if_not_set $LINENO PHYSICAL_NETWORK "You must specify the PHYSICAL_NETWORK"
die_if_not_set $LINENO PROVIDER_NETWORK_TYPE "You must specifiy the PROVIDER_NETWORK_TYPE"

View File

@ -144,6 +144,10 @@ function neutron_plugin_configure_service {
fi
}
function neutron_plugin_create_initial_network_profile {
neutron cisco-network-profile-create default_network_profile vlan --segment_range 1-3000 --physical_network "$1"
}
function neutron_plugin_setup_interface_driver {
local conf_file=$1
iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver