1 Puppet::Type.newtype(:neutron_network) do
5 newparam(:name, :namevar => true) do
6 desc 'Symbolic name for the network'
11 desc 'The unique id of the network'
13 raise(Puppet::Error, 'This is a read only property')
17 newproperty(:admin_state_up) do
18 desc 'The administrative status of the network'
19 newvalues(/(t|T)rue/, /(f|F)alse/)
25 newproperty(:shared) do
26 desc 'Whether this network should be shared across all tenants or not'
27 newvalues(/(t|T)rue/, /(f|F)alse/)
33 newparam(:tenant_name) do
34 desc 'The name of the tenant which will own the network.'
37 newproperty(:tenant_id) do
38 desc 'A uuid identifying the tenant which will own the network.'
41 newproperty(:provider_network_type) do
42 desc 'The physical mechanism by which the virtual network is realized.'
43 newvalues(:flat, :vlan, :local, :gre, :l3_ext, :vxlan)
46 newproperty(:provider_physical_network) do
48 The name of the physical network over which the virtual network
49 is realized for flat and VLAN networks.
54 newproperty(:provider_segmentation_id) do
55 desc 'Identifies an isolated segment on the physical network.'
61 newproperty(:router_external) do
62 desc 'Whether this router will route traffic to an external network'
63 newvalues(/(t|T)rue/, /(f|F)alse/)
69 # Require the neutron-server service to be running
70 autorequire(:service) do
74 autorequire(:keystone_tenant) do
75 [self[:tenant_name]] if self[:tenant_name]
79 if self[:ensure] != :present
82 if self[:tenant_id] && self[:tenant_name]
83 raise(Puppet::Error, <<-EOT
84 Please provide a value for only one of tenant_name and tenant_id.