blob: 0d711fe8b273c0b0c1efb24f737e65f9afebb585 [file] [log] [blame]
Sean Daguee263c822014-12-05 14:25:28 -05001#!/bin/bash
2#
Mark McClainb05c8762013-07-06 23:29:39 -04003# PLUMgrid Neutron Plugin
4# Edgar Magana emagana@plumgrid.com
5# ------------------------------------
6
7# Save trace settings
Dean Troyere3a91602014-03-28 12:40:56 -05008PG_XTRACE=$(set +o | grep xtrace)
Mark McClainb05c8762013-07-06 23:29:39 -04009set +o xtrace
10
Ian Wienandaee18c72014-02-21 15:35:08 +110011function neutron_plugin_create_nova_conf {
Aaron Rosen4540d002013-10-24 13:59:33 -070012 :
Mark McClainb05c8762013-07-06 23:29:39 -040013}
14
Ian Wienandaee18c72014-02-21 15:35:08 +110015function neutron_plugin_setup_interface_driver {
Mark McClainb05c8762013-07-06 23:29:39 -040016 :
17}
18
Ian Wienandaee18c72014-02-21 15:35:08 +110019function neutron_plugin_configure_common {
Mark McClainb05c8762013-07-06 23:29:39 -040020 Q_PLUGIN_CONF_PATH=etc/neutron/plugins/plumgrid
21 Q_PLUGIN_CONF_FILENAME=plumgrid.ini
Edgar Maganaf34424e2013-07-29 16:47:13 -070022 Q_PLUGIN_CLASS="neutron.plugins.plumgrid.plumgrid_plugin.plumgrid_plugin.NeutronPluginPLUMgridV2"
Edgar Maganaaeb85c12013-07-05 11:03:57 -070023 PLUMGRID_DIRECTOR_IP=${PLUMGRID_DIRECTOR_IP:-localhost}
24 PLUMGRID_DIRECTOR_PORT=${PLUMGRID_DIRECTOR_PORT:-7766}
Edgar Magana500a32f2013-12-02 14:27:31 -080025 PLUMGRID_ADMIN=${PLUMGRID_ADMIN:-username}
26 PLUMGRID_PASSWORD=${PLUMGRID_PASSWORD:-password}
27 PLUMGRID_TIMEOUT=${PLUMGRID_TIMEOUT:-70}
Edgar Magana41a4f272014-05-01 16:34:34 -070028 PLUMGRID_DRIVER=${PLUMGRID_DRIVER:-neutron.plugins.plumgrid.drivers.fake_plumlib.Plumlib}
Mark McClainb05c8762013-07-06 23:29:39 -040029}
30
Ian Wienandaee18c72014-02-21 15:35:08 +110031function neutron_plugin_configure_service {
Edgar Magana41a4f272014-05-01 16:34:34 -070032 iniset /$Q_PLUGIN_CONF_FILE plumgriddirector director_server $PLUMGRID_DIRECTOR_IP
33 iniset /$Q_PLUGIN_CONF_FILE plumgriddirector director_server_port $PLUMGRID_DIRECTOR_PORT
34 iniset /$Q_PLUGIN_CONF_FILE plumgriddirector username $PLUMGRID_ADMIN
35 iniset /$Q_PLUGIN_CONF_FILE plumgriddirector password $PLUMGRID_PASSWORD
36 iniset /$Q_PLUGIN_CONF_FILE plumgriddirector servertimeout $PLUMGRID_TIMEOUT
37 iniset /$Q_PLUGIN_CONF_FILE plumgriddirector driver $PLUMGRID_DRIVER
Mark McClainb05c8762013-07-06 23:29:39 -040038}
39
Ian Wienandaee18c72014-02-21 15:35:08 +110040function neutron_plugin_configure_debug_command {
Mark McClainb05c8762013-07-06 23:29:39 -040041 :
42}
43
Ian Wienandaee18c72014-02-21 15:35:08 +110044function is_neutron_ovs_base_plugin {
Edgar Maganaf34424e2013-07-29 16:47:13 -070045 # False
46 return 1
47}
48
Ian Wienandaee18c72014-02-21 15:35:08 +110049function has_neutron_plugin_security_group {
Fawad Khaliq242c0982014-07-15 17:51:44 -070050 # return 0 means enabled
51 return 0
Edgar Maganaf34424e2013-07-29 16:47:13 -070052}
53
Ian Wienandaee18c72014-02-21 15:35:08 +110054function neutron_plugin_check_adv_test_requirements {
Mark McClainb05c8762013-07-06 23:29:39 -040055 is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
56}
57# Restore xtrace
Dean Troyere3a91602014-03-28 12:40:56 -050058$PG_XTRACE