Add neutron ml2 plugin resource
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
parent
3be426790c
commit
696e0445ed
83
resources/neutron_plugins_ml2_puppet/README.md
Normal file
83
resources/neutron_plugins_ml2_puppet/README.md
Normal file
@ -0,0 +1,83 @@
|
||||
# Neutron ML2 plugin puppet resource
|
||||
|
||||
# === Parameters
|
||||
|
||||
source https://github.com/openstack/puppet-neutron/blob/5.1.0/manifests/plugins/ml2.pp
|
||||
|
||||
``type_drivers``
|
||||
(optional) List of network type driver entrypoints to be loaded
|
||||
from the neutron.ml2.type_drivers namespace.
|
||||
Could be an array that can have these elements:
|
||||
local, flat, vlan, gre, vxlan
|
||||
Defaults to ['local', 'flat', 'vlan', 'gre', 'vxlan'].
|
||||
|
||||
``tenant_network_types``
|
||||
(optional) Ordered list of network_types to allocate as tenant networks.
|
||||
The value 'local' is only useful for single-box testing
|
||||
but provides no connectivity between hosts.
|
||||
Should be an array that can have these elements:
|
||||
local, flat, vlan, gre, vxlan
|
||||
Defaults to ['local', 'flat', 'vlan', 'gre', 'vxlan'].
|
||||
|
||||
``mechanism_drivers``
|
||||
(optional) An ordered list of networking mechanism driver
|
||||
entrypoints to be loaded from the neutron.ml2.mechanism_drivers namespace.
|
||||
Should be an array that can have these elements:
|
||||
logger, test, linuxbridge, openvswitch, hyperv, ncs, arista, cisco_nexus,
|
||||
l2population, sriovnicswitch
|
||||
Default to ['openvswitch', 'linuxbridge'].
|
||||
|
||||
``flat_networks``
|
||||
(optional) List of physical_network names with which flat networks
|
||||
can be created. Use * to allow flat networks with arbitrary
|
||||
physical_network names.
|
||||
Should be an array.
|
||||
Default to *.
|
||||
|
||||
``network_vlan_ranges``
|
||||
(optional) List of <physical_network>:<vlan_min>:<vlan_max> or
|
||||
<physical_network> specifying physical_network names
|
||||
usable for VLAN provider and tenant networks, as
|
||||
well as ranges of VLAN tags on each available for
|
||||
allocation to tenant networks.
|
||||
Should be an array with vlan_min = 1 & vlan_max = 4094 (IEEE 802.1Q)
|
||||
Default to empty.
|
||||
|
||||
``tunnel_id_ranges``
|
||||
(optional) Comma-separated list of <tun_min>:<tun_max> tuples
|
||||
enumerating ranges of GRE tunnel IDs that are
|
||||
available for tenant network allocation
|
||||
Should be an array with tun_max +1 - tun_min > 1000000
|
||||
Default to empty.
|
||||
|
||||
``vxlan_group``
|
||||
(optional) Multicast group for VXLAN.
|
||||
Multicast group for VXLAN. If unset, disables VXLAN enable sending allocate
|
||||
broadcast traffic to this multicast group. When left unconfigured, will
|
||||
disable multicast VXLAN mode
|
||||
Should be an Multicast IP (v4 or v6) address.
|
||||
Default to 'None'.
|
||||
|
||||
``vni_ranges``
|
||||
(optional) Comma-separated list of <vni_min>:<vni_max> tuples
|
||||
enumerating ranges of VXLAN VNI IDs that are
|
||||
available for tenant network allocation.
|
||||
Min value is 0 and Max value is 16777215.
|
||||
Default to empty.
|
||||
|
||||
``enable_security_group``
|
||||
(optional) Controls if neutron security group is enabled or not.
|
||||
It should be false when you use nova security group.
|
||||
Defaults to true.
|
||||
|
||||
``supported_pci_vendor_devs``
|
||||
(optional) Supported PCI vendor devices, defined by
|
||||
vendor_id:product_id according to the PCI ID
|
||||
Repository. Should be an array of devices.
|
||||
Defaults to ['15b3:1004', '8086:10ca'] (Intel & Mellanox SR-IOV capable NICs)
|
||||
|
||||
``sriov_agent_required``
|
||||
(optional) SRIOV neutron agent is required for port binding.
|
||||
Only set to true if SRIOV network adapters support VF link state setting
|
||||
and if admin state management is desired.
|
||||
Defaults to false.
|
3
resources/neutron_plugins_ml2_puppet/actions/remove.pp
Normal file
3
resources/neutron_plugins_ml2_puppet/actions/remove.pp
Normal file
@ -0,0 +1,3 @@
|
||||
class { 'neutron::plugins::ml2':
|
||||
package_ensure => 'absent',
|
||||
}
|
47
resources/neutron_plugins_ml2_puppet/actions/run.pp
Normal file
47
resources/neutron_plugins_ml2_puppet/actions/run.pp
Normal file
@ -0,0 +1,47 @@
|
||||
$resource = hiera($::resource_name)
|
||||
|
||||
$ip = $resource['input']['ip']['value']
|
||||
|
||||
$type_drivers = $resource['input']['type_drivers']['value']
|
||||
$tenant_network_types = $resource['input']['tenant_network_types']['value']
|
||||
$mechanism_drivers = $resource['input']['mechanism_drivers']['value']
|
||||
$flat_networks = $resource['input']['flat_networks']['value']
|
||||
$network_vlan_ranges = $resource['input']['network_vlan_ranges']['value']
|
||||
$tunnel_id_ranges = $resource['input']['tunnel_id_ranges']['value']
|
||||
$vxlan_group = $resource['input']['vxlan_group']['value']
|
||||
$vni_ranges = $resource['input']['vni_ranges']['value']
|
||||
$enable_security_group = $resource['input']['enable_security_group']['value']
|
||||
$package_ensure = $resource['input']['package_ensure']['value']
|
||||
$supported_pci_vendor_devs = $resource['input']['supported_pci_vendor_devs']['value']
|
||||
$sriov_agent_required = $resource['input']['sriov_agent_required']['value']
|
||||
$package_ensure = $resource['input']['package_ensure']['value']
|
||||
|
||||
class { 'neutron::plugins::ml2':
|
||||
type_drivers => $type_drivers,
|
||||
tenant_network_types => $tenant_network_types,
|
||||
mechanism_drivers => $mechanism_drivers,
|
||||
flat_networks => $flat_networks,
|
||||
network_vlan_ranges => $network_vlan_ranges,
|
||||
tunnel_id_ranges => $tunnel_id_ranges,
|
||||
vxlan_group => $vxlan_group,
|
||||
vni_ranges => $vni_ranges,
|
||||
enable_security_group => $enable_security_group,
|
||||
package_ensure => $package_ensure,
|
||||
supported_pci_vendor_devs => $supported_pci_vendor_devs,
|
||||
sriov_agent_required => $sriov_agent_required,
|
||||
} ->
|
||||
|
||||
exec { 'neutron-db-sync':
|
||||
provider => 'shell',
|
||||
command => "${command} stamp head",
|
||||
path => [ '/usr/bin', '/bin' ],
|
||||
onlyif => "${command} current | grep -qE '^Current revision.*None$' "
|
||||
}
|
||||
|
||||
include neutron::params
|
||||
|
||||
package { 'neutron':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::package_name,
|
||||
before => Exec['neutron-db-sync']
|
||||
}
|
57
resources/neutron_plugins_ml2_puppet/meta.yaml
Normal file
57
resources/neutron_plugins_ml2_puppet/meta.yaml
Normal file
@ -0,0 +1,57 @@
|
||||
handler: puppet
|
||||
id: 'neutron_plugins_ml2_puppet'
|
||||
input:
|
||||
ip:
|
||||
schema: str!
|
||||
value:
|
||||
ssh_key:
|
||||
schema: str!
|
||||
value:
|
||||
ssh_user:
|
||||
schema: str!
|
||||
value:
|
||||
|
||||
type_drivers:
|
||||
schema: [str]
|
||||
value: ['local', 'flat', 'vlan', 'gre', 'vxlan']
|
||||
tenant_network_types:
|
||||
schema: [str]
|
||||
value: ['local', 'flat', 'vlan', 'gre', 'vxlan']
|
||||
mechanism_drivers:
|
||||
schema: [str]
|
||||
value: ['openvswitch', 'linuxbridge']
|
||||
flat_networks:
|
||||
schema: [str]
|
||||
value: ['*']
|
||||
network_vlan_ranges:
|
||||
schema: [str]
|
||||
value: ['physnet1:1000:2999']
|
||||
tunnel_id_ranges:
|
||||
schema: [str]
|
||||
value: ['20:100']
|
||||
vxlan_group:
|
||||
schema: str
|
||||
value: '224.0.0.1'
|
||||
vni_ranges:
|
||||
schema: [str]
|
||||
value: ['10:100']
|
||||
enable_security_group:
|
||||
schema: bool
|
||||
value: true
|
||||
package_ensure:
|
||||
schema: str
|
||||
value: 'present'
|
||||
supported_pci_vendor_devs:
|
||||
schema: [str]
|
||||
value: ['15b3:1004', '8086:10ca']
|
||||
sriov_agent_required:
|
||||
schema: bool
|
||||
value: false
|
||||
|
||||
git:
|
||||
schema: {repository: str!, branch: str!}
|
||||
value: {repository: 'https://github.com/openstack/puppet-neutron', branch: '5.1.0'}
|
||||
|
||||
puppet_module: 'neutron'
|
||||
tags: [resource/neutron, resource/neutron_plugins_ml2]
|
||||
version: 1.0.0
|
Loading…
Reference in New Issue
Block a user