Merge "Add support for address family parameters"

This commit is contained in:
Zuul 2017-12-02 08:43:25 +00:00 committed by Gerrit Code Review
commit 518085dc1a
6 changed files with 50 additions and 5 deletions

View File

@ -36,6 +36,13 @@
# (optional) Location of ca certificates file to use for # (optional) Location of ca certificates file to use for
# neutron client requests. # neutron client requests.
# #
# [*network_plugin_ipv4_enabled*]
# (optional) Whether to support Ipv4 network resource
#
# [*network_plugin_ipv6_enabled*]
# (optional) whether to support IPv6 network resource
#
class manila::network::neutron ( class manila::network::neutron (
$neutron_url = 'http://127.0.0.1:9696', $neutron_url = 'http://127.0.0.1:9696',
$neutron_url_timeout = 30, $neutron_url_timeout = 30,
@ -47,6 +54,8 @@ class manila::network::neutron (
$neutron_api_insecure = false, $neutron_api_insecure = false,
$neutron_auth_strategy = 'keystone', $neutron_auth_strategy = 'keystone',
$neutron_ca_certificates_file = undef, $neutron_ca_certificates_file = undef,
$network_plugin_ipv4_enabled = $::os_service_default,
$network_plugin_ipv6_enabled = $::os_service_default,
) { ) {
$neutron_plugin_name = 'manila.network.neutron.neutron_network_plugin.NeutronNetworkPlugin' $neutron_plugin_name = 'manila.network.neutron.neutron_network_plugin.NeutronNetworkPlugin'
@ -63,5 +72,7 @@ class manila::network::neutron (
'DEFAULT/neutron_api_insecure': value => $neutron_api_insecure; 'DEFAULT/neutron_api_insecure': value => $neutron_api_insecure;
'DEFAULT/neutron_auth_strategy': value => $neutron_auth_strategy; 'DEFAULT/neutron_auth_strategy': value => $neutron_auth_strategy;
'DEFAULT/neutron_ca_certificates_file': value => $neutron_ca_certificates_file; 'DEFAULT/neutron_ca_certificates_file': value => $neutron_ca_certificates_file;
'DEFAULT/network_plugin_ipv4_enabled': value => $network_plugin_ipv4_enabled;
'DEFAULT/network_plugin_ipv6_enabled': value => $network_plugin_ipv6_enabled;
} }
} }

View File

@ -15,17 +15,28 @@
# 'neutron_net_id'. This opt is used only with # 'neutron_net_id'. This opt is used only with
# class 'NeutronSingleNetworkPlugin'. # class 'NeutronSingleNetworkPlugin'.
# #
# [*network_plugin_ipv4_enabled*]
# (optional) Whether to support Ipv4 network resource
#
# [*network_plugin_ipv6_enabled*]
# (optional) whether to support IPv6 network resource
#
define manila::network::neutron_single_network ( define manila::network::neutron_single_network (
$neutron_net_id, $neutron_net_id,
$neutron_subnet_id, $neutron_subnet_id,
$network_plugin_ipv4_enabled,
$network_plugin_ipv6_enabled,
) { ) {
$neutron_single_plugin_name = 'manila.network.neutron.neutron_network_plugin.NeutronSingleNetworkPlugin' $neutron_single_plugin_name = 'manila.network.neutron.neutron_network_plugin.NeutronSingleNetworkPlugin'
manila_config { manila_config {
"${name}/network_api_class": value => $neutron_single_plugin_name; "${name}/network_api_class": value => $neutron_single_plugin_name;
"${name}/neutron_net_id": value => $neutron_net_id; "${name}/neutron_net_id": value => $neutron_net_id;
"${name}/neutron_subnet_id": value => $neutron_subnet_id; "${name}/neutron_subnet_id": value => $neutron_subnet_id;
"${name}/network_plugin_ipv4_enabled": value => $network_plugin_ipv4_enabled;
"${name}/network_plugin_ipv6_enabled": value => $network_plugin_ipv6_enabled;
} }
} }

View File

@ -25,6 +25,12 @@
# Examples: 10.0.0.10 or 10.0.0.10-10.0.0.20 or # 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 # 10.0.0.10-10.0.0.20,10.0.0.30-10.0.0.40,10.0.0.50
# #
# [*network_plugin_ipv4_enabled*]
# (optional) Whether to support Ipv4 network resource
#
# [*network_plugin_ipv6_enabled*]
# (optional) whether to support IPv6 network resource
#
# DEPRECATED PARAMETERS # DEPRECATED PARAMETERS
# #
# [*standalone_network_plugin_ip_version*] # [*standalone_network_plugin_ip_version*]
@ -37,6 +43,8 @@ define manila::network::standalone (
$standalone_network_plugin_mask, $standalone_network_plugin_mask,
$standalone_network_plugin_segmentation_id = undef, $standalone_network_plugin_segmentation_id = undef,
$standalone_network_plugin_allowed_ip_ranges = undef, $standalone_network_plugin_allowed_ip_ranges = undef,
$network_plugin_ipv4_enabled = $::os_service_default,
$network_plugin_ipv6_enabled = $::os_service_default,
# DEPRECATED PARAMETERS # DEPRECATED PARAMETERS
$standalone_network_plugin_ip_version = undef, $standalone_network_plugin_ip_version = undef,
) { ) {
@ -53,6 +61,8 @@ define manila::network::standalone (
"${name}/standalone_network_plugin_mask": value => $standalone_network_plugin_mask; "${name}/standalone_network_plugin_mask": value => $standalone_network_plugin_mask;
"${name}/standalone_network_plugin_segmentation_id": value => $standalone_network_plugin_segmentation_id; "${name}/standalone_network_plugin_segmentation_id": value => $standalone_network_plugin_segmentation_id;
"${name}/standalone_network_plugin_allowed_ip_ranges": value => $standalone_network_plugin_allowed_ip_ranges; "${name}/standalone_network_plugin_allowed_ip_ranges": value => $standalone_network_plugin_allowed_ip_ranges;
'DEFAULT/network_plugin_ipv4_enabled': value => $network_plugin_ipv4_enabled;
'DEFAULT/network_plugin_ipv6_enabled': value => $network_plugin_ipv6_enabled;
} }
} }

View File

@ -0,0 +1,6 @@
---
features:
- |
In Pike manila proper added IPv6 support for network plugins and drivers
so we now support the configuration parameters ``network_plugin_ipv4_enabled``
and ``network_plugin_ipv6_enabled``.

View File

@ -20,9 +20,14 @@ describe 'manila::network::neutron' do
:neutron_admin_auth_url => 'http://localhost:5000/v2.0', :neutron_admin_auth_url => 'http://localhost:5000/v2.0',
:neutron_api_insecure => false, :neutron_api_insecure => false,
:neutron_auth_strategy => 'keystone', :neutron_auth_strategy => 'keystone',
:network_plugin_ipv4_enabled => '<SERVICE DEFAULT>',
:network_plugin_ipv6_enabled => '<SERVICE DEFAULT>',
} }
end end
let :facts do
OSDefaults.get_facts({})
end
shared_examples_for 'neutron network plugin' do shared_examples_for 'neutron network plugin' do
let :params_hash do let :params_hash do

View File

@ -5,8 +5,10 @@ describe 'manila::network::neutron_single_network' do
let :params do let :params do
{ {
:neutron_net_id => 'abcdef', :neutron_net_id => 'abcdef',
:neutron_subnet_id => 'ghijkl', :neutron_subnet_id => 'ghijkl',
:network_plugin_ipv4_enabled => '<SERVICE DEFAULT>',
:network_plugin_ipv6_enabled => '<SERVICE DEFAULT>',
} }
end end