Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 1 | # Neutron Cisco plugin |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 2 | # --------------------------- |
| 3 | |
| 4 | # Save trace setting |
| 5 | MY_XTRACE=$(set +o | grep xtrace) |
| 6 | set +o xtrace |
| 7 | |
| 8 | # Scecify the VSM parameters |
| 9 | Q_CISCO_PLUGIN_VSM_IP=${Q_CISCO_PLUGIN_VSM_IP:-} |
| 10 | # Specify the VSM username |
| 11 | Q_CISCO_PLUGIN_VSM_USERNAME=${Q_CISCO_PLUGIN_VSM_USERNAME:-admin} |
| 12 | # Specify the VSM passward for above username |
| 13 | Q_CISCO_PLUGIN_VSM_PASSWORD=${Q_CISCO_PLUGIN_VSM_PASSWORD:-} |
| 14 | # Specify the uVEM integration bridge name |
| 15 | Q_CISCO_PLUGIN_INTEGRATION_BRIDGE=${Q_CISCO_PLUGIN_INTEGRATION_BRIDGE:-br-int} |
| 16 | # Specify if tunneling is enabled |
| 17 | Q_CISCO_PLUGIN_ENABLE_TUNNELING=${Q_CISCO_PLUGIN_ENABLE_TUNNELING:-True} |
| 18 | # Specify the VXLAN range |
| 19 | Q_CISCO_PLUGIN_VXLAN_ID_RANGES=${Q_CISCO_PLUGIN_VXLAN_ID_RANGES:-5000:10000} |
| 20 | # Specify the VLAN range |
| 21 | Q_CISCO_PLUGIN_VLAN_RANGES=${Q_CISCO_PLUGIN_VLAN_RANGES:-vlan:1:4094} |
| 22 | |
| 23 | # Specify ncclient package information |
| 24 | NCCLIENT_DIR=$DEST/ncclient |
| 25 | NCCLIENT_VERSION=${NCCLIENT_VERSION:-0.3.1} |
| 26 | NCCLIENT_REPO=${NCCLIENT_REPO:-${GIT_BASE}/CiscoSystems/ncclient.git} |
| 27 | NCCLIENT_BRANCH=${NCCLIENT_BRANCH:-master} |
| 28 | |
| 29 | # This routine put a prefix on an existing function name |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 30 | function _prefix_function { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 31 | declare -F $1 > /dev/null || die "$1 doesn't exist" |
| 32 | eval "$(echo "${2}_${1}()"; declare -f ${1} | tail -n +2)" |
| 33 | } |
| 34 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 35 | function _has_ovs_subplugin { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 36 | local subplugin |
| 37 | for subplugin in ${Q_CISCO_PLUGIN_SUBPLUGINS[@]}; do |
| 38 | if [[ "$subplugin" == "openvswitch" ]]; then |
| 39 | return 0 |
| 40 | fi |
| 41 | done |
| 42 | return 1 |
| 43 | } |
| 44 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 45 | function _has_nexus_subplugin { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 46 | local subplugin |
| 47 | for subplugin in ${Q_CISCO_PLUGIN_SUBPLUGINS[@]}; do |
| 48 | if [[ "$subplugin" == "nexus" ]]; then |
| 49 | return 0 |
| 50 | fi |
| 51 | done |
| 52 | return 1 |
| 53 | } |
| 54 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 55 | function _has_n1kv_subplugin { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 56 | local subplugin |
| 57 | for subplugin in ${Q_CISCO_PLUGIN_SUBPLUGINS[@]}; do |
| 58 | if [[ "$subplugin" == "n1kv" ]]; then |
| 59 | return 0 |
| 60 | fi |
| 61 | done |
| 62 | return 1 |
| 63 | } |
| 64 | |
| 65 | # This routine populates the cisco config file with the information for |
| 66 | # a particular nexus switch |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 67 | function _config_switch { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 68 | local cisco_cfg_file=$1 |
| 69 | local switch_ip=$2 |
| 70 | local username=$3 |
| 71 | local password=$4 |
| 72 | local ssh_port=$5 |
| 73 | shift 5 |
| 74 | |
| 75 | local section="NEXUS_SWITCH:$switch_ip" |
| 76 | iniset $cisco_cfg_file $section username $username |
| 77 | iniset $cisco_cfg_file $section password $password |
| 78 | iniset $cisco_cfg_file $section ssh_port $ssh_port |
| 79 | |
| 80 | while [[ ${#@} != 0 ]]; do |
| 81 | iniset $cisco_cfg_file $section $1 $2 |
| 82 | shift 2 |
| 83 | done |
| 84 | } |
| 85 | |
| 86 | # Prefix openvswitch plugin routines with "ovs" in order to differentiate from |
| 87 | # cisco plugin routines. This means, ovs plugin routines will coexist with cisco |
| 88 | # plugin routines in this script. |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 89 | source $TOP_DIR/lib/neutron_plugins/openvswitch |
| 90 | _prefix_function neutron_plugin_create_nova_conf ovs |
| 91 | _prefix_function neutron_plugin_install_agent_packages ovs |
| 92 | _prefix_function neutron_plugin_configure_common ovs |
| 93 | _prefix_function neutron_plugin_configure_debug_command ovs |
| 94 | _prefix_function neutron_plugin_configure_dhcp_agent ovs |
| 95 | _prefix_function neutron_plugin_configure_l3_agent ovs |
| 96 | _prefix_function neutron_plugin_configure_plugin_agent ovs |
| 97 | _prefix_function neutron_plugin_configure_service ovs |
| 98 | _prefix_function neutron_plugin_setup_interface_driver ovs |
| 99 | _prefix_function has_neutron_plugin_security_group ovs |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 100 | |
| 101 | # Check the version of the installed ncclient package |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 102 | function check_ncclient_version { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 103 | python << EOF |
| 104 | version = '$NCCLIENT_VERSION' |
| 105 | import sys |
| 106 | try: |
| 107 | import pkg_resources |
| 108 | import ncclient |
| 109 | module_version = pkg_resources.get_distribution('ncclient').version |
| 110 | if version != module_version: |
| 111 | sys.exit(1) |
| 112 | except: |
| 113 | sys.exit(1) |
| 114 | EOF |
| 115 | } |
| 116 | |
| 117 | # Install the ncclient package |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 118 | function install_ncclient { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 119 | git_clone $NCCLIENT_REPO $NCCLIENT_DIR $NCCLIENT_BRANCH |
| 120 | (cd $NCCLIENT_DIR; sudo python setup.py install) |
| 121 | } |
| 122 | |
| 123 | # Check if the required version of ncclient has been installed |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 124 | function is_ncclient_installed { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 125 | # Check if the Cisco ncclient repository exists |
| 126 | if [[ -d $NCCLIENT_DIR ]]; then |
| 127 | remotes=$(cd $NCCLIENT_DIR; git remote -v | grep fetch | awk '{ print $2}') |
| 128 | for remote in $remotes; do |
| 129 | if [[ $remote == $NCCLIENT_REPO ]]; then |
| 130 | break; |
| 131 | fi |
| 132 | done |
| 133 | if [[ $remote != $NCCLIENT_REPO ]]; then |
| 134 | return 1 |
| 135 | fi |
| 136 | else |
| 137 | return 1 |
| 138 | fi |
| 139 | |
| 140 | # Check if the ncclient is installed with the right version |
| 141 | if ! check_ncclient_version; then |
| 142 | return 1 |
| 143 | fi |
| 144 | return 0 |
| 145 | } |
| 146 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 147 | function has_neutron_plugin_security_group { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 148 | if _has_ovs_subplugin; then |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 149 | ovs_has_neutron_plugin_security_group |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 150 | else |
| 151 | return 1 |
| 152 | fi |
| 153 | } |
| 154 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 155 | function is_neutron_ovs_base_plugin { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 156 | # Cisco uses OVS if openvswitch subplugin is deployed |
| 157 | _has_ovs_subplugin |
| 158 | return |
| 159 | } |
| 160 | |
| 161 | # populate required nova configuration parameters |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 162 | function neutron_plugin_create_nova_conf { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 163 | if _has_ovs_subplugin; then |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 164 | ovs_neutron_plugin_create_nova_conf |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 165 | else |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 166 | _neutron_ovs_base_configure_nova_vif_driver |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 167 | fi |
| 168 | } |
| 169 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 170 | function neutron_plugin_install_agent_packages { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 171 | # Cisco plugin uses openvswitch to operate in one of its configurations |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 172 | ovs_neutron_plugin_install_agent_packages |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 173 | } |
| 174 | |
| 175 | # Configure common parameters |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 176 | function neutron_plugin_configure_common { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 177 | # setup default subplugins |
| 178 | if [ ! -v Q_CISCO_PLUGIN_SUBPLUGINS ]; then |
| 179 | declare -ga Q_CISCO_PLUGIN_SUBPLUGINS |
| 180 | Q_CISCO_PLUGIN_SUBPLUGINS=(openvswitch nexus) |
| 181 | fi |
| 182 | if _has_ovs_subplugin; then |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 183 | ovs_neutron_plugin_configure_common |
| 184 | Q_PLUGIN_EXTRA_CONF_PATH=etc/neutron/plugins/cisco |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 185 | Q_PLUGIN_EXTRA_CONF_FILES=(cisco_plugins.ini) |
| 186 | else |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 187 | Q_PLUGIN_CONF_PATH=etc/neutron/plugins/cisco |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 188 | Q_PLUGIN_CONF_FILENAME=cisco_plugins.ini |
| 189 | fi |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 190 | Q_PLUGIN_CLASS="neutron.plugins.cisco.network_plugin.PluginV2" |
| 191 | Q_DB_NAME=cisco_neutron |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 192 | } |
| 193 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 194 | function neutron_plugin_configure_debug_command { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 195 | if _has_ovs_subplugin; then |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 196 | ovs_neutron_plugin_configure_debug_command |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 197 | fi |
| 198 | } |
| 199 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 200 | function neutron_plugin_configure_dhcp_agent { |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 201 | iniset $Q_DHCP_CONF_FILE DEFAULT dhcp_agent_manager neutron.agent.dhcp_agent.DhcpAgentWithStateReport |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 202 | } |
| 203 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 204 | function neutron_plugin_configure_l3_agent { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 205 | if _has_ovs_subplugin; then |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 206 | ovs_neutron_plugin_configure_l3_agent |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 207 | fi |
| 208 | } |
| 209 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 210 | function _configure_nexus_subplugin { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 211 | local cisco_cfg_file=$1 |
| 212 | |
| 213 | # Install a known compatible ncclient from the Cisco repository if necessary |
| 214 | if ! is_ncclient_installed; then |
| 215 | # Preserve the two global variables |
| 216 | local offline=$OFFLINE |
| 217 | local reclone=$RECLONE |
| 218 | # Change their values to allow installation |
| 219 | OFFLINE=False |
| 220 | RECLONE=yes |
| 221 | install_ncclient |
| 222 | # Restore their values |
| 223 | OFFLINE=$offline |
| 224 | RECLONE=$reclone |
| 225 | fi |
| 226 | |
| 227 | # Setup default nexus switch information |
| 228 | if [ ! -v Q_CISCO_PLUGIN_SWITCH_INFO ]; then |
| 229 | declare -A Q_CISCO_PLUGIN_SWITCH_INFO |
| 230 | HOST_NAME=$(hostname) |
| 231 | Q_CISCO_PLUGIN_SWITCH_INFO=([1.1.1.1]=stack:stack:22:${HOST_NAME}:1/10) |
| 232 | else |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 233 | iniset $cisco_cfg_file CISCO nexus_driver neutron.plugins.cisco.nexus.cisco_nexus_network_driver_v2.CiscoNEXUSDriver |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 234 | fi |
| 235 | |
| 236 | # Setup the switch configurations |
| 237 | local nswitch |
| 238 | local sw_info |
| 239 | local segment |
| 240 | local sw_info_array |
| 241 | declare -i count=0 |
| 242 | for nswitch in ${!Q_CISCO_PLUGIN_SWITCH_INFO[@]}; do |
| 243 | sw_info=${Q_CISCO_PLUGIN_SWITCH_INFO[$nswitch]} |
| 244 | sw_info_array=${sw_info//:/ } |
| 245 | sw_info_array=( $sw_info_array ) |
| 246 | count=${#sw_info_array[@]} |
| 247 | if [[ $count < 5 || $(( ($count-3) % 2 )) != 0 ]]; then |
| 248 | die $LINENO "Incorrect switch configuration: ${Q_CISCO_PLUGIN_SWITCH_INFO[$nswitch]}" |
| 249 | fi |
| 250 | _config_switch $cisco_cfg_file $nswitch ${sw_info_array[@]} |
| 251 | done |
| 252 | } |
| 253 | |
| 254 | # Configure n1kv plugin |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 255 | function _configure_n1kv_subplugin { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 256 | local cisco_cfg_file=$1 |
| 257 | |
| 258 | # populate the cisco plugin cfg file with the VSM information |
| 259 | echo "Configuring n1kv in $cisco_cfg_file-- $Q_CISCO_PLUGIN_VSM_IP $Q_CISCO_PLUGIN_VSM_USERNAME $Q_CISCO_PLUGIN_VSM_PASSWORD" |
| 260 | iniset $cisco_cfg_file N1KV:$Q_CISCO_PLUGIN_VSM_IP username $Q_CISCO_PLUGIN_VSM_USERNAME |
| 261 | iniset $cisco_cfg_file N1KV:$Q_CISCO_PLUGIN_VSM_IP password $Q_CISCO_PLUGIN_VSM_PASSWORD |
| 262 | |
| 263 | iniset $cisco_cfg_file CISCO_N1K integration_bridge $Q_CISCO_PLUGIN_INTEGRATION_BRIDGE |
| 264 | iniset $cisco_cfg_file CISCO_N1K enable_tunneling $Q_CISCO_PLUGIN_ENABLE_TUNNELING |
| 265 | iniset $cisco_cfg_file CISCO_N1K vxlan_id_ranges $Q_CISCO_PLUGIN_VXLAN_ID_RANGES |
| 266 | iniset $cisco_cfg_file CISCO_N1K network_vlan_ranges $Q_CISCO_PLUGIN_VLAN_RANGES |
| 267 | |
| 268 | # Setup the integration bridge by calling the ovs_base |
| 269 | OVS_BRIDGE=$Q_CISCO_PLUGIN_INTEGRATION_BRIDGE |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 270 | _neutron_ovs_base_setup_bridge $OVS_BRIDGE |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 271 | } |
| 272 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 273 | function neutron_plugin_configure_plugin_agent { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 274 | if _has_ovs_subplugin; then |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 275 | ovs_neutron_plugin_configure_plugin_agent |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 276 | fi |
| 277 | } |
| 278 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 279 | function neutron_plugin_configure_service { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 280 | local subplugin |
| 281 | local cisco_cfg_file |
| 282 | |
| 283 | if _has_ovs_subplugin; then |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 284 | ovs_neutron_plugin_configure_service |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 285 | cisco_cfg_file=/${Q_PLUGIN_EXTRA_CONF_FILES[0]} |
| 286 | else |
| 287 | cisco_cfg_file=/$Q_PLUGIN_CONF_FILE |
| 288 | fi |
| 289 | |
| 290 | # Setup the [CISCO_PLUGINS] section |
| 291 | if [[ ${#Q_CISCO_PLUGIN_SUBPLUGINS[@]} > 2 ]]; then |
| 292 | die $LINENO "At most two subplugins are supported." |
| 293 | fi |
| 294 | |
| 295 | if _has_ovs_subplugin && _has_n1kv_subplugin; then |
| 296 | die $LINENO "OVS subplugin and n1kv subplugin cannot coexist" |
| 297 | fi |
| 298 | |
| 299 | # Setup the subplugins |
| 300 | inicomment $cisco_cfg_file CISCO_PLUGINS nexus_plugin |
| 301 | inicomment $cisco_cfg_file CISCO_PLUGINS vswitch_plugin |
| 302 | inicomment $cisco_cfg_file CISCO_TEST host |
| 303 | for subplugin in ${Q_CISCO_PLUGIN_SUBPLUGINS[@]}; do |
| 304 | case $subplugin in |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 305 | nexus) iniset $cisco_cfg_file CISCO_PLUGINS nexus_plugin neutron.plugins.cisco.nexus.cisco_nexus_plugin_v2.NexusPlugin;; |
| 306 | openvswitch) iniset $cisco_cfg_file CISCO_PLUGINS vswitch_plugin neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2;; |
| 307 | n1kv) iniset $cisco_cfg_file CISCO_PLUGINS vswitch_plugin neutron.plugins.cisco.n1kv.n1kv_neutron_plugin.N1kvNeutronPluginV2;; |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 308 | *) die $LINENO "Unsupported cisco subplugin: $subplugin";; |
| 309 | esac |
| 310 | done |
| 311 | |
| 312 | if _has_nexus_subplugin; then |
| 313 | _configure_nexus_subplugin $cisco_cfg_file |
| 314 | fi |
| 315 | |
| 316 | if _has_n1kv_subplugin; then |
| 317 | _configure_n1kv_subplugin $cisco_cfg_file |
| 318 | fi |
| 319 | } |
| 320 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 321 | function neutron_plugin_setup_interface_driver { |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 322 | local conf_file=$1 |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 323 | iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver |
Baodong (Robert) Li | 901419d | 2013-06-10 08:39:26 -0700 | [diff] [blame] | 324 | } |
| 325 | |
| 326 | # Restore xtrace |
| 327 | $MY_XTRACE |