]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - 3rdparty/modules/nova/lib/puppet/provider/nova_config/ini_setting.rb
try again, with puppetforge modules, correctly included now
[dsa-puppet.git] / 3rdparty / modules / nova / lib / puppet / provider / nova_config / ini_setting.rb
diff --git a/3rdparty/modules/nova/lib/puppet/provider/nova_config/ini_setting.rb b/3rdparty/modules/nova/lib/puppet/provider/nova_config/ini_setting.rb
new file mode 100644 (file)
index 0000000..85b90a7
--- /dev/null
@@ -0,0 +1,32 @@
+Puppet::Type.type(:nova_config).provide(
+  :ini_setting,
+  :parent => Puppet::Type.type(:ini_setting).provider(:ruby)
+) do
+
+  # the setting is always default
+  # this if for backwards compat with the old puppet providers for nova_config
+  def section
+    resource[:name].split('/', 2)[0]
+  end
+
+  # assumes that the name was the setting
+  # this is to maintain backwards compat with the the older
+  # stuff
+  def setting
+    resource[:name].split('/', 2)[1]
+  end
+
+  def separator
+    '='
+  end
+
+  def self.file_path
+    '/etc/nova/nova.conf'
+  end
+
+  # this needs to be removed. This has been replaced with the class method
+  def file_path
+    self.class.file_path
+  end
+
+end