Browse Source

Merge "Fixing devstack issues"

tags/5.1.0
Jenkins 1 year ago
parent
commit
512c8d0721
2 changed files with 19 additions and 10 deletions
  1. 1
    1
      devstack/csr1kv/cisco_neutron
  2. 18
    9
      devstack/csr1kv/cisco_router

+ 1
- 1
devstack/csr1kv/cisco_neutron View File

@@ -189,7 +189,7 @@ function setup_for_csr1kv {
189 189
 }
190 190
 
191 191
 function 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 193
         # Create a router, and add the private subnet as one of its interfaces
194 194
         if [[ "$Q_L3_ROUTER_PER_TENANT" == "True" ]]; then
195 195
             # create a tenant-owned router.

+ 18
- 9
devstack/csr1kv/cisco_router View File

@@ -13,8 +13,11 @@ CISCO_DEVMGR_PLUGIN=networking_cisco.plugins.cisco.service_plugins.cisco_device_
13 13
 CISCO_ROUTER_PLUGIN_CONF_FILE=cisco_router_plugin.ini
14 14
 CISCO_DEVMGR_PLUGIN_CONF_FILE=cisco_device_manager_plugin.ini
15 15
 
16
-PLUGIN_CONFIG_DIR=$NEUTRON_CONF_DIR/plugins/cisco
17
-NET_CISCO_CONF_DIR=$DIR_CISCO/etc/neutron/plugins/cisco
16
+NET_CISCO_SOURCE_CONF_DIR=etc/neutron/plugins/cisco
17
+NET_CISCO_PLUGIN_DIR=/plugins/cisco
18
+PLUGIN_CONFIG_DIR=$NEUTRON_CONF_DIR$NET_CISCO_PLUGIN_DIR
19
+NET_CISCO_CONF_DIR=$DIR_CISCO$PLUGIN_CONFIG_DIR
20
+
18 21
 
19 22
 function neutron_cisco_router_configure_common() {
20 23
     Q_L3_ENABLED=True
@@ -27,11 +30,17 @@ function neutron_cisco_router_configure_common() {
27 30
 
28 31
     mkdir -p $PLUGIN_CONFIG_DIR
29 32
 
30
-    cp $NET_CISCO_CONF_DIR/$CISCO_ROUTER_PLUGIN_CONF_FILE $PLUGIN_CONFIG_DIR/
31
-    cp $NET_CISCO_CONF_DIR/$CISCO_DEVMGR_PLUGIN_CONF_FILE $PLUGIN_CONFIG_DIR/
33
+    cp $NET_CISCO_SOURCE_CONF_DIR/$CISCO_ROUTER_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
34
-    Q_CISCO_DEVMGR_PLUGIN_CONF_FILE=$PLUGIN_CONFIG_DIR/$CISCO_DEVMGR_PLUGIN_CONF_FILE
36
+    NEUTRON_VERSION=$(pip show neutron | grep Version| egrep -o '[0-9]+' | head -1)
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 45
     Q_PLUGIN_EXTRA_CONF_FILES=(${Q_PLUGIN_EXTRA_CONF_FILES[@]} $Q_CISCO_ROUTER_PLUGIN_CONF_FILE)
37 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 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 70
     ROUTER_INJECT_FILE=$TOP_DIR/cisco_router_plugin.inject
62 71
     # inject any deployer provided configurations
63 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 74
     fi
66 75
 
67 76
     # Inject device manager configs
68 77
     DEVMGR_INJECT_FILE=$TOP_DIR/cisco_device_manager_plugin.inject
69 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 80
     fi
72 81
 }
73 82
 

Loading…
Cancel
Save