puppet-vitrage/lib/puppet/provider/vitrage_api_paste_ini/ini_setting.rb
ZhongShengping 089ea93ee1 Fix filename of api-paste.ini
Change-Id: I7507c81948b14705c79cf0b11ae362ce79b5504e
Closes-Bug: #1706473
2017-07-26 09:31:51 +08:00

28 lines
468 B
Ruby

Puppet::Type.type(:vitrage_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/vitrage/api-paste.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end