nanhai.liao 28426bab08 Add type/provider for paste configs
Co-Authored-By: Denis Egorenko <degorenko@mirantis.com>

Change-Id: I2ea1e2ee0eed241544d6e006306990d1db995ac7
Closes-bug: #1483371
2016-01-13 20:23:32 +03:00

28 lines
462 B
Ruby

Puppet::Type.type(:heat_api_paste_ini).provide(
:ini_setting,
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
) do
def section
resource[:name].split('/', 2).first
end
def setting
resource[:name].split('/', 2).last
end
def separator
'='
end
def self.file_path
'/etc/heat/api-paste.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end