diff --git a/devstack/lib/l2_agent b/devstack/lib/l2_agent new file mode 100644 index 00000000000..b70efb1d4a4 --- /dev/null +++ b/devstack/lib/l2_agent @@ -0,0 +1,13 @@ +function plugin_agent_add_l2_agent_extension { + local l2_agent_extension=$1 + if [[ -z "$L2_AGENT_EXTENSIONS" ]]; then + L2_AGENT_EXTENSIONS=$l2_agent_extension + elif [[ ! ,${L2_AGENT_EXTENSIONS}, =~ ,${l2_agent_extension}, ]]; then + L2_AGENT_EXTENSIONS+=",$l2_agent_extension" + fi +} + + +function configure_l2_agent { + iniset /$Q_PLUGIN_CONF_FILE agent extensions "$L2_AGENT_EXTENSIONS" +} diff --git a/devstack/lib/ml2 b/devstack/lib/ml2 new file mode 100644 index 00000000000..2275c11c072 --- /dev/null +++ b/devstack/lib/ml2 @@ -0,0 +1,13 @@ +function enable_ml2_extension_driver { + local extension_driver=$1 + if [[ -z "$Q_ML2_PLUGIN_EXT_DRIVERS" ]]; then + Q_ML2_PLUGIN_EXT_DRIVERS=$extension_driver + elif [[ ! ,${Q_ML2_PLUGIN_EXT_DRIVERS}, =~ ,${extension_driver}, ]]; then + Q_ML2_PLUGIN_EXT_DRIVERS+=",$extension_driver" + fi +} + + +function configure_qos_ml2 { + enable_ml2_extension_driver "qos" +} diff --git a/devstack/lib/qos b/devstack/lib/qos new file mode 100644 index 00000000000..e9270c04321 --- /dev/null +++ b/devstack/lib/qos @@ -0,0 +1,20 @@ +function configure_qos_service_plugin { + _neutron_service_plugin_class_add "qos" +} + + +function configure_qos_core_plugin { + configure_qos_$Q_PLUGIN +} + + +function configure_qos_l2_agent { + plugin_agent_add_l2_agent_extension "qos" +} + + +function configure_qos { + configure_qos_service_plugin + configure_qos_core_plugin + configure_qos_l2_agent +} diff --git a/devstack/plugin.sh b/devstack/plugin.sh new file mode 100644 index 00000000000..5b245490d20 --- /dev/null +++ b/devstack/plugin.sh @@ -0,0 +1,18 @@ +LIBDIR=$DEST/neutron/devstack/lib + +source $LIBDIR/l2_agent +source $LIBDIR/ml2 +source $LIBDIR/qos + + +if [[ "$1" == "stack" && "$2" == "install" ]]; then + if is_service_enabled q-qos; then + configure_qos + fi +fi + +if [[ "$1" == "stack" && "$2" == "post-config" ]]; then + if is_service_enabled q-agt; then + configure_l2_agent + fi +fi diff --git a/devstack/settings b/devstack/settings new file mode 100644 index 00000000000..976317cd5ca --- /dev/null +++ b/devstack/settings @@ -0,0 +1,3 @@ +L2_AGENT_EXTENSIONS=${L2_AGENT_EXTENSIONS:-} + +enable_service q-qos diff --git a/neutron/tests/contrib/gate_hook.sh b/neutron/tests/contrib/gate_hook.sh index 57dbc4a6319..99d0ccf2f9d 100644 --- a/neutron/tests/contrib/gate_hook.sh +++ b/neutron/tests/contrib/gate_hook.sh @@ -39,9 +39,8 @@ EOF export DEVSTACK_LOCAL_CONFIG+=" enable_plugin neutron-vpnaas git://git.openstack.org/openstack/neutron-vpnaas +enable_plugin neutron git://git.openstack.org/openstack/neutron " - export DEVSTACK_LOCAL_CONFIG+="DISABLE_NETWORK_API_EXTENSIONS=qos -" $BASE/new/devstack-gate/devstack-vm-gate.sh fi