Skip to content

Commit eaf3669

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Deprecate support for [ml2] tenant_network_types"
2 parents ad1dfa8 + 3fc7576 commit eaf3669

File tree

10 files changed

+94
-41
lines changed

10 files changed

+94
-41
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ class { 'neutron::keystone::authtoken':
6666
6767
# ml2 plugin with vxlan as ml2 driver and ovs as mechanism driver
6868
class { 'neutron::plugins::ml2':
69-
type_drivers => ['vxlan'],
70-
tenant_network_types => ['vxlan'],
71-
vxlan_group => '239.1.1.1',
72-
mechanism_drivers => ['openvswitch'],
73-
vni_ranges => ['1:300']
69+
type_drivers => ['vxlan'],
70+
project_network_types => ['vxlan'],
71+
vxlan_group => '239.1.1.1',
72+
mechanism_drivers => ['openvswitch'],
73+
vni_ranges => ['1:300']
7474
}
7575
```
7676

manifests/plugins/ml2.pp

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
# from the neutron.ml2.extension_drivers namespace.
3939
# Defaults to $facts['os_service_default']
4040
#
41-
# [*tenant_network_types*]
42-
# (optional) Ordered list of network_types to allocate as tenant networks.
41+
# [*project_network_types*]
42+
# (optional) Ordered list of network_types to allocate as project networks.
4343
# The value 'local' is only useful for single-box testing
4444
# but provides no connectivity between hosts.
4545
# Should be an array that can have these elements:
@@ -62,17 +62,16 @@
6262
#
6363
# [*network_vlan_ranges*]
6464
# (optional) List of <physical_network>:<vlan_min>:<vlan_max> or
65-
# <physical_network> specifying physical_network names
66-
# usable for VLAN provider and tenant networks, as
67-
# well as ranges of VLAN tags on each available for
68-
# allocation to tenant networks.
65+
# <physical_network> specifying physical_network names usable for VLAN
66+
# provider and project networks, as well as ranges of VLAN tags on each
67+
# available for allocation to project networks.
6968
# Should be an array with vlan_min = 1 & vlan_max = 4094 (IEEE 802.1Q)
7069
# Default to 'physnet1:1000:2999'.
7170
#
7271
# [*tunnel_id_ranges*]
7372
# (optional) Comma-separated list of <tun_min>:<tun_max> tuples
7473
# enumerating ranges of GRE tunnel IDs that are
75-
# available for tenant network allocation
74+
# available for project network allocation
7675
# Should be an array with tun_max +1 - tun_min > 1000000
7776
# Default to '20:100'.
7877
#
@@ -87,7 +86,7 @@
8786
# [*vni_ranges*]
8887
# (optional) Comma-separated list of <vni_min>:<vni_max> tuples
8988
# enumerating ranges of VXLAN VNI IDs that are
90-
# available for tenant network allocation.
89+
# available for project network allocation.
9190
# Min value is 0 and Max value is 16777215.
9291
# Default to '10:100'.
9392
#
@@ -122,11 +121,21 @@
122121
# in the ml2 config.
123122
# Defaults to false.
124123
#
124+
# DEPRECATED PARAMETERS
125+
#
126+
# [*tenant_network_types*]
127+
# (optional) Ordered list of network_types to allocate as project networks.
128+
# The value 'local' is only useful for single-box testing
129+
# but provides no connectivity between hosts.
130+
# Should be an array that can have these elements:
131+
# local, flat, vlan, gre, vxlan
132+
# Defaults to undef
133+
#
125134
class neutron::plugins::ml2 (
126135
Stdlib::Ensure::Package $package_ensure = 'present',
127136
$type_drivers = ['local', 'flat', 'vlan', 'gre', 'vxlan', 'geneve'],
128137
$extension_drivers = $facts['os_service_default'],
129-
$tenant_network_types = ['local', 'flat', 'vlan', 'gre', 'vxlan'],
138+
$project_network_types = ['local', 'flat', 'vlan', 'gre', 'vxlan'],
130139
$mechanism_drivers = ['openvswitch'],
131140
$flat_networks = '*',
132141
$network_vlan_ranges = 'physnet1:1000:2999',
@@ -139,6 +148,8 @@
139148
$max_header_size = $facts['os_service_default'],
140149
$overlay_ip_version = $facts['os_service_default'],
141150
Boolean $purge_config = false,
151+
# DEPRECATED PARAMETERS
152+
$tenant_network_types = undef,
142153
) {
143154
include neutron::deps
144155
include neutron::params
@@ -186,11 +197,23 @@
186197
neutron_plugin_ml2 {
187198
'ml2/physical_network_mtus': value => join(any2array($physical_network_mtus), ',');
188199
'ml2/type_drivers': value => join(any2array($type_drivers), ',');
189-
'ml2/tenant_network_types': value => join(any2array($tenant_network_types), ',');
190200
'ml2/mechanism_drivers': value => join(any2array($mechanism_drivers), ',');
191201
'ml2/path_mtu': value => $path_mtu;
192202
'ml2/extension_drivers': value => join(any2array($extension_drivers), ',');
193203
'ml2/overlay_ip_version': value => $overlay_ip_version;
194204
'securitygroup/enable_security_group': value => $enable_security_group;
195205
}
206+
207+
if $tenant_network_types != undef {
208+
warning('The tenant_netwoork_types parameter is deprecated')
209+
neutron_plugin_ml2 {
210+
'ml2/tenant_network_types': value => join(any2array($tenant_network_types), ',');
211+
'ml2/project_network_types': value => $facts['os_service_default'];
212+
}
213+
} else {
214+
neutron_plugin_ml2 {
215+
'ml2/tenant_network_types': value => $facts['os_service_default'];
216+
'ml2/project_network_types': value => join(any2array($project_network_types), ',');
217+
}
218+
}
196219
}

manifests/plugins/ml2/type_driver.pp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@
2525
#
2626
# [*tunnel_id_ranges*]
2727
# (required) Comma-separated list of <tun_min>:<tun_max> tuples enumerating ranges
28-
# of GRE tunnel IDs that are available for tenant network allocation
28+
# of GRE tunnel IDs that are available for project network allocation
2929
#
3030
# [*network_vlan_ranges*]
3131
# (required) List of <physical_network>:<vlan_min>:<vlan_max> or <physical_network>
32-
# specifying physical_network names usable for VLAN provider and tenant networks, as
33-
# well as ranges of VLAN tags on each available for allocation to tenant networks.
32+
# specifying physical_network names usable for VLAN provider and project networks, as
33+
# well as ranges of VLAN tags on each available for allocation to project networks.
3434
#
3535
# [*vni_ranges*]
3636
# (required) Comma-separated list of <vni_min> tuples enumerating ranges of VXLAN VNI IDs
37-
# that are available for tenant network allocation.
37+
# that are available for project network allocation.
3838
#
3939
# [*vxlan_group*]
4040
# (required) Multicast group for VXLAN. If unset, disables VXLAN multicast mode.

manifests/quota.pp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,36 @@
55
# === Parameters
66
#
77
# [*default_quota*]
8-
# (optional) Default number of resources allowed per tenant,
8+
# (optional) Default number of resources allowed per project,
99
# minus for unlimited. Defaults to $facts['os_service_default'].
1010
#
1111
# [*quota_network*]
12-
# (optional) Number of networks allowed per tenant, and minus means unlimited.
12+
# (optional) Number of networks allowed per project, and minus means unlimited.
1313
# Defaults to $facts['os_service_default'].
1414
#
1515
# [*quota_subnet*]
16-
# (optional) Number of subnets allowed per tenant, and minus means unlimited.
16+
# (optional) Number of subnets allowed per project, and minus means unlimited.
1717
# Defaults to $facts['os_service_default'].
1818
#
1919
# [*quota_port*]
20-
# (optional) Number of ports allowed per tenant, and minus means unlimited.
20+
# (optional) Number of ports allowed per project, and minus means unlimited.
2121
# Defaults to $facts['os_service_default'].
2222
#
2323
# [*quota_router*]
24-
# (optional) Number of routers allowed per tenant, and minus means unlimited.
24+
# (optional) Number of routers allowed per project, and minus means unlimited.
2525
# Requires L3 extension. Defaults to $facts['os_service_default'].
2626
#
2727
# [*quota_floatingip*]
28-
# (optional) Number of floating IPs allowed per tenant,
28+
# (optional) Number of floating IPs allowed per project,
2929
# and minus means unlimited. Requires L3 extension. Defaults to $facts['os_service_default'].
3030
#
3131
# [*quota_security_group*]
32-
# (optional) Number of security groups allowed per tenant,
32+
# (optional) Number of security groups allowed per project,
3333
# and minus means unlimited. Requires securitygroup extension.
3434
# Defaults to $facts['os_service_default'].
3535
#
3636
# [*quota_security_group_rule*]
37-
# (optional) Number of security rules allowed per tenant,
37+
# (optional) Number of security rules allowed per project,
3838
# and minus means unlimited. Requires securitygroup extension.
3939
# Defaults to $facts['os_service_default'].
4040
#
@@ -43,7 +43,7 @@
4343
# Defaults to $facts['os_service_default'].
4444
#
4545
# [*quota_rbac_policy*]
46-
# (optional) Number of rbac policies allowed per tenant.
46+
# (optional) Number of rbac policies allowed per project.
4747
# A negative value means unlimited.
4848
# Defaults to $facts['os_service_default'].
4949
#

manifests/quota/fwaas.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
# === Parameters
66
#
77
# [*quota_firewall_group*]
8-
# (Optional) Number of firewall groups allowed per tenant.
8+
# (Optional) Number of firewall groups allowed per project.
99
# Defaults to $facts['os_service_default'].
1010
#
1111
# [*quota_firewall_policy*]
12-
# (Optional) Number of firewall policies allowed per tenant.
12+
# (Optional) Number of firewall policies allowed per project.
1313
# Defaults to $facts['os_service_default'].
1414
#
1515
# [*quota_firewall_rule*]
16-
# (Optional) Number of firewall rules allowed per tenant.
16+
# (Optional) Number of firewall rules allowed per project.
1717
# Defaults to $facts['os_service_default'].
1818
#
1919
class neutron::quota::fwaas (

manifests/quota/sfc.pp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@
55
# === Parameters
66
#
77
# [*quota_port_chain*]
8-
# (Optional) Maximum number of port chain per tenant.
8+
# (Optional) Maximum number of port chain per project.
99
# Defaults to $facts['os_service_default'].
1010
#
1111
# [*quota_port_pair_group*]
12-
# (Optional) Maximum number of port pair group per tenant.
12+
# (Optional) Maximum number of port pair group per project.
1313
# Defaults to $facts['os_service_default'].
1414
#
1515
# [*quota_port_pair*]
16-
# (Optional) Maximum number of port pair per tenant.
16+
# (Optional) Maximum number of port pair per project.
1717
# Defaults to $facts['os_service_default'].
1818
#
1919
# [*quota_service_graphs*]
20-
# (Optional) Maximum number of Service Graphs per tenant.
20+
# (Optional) Maximum number of Service Graphs per project.
2121
# Defaults to $facts['os_service_default'].
2222
#
2323
# [*quota_flow_classifier*]
24-
# (Optional) Maximum number of Flow Classifiers per tenant.
24+
# (Optional) Maximum number of Flow Classifiers per project.
2525
# Defaults to $facts['os_service_default'].
2626
#
2727
class neutron::quota::sfc (

manifests/server.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
#
8888
# [*router_distributed*]
8989
# (Optional) Setting the "router_distributed" flag to "True" will default to the creation
90-
# of distributed tenant routers.
90+
# of distributed project routers.
9191
# Also can be the type of the router on the create request (admin-only attribute).
9292
# Defaults to $facts['os_service_default']
9393
#

manifests/services/taas.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
# Defaults to 'TAAS:TAAS:neutron_taas.services.taas.service_drivers.taas_rpc.TaasRpcDriver:default'.
1313
#
1414
# [*quota_tap_service*]
15-
# (optional) Number of Tap Service instances allowed per tenant.
15+
# (optional) Number of Tap Service instances allowed per project.
1616
# Defaults to $facts['os_service_default']
1717
#
1818
# [*quota_tap_flow*]
19-
# (optional) Number of Tap flows allowed per tenant.
19+
# (optional) Number of Tap flows allowed per project.
2020
# Defaults to $facts['os_service_default']
2121
#
2222
# [*vlan_range_start*]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
deprecations:
3+
- |
4+
The ``neutron::plugins::ml2::tenant_network_types`` parameter has been
5+
deprecated in favor of the new ``project_network_types`` parameter.

spec/classes/neutron_plugins_ml2_spec.rb

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
let :default_params do
3131
{
3232
:type_drivers => ['local', 'flat', 'vlan', 'gre', 'vxlan', 'geneve'],
33-
:tenant_network_types => ['local', 'flat', 'vlan', 'gre', 'vxlan'],
33+
:project_network_types => ['local', 'flat', 'vlan', 'gre', 'vxlan'],
3434
:mechanism_drivers => ['openvswitch'],
3535
:flat_networks => '*',
3636
:network_vlan_ranges => 'datacentre:10:50',
@@ -65,7 +65,8 @@
6565

6666
it 'configures ml2_conf.ini' do
6767
should contain_neutron_plugin_ml2('ml2/type_drivers').with_value(p[:type_drivers].join(','))
68-
should contain_neutron_plugin_ml2('ml2/tenant_network_types').with_value(p[:tenant_network_types].join(','))
68+
should contain_neutron_plugin_ml2('ml2/project_network_types').with_value(p[:project_network_types].join(','))
69+
should contain_neutron_plugin_ml2('ml2/tenant_network_types').with_value('<SERVICE DEFAULT>')
6970
should contain_neutron_plugin_ml2('ml2/mechanism_drivers').with_value(p[:mechanism_drivers].join(','))
7071
should contain_neutron_plugin_ml2('ml2/extension_drivers').with_value('<SERVICE DEFAULT>')
7172
should contain_neutron_plugin_ml2('ml2/path_mtu').with_value('<SERVICE DEFAULT>')
@@ -274,6 +275,30 @@
274275
end
275276
end
276277
end
278+
279+
context 'when project_network_types is set' do
280+
before :each do
281+
params.merge!({
282+
:project_network_types => ['vlan', 'vxlan'],
283+
})
284+
end
285+
it 'configures ml2_conf.ini' do
286+
should contain_neutron_plugin_ml2('ml2/project_network_types').with_value(params[:project_network_types].join(','))
287+
should contain_neutron_plugin_ml2('ml2/tenant_network_types').with_value('<SERVICE DEFAULT>')
288+
end
289+
end
290+
291+
context 'when tenant_network_types is set' do
292+
before :each do
293+
params.merge!({
294+
:tenant_network_types => ['vlan', 'vxlan'],
295+
})
296+
end
297+
it 'configures ml2_conf.ini' do
298+
should contain_neutron_plugin_ml2('ml2/project_network_types').with_value('<SERVICE DEFAULT>')
299+
should contain_neutron_plugin_ml2('ml2/tenant_network_types').with_value(params[:tenant_network_types].join(','))
300+
end
301+
end
277302
end
278303

279304
on_supported_os({

0 commit comments

Comments
 (0)