summaryrefslogtreecommitdiffstats
path: root/build/puppet-neutron/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'build/puppet-neutron/lib/puppet')
-rw-r--r--build/puppet-neutron/lib/puppet/provider/neutron_agent_vpp/ini_setting.rb15
-rw-r--r--build/puppet-neutron/lib/puppet/type/neutron_agent_vpp.rb28
2 files changed, 43 insertions, 0 deletions
diff --git a/build/puppet-neutron/lib/puppet/provider/neutron_agent_vpp/ini_setting.rb b/build/puppet-neutron/lib/puppet/provider/neutron_agent_vpp/ini_setting.rb
new file mode 100644
index 00000000..595904ce
--- /dev/null
+++ b/build/puppet-neutron/lib/puppet/provider/neutron_agent_vpp/ini_setting.rb
@@ -0,0 +1,15 @@
+Puppet::Type.type(:neutron_agent_vpp).provide(
+ :ini_setting,
+ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
+) do
+
+ def self.file_path
+ '/etc/neutron/plugins/ml2/vpp_agent.ini'
+ end
+
+ # added for backwards compatibility with older versions of inifile
+ def file_path
+ self.class.file_path
+ end
+
+end \ No newline at end of file
diff --git a/build/puppet-neutron/lib/puppet/type/neutron_agent_vpp.rb b/build/puppet-neutron/lib/puppet/type/neutron_agent_vpp.rb
new file mode 100644
index 00000000..f43a8b41
--- /dev/null
+++ b/build/puppet-neutron/lib/puppet/type/neutron_agent_vpp.rb
@@ -0,0 +1,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 \ No newline at end of file