Added initial devstack plugin
For now it only supports q-qos service that is used to configure QoS service plugin. It also adds ability to enable l2 agent extensions. To check that it works, I am enabling QoS tests back for API job. Partially-Implements: blueprint quantum-qos-api Change-Id: I19e4fe0cf5ecc55397628017631c3ff6718ce36f
This commit is contained in:
parent
7b960af9b0
commit
01c0466d74
13
devstack/lib/l2_agent
Normal file
13
devstack/lib/l2_agent
Normal file
@ -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"
|
||||
}
|
13
devstack/lib/ml2
Normal file
13
devstack/lib/ml2
Normal file
@ -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"
|
||||
}
|
20
devstack/lib/qos
Normal file
20
devstack/lib/qos
Normal file
@ -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
|
||||
}
|
18
devstack/plugin.sh
Normal file
18
devstack/plugin.sh
Normal file
@ -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
|
3
devstack/settings
Normal file
3
devstack/settings
Normal file
@ -0,0 +1,3 @@
|
||||
L2_AGENT_EXTENSIONS=${L2_AGENT_EXTENSIONS:-}
|
||||
|
||||
enable_service q-qos
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user