From e41d1264520952617db44d59dcdf4a35ff71a424 Mon Sep 17 00:00:00 2001 From: zhangxuanyuan Date: Thu, 23 Nov 2017 15:18:32 +0800 Subject: [PATCH] Remove option standalone_network_plugin_ip_version 'standalone_network_plugin_ip_version' option has been deprecated. This option has been replaced by 'network_plugin_ipv4_enabled' and 'network_plugin_ipv6_enabled' options. Change-Id: I0251fecddac74578698bcda5d46e44ca16bd8a76 --- contrib/ci/pre_test_hook.sh | 4 ++-- manila/network/standalone_network_plugin.py | 19 ------------------- ...rk-plugin-ip-version-440ebcf27ffd22f8.yaml | 6 ++++++ 3 files changed, 8 insertions(+), 21 deletions(-) create mode 100644 releasenotes/notes/remove-standalone-network-plugin-ip-version-440ebcf27ffd22f8.yaml diff --git a/contrib/ci/pre_test_hook.sh b/contrib/ci/pre_test_hook.sh index c3e61ab6ab..e19d4443a1 100755 --- a/contrib/ci/pre_test_hook.sh +++ b/contrib/ci/pre_test_hook.sh @@ -124,7 +124,7 @@ elif [[ "$DRIVER" == "dummy" ]]; then echo "MANILA_OPTGROUP_membernet_standalone_network_plugin_network_type=vlan" >> $localconf echo "MANILA_OPTGROUP_membernet_standalone_network_plugin_segmentation_id=1010" >> $localconf echo "MANILA_OPTGROUP_membernet_standalone_network_plugin_allowed_ip_ranges=10.0.0.10-10.0.0.209" >> $localconf - echo "MANILA_OPTGROUP_membernet_standalone_network_plugin_ip_version=4" >> $localconf + echo "MANILA_OPTGROUP_membernet_network_plugin_ipv4_enabled=True" >> $localconf echo "MANILA_OPTGROUP_adminnet_network_api_class=manila.network.standalone_network_plugin.StandaloneNetworkPlugin" >> $localconf echo "MANILA_OPTGROUP_adminnet_standalone_network_plugin_gateway=11.0.0.1" >> $localconf @@ -132,7 +132,7 @@ elif [[ "$DRIVER" == "dummy" ]]; then echo "MANILA_OPTGROUP_adminnet_standalone_network_plugin_network_type=vlan" >> $localconf echo "MANILA_OPTGROUP_adminnet_standalone_network_plugin_segmentation_id=1011" >> $localconf echo "MANILA_OPTGROUP_adminnet_standalone_network_plugin_allowed_ip_ranges=11.0.0.10-11.0.0.19,11.0.0.30-11.0.0.39,11.0.0.50-11.0.0.199" >> $localconf - echo "MANILA_OPTGROUP_adminnet_standalone_network_plugin_ip_version=4" >> $localconf + echo "MANILA_OPTGROUP_adminnet_network_plugin_ipv4_enabled=True" >> $localconf export MANILA_TEMPEST_CONCURRENCY=24 diff --git a/manila/network/standalone_network_plugin.py b/manila/network/standalone_network_plugin.py index 66308717cc..1d5c3c56bc 100644 --- a/manila/network/standalone_network_plugin.py +++ b/manila/network/standalone_network_plugin.py @@ -59,16 +59,6 @@ standalone_network_plugin_opts = [ "Examples: 10.0.0.10 or 10.0.0.10-10.0.0.20 or " "10.0.0.10-10.0.0.20,10.0.0.30-10.0.0.40,10.0.0.50", deprecated_group='DEFAULT'), - cfg.IntOpt( - 'standalone_network_plugin_ip_version', - default=4, - help="IP version of network. Optional." - "Allowed values are '4' and '6'. Default value is '4'. " - "Note: This option is no longer used and has no effect", - deprecated_for_removal=True, - deprecated_reason="This option has been replaced by " - "'network_plugin_ipv4_enabled' and " - "'network_plugin_ipv6_enabled' options."), cfg.IntOpt( 'standalone_network_plugin_mtu', default=1500, @@ -150,15 +140,6 @@ class StandaloneNetworkPlugin(network.NetworkBaseAPI): "'network_plugin_ipv6_enabled' are " "configured True.") - if not (ipv4_enabled or ipv6_enabled): - ip_version = int( - self.configuration.standalone_network_plugin_ip_version) - LOG.warning("You're using a deprecated option that may" - " be removed and silently ignored in the future. " - "Please use 'network_plugin_ipv4_enabled' or " - "'network_plugin_ipv6_enabled' instead of " - "'standalone_network_plugin_ip_version'.") - self.network_type = ( self.configuration.standalone_network_plugin_network_type) self.segmentation_id = ( diff --git a/releasenotes/notes/remove-standalone-network-plugin-ip-version-440ebcf27ffd22f8.yaml b/releasenotes/notes/remove-standalone-network-plugin-ip-version-440ebcf27ffd22f8.yaml new file mode 100644 index 0000000000..9cf6257b68 --- /dev/null +++ b/releasenotes/notes/remove-standalone-network-plugin-ip-version-440ebcf27ffd22f8.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + The deprecated configuration option 'standalone_network_plugin_ip_version' + has been removed. 'network_plugin_ipv4_enabled' and 'network_plugin_ipv6_enabled' + should be used instead.