blob: cae8882ed76ccc7a36c50db5cb729316080c2798 [file] [log] [blame]
Isaku Yamahata0dd34df2012-12-28 13:15:31 +09001# Quantum Big Switch/FloodLight plugin
2# ------------------------------------
3
4# Save trace setting
Dean Troyer8d55be32013-02-07 17:16:35 -06005MY_XTRACE=$(set +o | grep xtrace)
Isaku Yamahata0dd34df2012-12-28 13:15:31 +09006set +o xtrace
7
8source $TOP_DIR/lib/quantum_plugins/ovs_base
9source $TOP_DIR/lib/quantum_thirdparty/bigswitch_floodlight # for third party service specific configuration values
10
11function quantum_plugin_create_nova_conf() {
Gary Kotton4d8c5b02013-03-07 12:54:34 +000012 NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"}
Isaku Yamahata0dd34df2012-12-28 13:15:31 +090013}
14
15function quantum_plugin_install_agent_packages() {
16 _quantum_ovs_base_install_agent_packages
17}
18
19function quantum_plugin_configure_common() {
20 Q_PLUGIN_CONF_PATH=etc/quantum/plugins/bigswitch
21 Q_PLUGIN_CONF_FILENAME=restproxy.ini
22 Q_DB_NAME="restproxy_quantum"
23 Q_PLUGIN_CLASS="quantum.plugins.bigswitch.plugin.QuantumRestProxyV2"
24 BS_FL_CONTROLLERS_PORT=${BS_FL_CONTROLLERS_PORT:-localhost:80}
25 BS_FL_CONTROLLER_TIMEOUT=${BS_FL_CONTROLLER_TIMEOUT:-10}
26}
27
28function quantum_plugin_configure_debug_command() {
29 _quantum_ovs_base_configure_debug_command
30}
31
32function quantum_plugin_configure_dhcp_agent() {
33 :
34}
35
36function quantum_plugin_configure_l3_agent() {
37 _quantum_ovs_base_configure_l3_agent
38}
39
40function quantum_plugin_configure_plugin_agent() {
41 :
42}
43
44function quantum_plugin_configure_service() {
Gary Kottond42634f2013-06-24 09:26:55 +000045 iniset /$Q_PLUGIN_CONF_FILE restproxy servers $BS_FL_CONTROLLERS_PORT
46 iniset /$Q_PLUGIN_CONF_FILE restproxy servertimeout $BS_FL_CONTROLLER_TIMEOUT
Kevin Benton14625c22013-06-18 15:58:53 -070047 if [ "$BS_FL_VIF_DRIVER" = "ivs" ]
48 then
49 iniset /$Q_PLUGIN_CONF_FILE nova vif_type ivs
50 fi
Isaku Yamahata0dd34df2012-12-28 13:15:31 +090051}
52
53function quantum_plugin_setup_interface_driver() {
54 local conf_file=$1
Kevin Benton14625c22013-06-18 15:58:53 -070055 if [ "$BS_FL_VIF_DRIVER" = "ivs" ]
56 then
57 iniset $conf_file DEFAULT interface_driver quantum.agent.linux.interface.IVSInterfaceDriver
58 else
59 iniset $conf_file DEFAULT interface_driver quantum.agent.linux.interface.OVSInterfaceDriver
60 fi
Isaku Yamahata0dd34df2012-12-28 13:15:31 +090061}
62
Kevin Benton14625c22013-06-18 15:58:53 -070063
Akihiro MOTOKI3452f8e2013-03-21 14:11:27 +090064function has_quantum_plugin_security_group() {
65 # 1 means False here
66 return 1
67}
68
armando-migliaccio7c025fe2013-05-08 11:33:07 -070069function quantum_plugin_check_adv_test_requirements() {
70 is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
71}
72
Isaku Yamahata0dd34df2012-12-28 13:15:31 +090073# Restore xtrace
Dean Troyer8d55be32013-02-07 17:16:35 -060074$MY_XTRACE