From 33f404a5193c42460ccc9b680eb44acf6196d73c Mon Sep 17 00:00:00 2001 From: Kailun Qin Date: Tue, 5 Mar 2019 18:48:58 +0800 Subject: [PATCH] Devstack plugin for network-segment-range api This patch implements devstack plugin for network-segment-range api. The network-segment-range api service is based on network-segment-range spec [1]. [1] https://specs.openstack.org/openstack/neutron-specs/specs/stein/network-segment-range-management.html Co-authored-by: Allain Legacy Partially-implements: blueprint network-segment-range-management Change-Id: I09116a4323763db12917e03f354cf0ef25289fd0 --- devstack/lib/network_segment_range | 3 +++ devstack/plugin.sh | 4 ++++ neutron/tests/contrib/gate_hook.sh | 1 + neutron/tests/contrib/hooks/api_all_extensions | 1 + neutron/tests/contrib/hooks/network_segment_range | 1 + 5 files changed, 10 insertions(+) create mode 100644 devstack/lib/network_segment_range create mode 100644 neutron/tests/contrib/hooks/network_segment_range diff --git a/devstack/lib/network_segment_range b/devstack/lib/network_segment_range new file mode 100644 index 00000000000..e0cc4e62f0b --- /dev/null +++ b/devstack/lib/network_segment_range @@ -0,0 +1,3 @@ +function configure_network_segment_range { + neutron_service_plugin_class_add "network_segment_range" +} diff --git a/devstack/plugin.sh b/devstack/plugin.sh index d87a788f38a..bd9e93ea859 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -6,6 +6,7 @@ source $LIBDIR/l2_agent source $LIBDIR/l2_agent_sriovnicswitch source $LIBDIR/l3_agent source $LIBDIR/ml2 +source $LIBDIR/network_segment_range source $LIBDIR/qos source $LIBDIR/ovs source $LIBDIR/segments @@ -56,6 +57,9 @@ if [[ "$1" == "stack" ]]; then if is_service_enabled neutron-segments; then configure_segments_extension fi + if is_service_enabled neutron-network-segment-range; then + configure_network_segment_range + fi if is_service_enabled q-agt neutron-agent; then configure_l2_agent fi diff --git a/neutron/tests/contrib/gate_hook.sh b/neutron/tests/contrib/gate_hook.sh index 68992770113..6ec291d8392 100644 --- a/neutron/tests/contrib/gate_hook.sh +++ b/neutron/tests/contrib/gate_hook.sh @@ -102,6 +102,7 @@ case $VENV in load_rc_hook qos load_rc_hook segments load_rc_hook trunk + load_rc_hook network_segment_range load_conf_hook vlan_provider load_conf_hook osprofiler load_conf_hook availability_zone diff --git a/neutron/tests/contrib/hooks/api_all_extensions b/neutron/tests/contrib/hooks/api_all_extensions index 7294208775f..cfad5057381 100644 --- a/neutron/tests/contrib/hooks/api_all_extensions +++ b/neutron/tests/contrib/hooks/api_all_extensions @@ -33,6 +33,7 @@ NETWORK_API_EXTENSIONS+=",net-mtu" NETWORK_API_EXTENSIONS+=",net-mtu-writable" NETWORK_API_EXTENSIONS+=",network-ip-availability" NETWORK_API_EXTENSIONS+=",network_availability_zone" +NETWORK_API_EXTENSIONS+=",network-segment-range" NETWORK_API_EXTENSIONS+=",pagination" NETWORK_API_EXTENSIONS+=",port-security" NETWORK_API_EXTENSIONS+=",project-id" diff --git a/neutron/tests/contrib/hooks/network_segment_range b/neutron/tests/contrib/hooks/network_segment_range new file mode 100644 index 00000000000..0c31dd2670c --- /dev/null +++ b/neutron/tests/contrib/hooks/network_segment_range @@ -0,0 +1 @@ +enable_service neutron-network-segment-range \ No newline at end of file