X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fneutron%2Flib%2Fpuppet%2Ftype%2Fneutron_network.rb;fp=3rdparty%2Fmodules%2Fneutron%2Flib%2Fpuppet%2Ftype%2Fneutron_network.rb;h=0000000000000000000000000000000000000000;hb=6e1426dc77fb4e5d51f07c187c6f2219431dc31e;hp=8ceecc059b17d88d21f4c202b5180c8e4c2afd41;hpb=87423ba664cd5f2bb462ebadd08b1a90d0fe1c8d;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/neutron/lib/puppet/type/neutron_network.rb b/3rdparty/modules/neutron/lib/puppet/type/neutron_network.rb deleted file mode 100644 index 8ceecc059..000000000 --- a/3rdparty/modules/neutron/lib/puppet/type/neutron_network.rb +++ /dev/null @@ -1,90 +0,0 @@ -Puppet::Type.newtype(:neutron_network) do - - ensurable - - newparam(:name, :namevar => true) do - desc 'Symbolic name for the network' - newvalues(/.*/) - end - - newproperty(:id) do - desc 'The unique id of the network' - validate do |v| - raise(Puppet::Error, 'This is a read only property') - end - end - - newproperty(:admin_state_up) do - desc 'The administrative status of the network' - newvalues(/(t|T)rue/, /(f|F)alse/) - munge do |v| - v.to_s.capitalize - end - end - - newproperty(:shared) do - desc 'Whether this network should be shared across all tenants or not' - newvalues(/(t|T)rue/, /(f|F)alse/) - munge do |v| - v.to_s.capitalize - end - end - - newparam(:tenant_name) do - desc 'The name of the tenant which will own the network.' - end - - newproperty(:tenant_id) do - desc 'A uuid identifying the tenant which will own the network.' - end - - newproperty(:provider_network_type) do - desc 'The physical mechanism by which the virtual network is realized.' - newvalues(:flat, :vlan, :local, :gre, :l3_ext, :vxlan) - end - - newproperty(:provider_physical_network) do - desc <<-EOT - The name of the physical network over which the virtual network - is realized for flat and VLAN networks. - EOT - newvalues(/\S+/) - end - - newproperty(:provider_segmentation_id) do - desc 'Identifies an isolated segment on the physical network.' - munge do |v| - Integer(v) - end - end - - newproperty(:router_external) do - desc 'Whether this router will route traffic to an external network' - newvalues(/(t|T)rue/, /(f|F)alse/) - munge do |v| - v.to_s.capitalize - end - end - - # Require the neutron-server service to be running - autorequire(:service) do - ['neutron-server'] - end - - autorequire(:keystone_tenant) do - [self[:tenant_name]] if self[:tenant_name] - end - - validate do - if self[:ensure] != :present - return - end - if self[:tenant_id] && self[:tenant_name] - raise(Puppet::Error, <<-EOT -Please provide a value for only one of tenant_name and tenant_id. -EOT - ) - end - end - -end