summaryrefslogtreecommitdiffstats
path: root/build/puppet-neutron/lib/puppet/type/neutron_agent_vpp.rb
blob: f43a8b41d7da5c5d3b553bba93af66f8a65907f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Puppet::Type.newtype(:neutron_agent_vpp) do

  ensurable

  newparam(:name, :namevar => true) do
    desc 'Section/setting name to manage from vpp agent config.'
    newvalues(/\S+\/\S+/)
  end

  newproperty(:value) do
    desc 'The value of the setting to be defined.'
    munge do |value|
      value = value.to_s.strip
      value.capitalize! if value =~ /^(true|false)$/i
      value
    end
  end

  newparam(:ensure_absent_val) do
    desc 'A value that is specified as the value property will behave as if ensure => absent was specified'
    defaultto('<SERVICE DEFAULT>')
  end

  autorequire(:package) do
    'networking-vpp'
  end

end