summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArvind Somya <asomya@cisco.com>2017-06-09 14:25:11 -0400
committerArvind Somya <asomya@cisco.com>2017-06-14 11:36:13 -0400
commit916c46f8842836f98545b202a49af058d763d45e (patch)
tree36019c964ad88685b5acae664fad6253a72dee76
parente27ec5a03b20022a66c994c0ee89ef7023cc5c29 (diff)
Fixing devstack issues
This patch fixes two devstack issues with the ASR1k plugin: - Incorrect config file paths - Implement the NEUTRON_CREATE_INITIAL_NETWORKS flag Change-Id: I1d6e73026809da76fa6ed8126ba4146176ee97cd
Notes
Notes (review): Code-Review+2: Bob Melander <bob.melander@gmail.com> Code-Review+2: Shweta P <shpadubi@cisco.com> Workflow+1: Shweta P <shpadubi@cisco.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Thu, 15 Jun 2017 20:24:34 +0000 Reviewed-on: https://review.openstack.org/474254 Project: openstack/networking-cisco Branch: refs/heads/master
-rw-r--r--devstack/csr1kv/cisco_neutron2
-rw-r--r--devstack/csr1kv/cisco_router27
2 files changed, 19 insertions, 10 deletions
diff --git a/devstack/csr1kv/cisco_neutron b/devstack/csr1kv/cisco_neutron
index 7ccc0c9..fe102cb 100644
--- a/devstack/csr1kv/cisco_neutron
+++ b/devstack/csr1kv/cisco_neutron
@@ -189,7 +189,7 @@ function setup_for_csr1kv {
189} 189}
190 190
191function net_create_neutron_initial_network { 191function net_create_neutron_initial_network {
192 if [[ "$Q_L3_ENABLED" == "True" ]]; then 192 if [ "$Q_L3_ENABLED" == "True" && $NEUTRON_CREATE_INITIAL_NETWORK = "True" ]; then
193 # Create a router, and add the private subnet as one of its interfaces 193 # Create a router, and add the private subnet as one of its interfaces
194 if [[ "$Q_L3_ROUTER_PER_TENANT" == "True" ]]; then 194 if [[ "$Q_L3_ROUTER_PER_TENANT" == "True" ]]; then
195 # create a tenant-owned router. 195 # create a tenant-owned router.
diff --git a/devstack/csr1kv/cisco_router b/devstack/csr1kv/cisco_router
index f1a58c8..1d9264d 100644
--- a/devstack/csr1kv/cisco_router
+++ b/devstack/csr1kv/cisco_router
@@ -13,8 +13,11 @@ CISCO_DEVMGR_PLUGIN=networking_cisco.plugins.cisco.service_plugins.cisco_device_
13CISCO_ROUTER_PLUGIN_CONF_FILE=cisco_router_plugin.ini 13CISCO_ROUTER_PLUGIN_CONF_FILE=cisco_router_plugin.ini
14CISCO_DEVMGR_PLUGIN_CONF_FILE=cisco_device_manager_plugin.ini 14CISCO_DEVMGR_PLUGIN_CONF_FILE=cisco_device_manager_plugin.ini
15 15
16PLUGIN_CONFIG_DIR=$NEUTRON_CONF_DIR/plugins/cisco 16NET_CISCO_SOURCE_CONF_DIR=etc/neutron/plugins/cisco
17NET_CISCO_CONF_DIR=$DIR_CISCO/etc/neutron/plugins/cisco 17NET_CISCO_PLUGIN_DIR=/plugins/cisco
18PLUGIN_CONFIG_DIR=$NEUTRON_CONF_DIR$NET_CISCO_PLUGIN_DIR
19NET_CISCO_CONF_DIR=$DIR_CISCO$PLUGIN_CONFIG_DIR
20
18 21
19function neutron_cisco_router_configure_common() { 22function neutron_cisco_router_configure_common() {
20 Q_L3_ENABLED=True 23 Q_L3_ENABLED=True
@@ -27,11 +30,17 @@ function neutron_cisco_router_configure_common() {
27 30
28 mkdir -p $PLUGIN_CONFIG_DIR 31 mkdir -p $PLUGIN_CONFIG_DIR
29 32
30 cp $NET_CISCO_CONF_DIR/$CISCO_ROUTER_PLUGIN_CONF_FILE $PLUGIN_CONFIG_DIR/ 33 cp $NET_CISCO_SOURCE_CONF_DIR/$CISCO_ROUTER_PLUGIN_CONF_FILE $PLUGIN_CONFIG_DIR/
31 cp $NET_CISCO_CONF_DIR/$CISCO_DEVMGR_PLUGIN_CONF_FILE $PLUGIN_CONFIG_DIR/ 34 cp $NET_CISCO_SOURCE_CONF_DIR/$CISCO_DEVMGR_PLUGIN_CONF_FILE $PLUGIN_CONFIG_DIR/
32 35
33 Q_CISCO_ROUTER_PLUGIN_CONF_FILE=$PLUGIN_CONFIG_DIR/$CISCO_ROUTER_PLUGIN_CONF_FILE 36 NEUTRON_VERSION=$(pip show neutron | grep Version| egrep -o '[0-9]+' | head -1)
34 Q_CISCO_DEVMGR_PLUGIN_CONF_FILE=$PLUGIN_CONFIG_DIR/$CISCO_DEVMGR_PLUGIN_CONF_FILE 37 if [[ NEUTRON_VERSION -ge 10 ]]; then
38 Q_CISCO_ROUTER_PLUGIN_CONF_FILE=$NET_CISCO_PLUGIN_DIR/$CISCO_ROUTER_PLUGIN_CONF_FILE
39 Q_CISCO_DEVMGR_PLUGIN_CONF_FILE=$NET_CISCO_PLUGIN_DIR/$CISCO_DEVMGR_PLUGIN_CONF_FILE
40 else
41 Q_CISCO_ROUTER_PLUGIN_CONF_FILE=$PLUGIN_CONFIG_DIR/$CISCO_ROUTER_PLUGIN_CONF_FILE
42 Q_CISCO_DEVMGR_PLUGIN_CONF_FILE=$PLUGIN_CONFIG_DIR/$CISCO_DEVMGR_PLUGIN_CONF_FILE
43 fi
35 44
36 Q_PLUGIN_EXTRA_CONF_FILES=(${Q_PLUGIN_EXTRA_CONF_FILES[@]} $Q_CISCO_ROUTER_PLUGIN_CONF_FILE) 45 Q_PLUGIN_EXTRA_CONF_FILES=(${Q_PLUGIN_EXTRA_CONF_FILES[@]} $Q_CISCO_ROUTER_PLUGIN_CONF_FILE)
37 Q_PLUGIN_EXTRA_CONF_FILES=(${Q_PLUGIN_EXTRA_CONF_FILES[@]} $Q_CISCO_DEVMGR_PLUGIN_CONF_FILE) 46 Q_PLUGIN_EXTRA_CONF_FILES=(${Q_PLUGIN_EXTRA_CONF_FILES[@]} $Q_CISCO_DEVMGR_PLUGIN_CONF_FILE)
@@ -44,7 +53,7 @@ function neutron_cisco_router_configure_common() {
44 53
45 _patch_neutron_legacy 54 _patch_neutron_legacy
46 55
47 iniset $Q_CISCO_ROUTER_PLUGIN_CONF_FILE routing default_router_type $Q_CISCO_DEFAULT_ROUTER_TYPE 56 iniset $NEUTRON_CONF_DIR$Q_CISCO_ROUTER_PLUGIN_CONF_FILE routing default_router_type $Q_CISCO_DEFAULT_ROUTER_TYPE
48 57
49 } 58 }
50 59
@@ -61,13 +70,13 @@ function _inject_deployer_config() {
61 ROUTER_INJECT_FILE=$TOP_DIR/cisco_router_plugin.inject 70 ROUTER_INJECT_FILE=$TOP_DIR/cisco_router_plugin.inject
62 # inject any deployer provided configurations 71 # inject any deployer provided configurations
63 if [[ -f $ROUTER_INJECT_FILE ]]; then 72 if [[ -f $ROUTER_INJECT_FILE ]]; then
64 cat $ROUTER_INJECT_FILE >> $Q_CISCO_ROUTER_PLUGIN_CONF_FILE 73 cat $ROUTER_INJECT_FILE >> $NEUTRON_CONF_DIR$Q_CISCO_ROUTER_PLUGIN_CONF_FILE
65 fi 74 fi
66 75
67 # Inject device manager configs 76 # Inject device manager configs
68 DEVMGR_INJECT_FILE=$TOP_DIR/cisco_device_manager_plugin.inject 77 DEVMGR_INJECT_FILE=$TOP_DIR/cisco_device_manager_plugin.inject
69 if [[ -f $DEVMGR_INJECT_FILE ]]; then 78 if [[ -f $DEVMGR_INJECT_FILE ]]; then
70 cat $DEVMGR_INJECT_FILE >> $Q_CISCO_DEVMGR_PLUGIN_CONF_FILE 79 cat $DEVMGR_INJECT_FILE >> $NEUTRON_CONF_DIR$Q_CISCO_DEVMGR_PLUGIN_CONF_FILE
71 fi 80 fi
72} 81}
73 82