Skip to content

Commit 4764cff

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Create initial network when using Cisco N1k plugin"
2 parents 1631af8 + d06a6d9 commit 4764cff

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

lib/neutron

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,11 @@ function create_neutron_initial_network {
534534
TENANT_ID=$(openstack project list | grep " demo " | get_field 1)
535535
die_if_not_set $LINENO TENANT_ID "Failure retrieving TENANT_ID for demo"
536536

537+
# Allow drivers that need to create an initial network to do so here
538+
if type -p neutron_plugin_create_initial_network_profile > /dev/null; then
539+
neutron_plugin_create_initial_network_profile $PHYSICAL_NETWORK
540+
fi
541+
537542
if is_provider_network; then
538543
die_if_not_set $LINENO PHYSICAL_NETWORK "You must specify the PHYSICAL_NETWORK"
539544
die_if_not_set $LINENO PROVIDER_NETWORK_TYPE "You must specifiy the PROVIDER_NETWORK_TYPE"

lib/neutron_plugins/cisco

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ function neutron_plugin_configure_service {
144144
fi
145145
}
146146

147+
function neutron_plugin_create_initial_network_profile {
148+
neutron cisco-network-profile-create default_network_profile vlan --segment_range 1-3000 --physical_network "$1"
149+
}
150+
147151
function neutron_plugin_setup_interface_driver {
148152
local conf_file=$1
149153
iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver

0 commit comments

Comments
 (0)