7f00f1c1bb
Add magnum_api_paste_ini type/provider for magnum. Also add ability to custom options to api_paste.ini in config.pp. Add and update related unit tests. Closes-Bug:1483371 Change-Id: I02ca8e8486b68009660c98ace943e6c0bf3dd9ea
28 lines
466 B
Ruby
28 lines
466 B
Ruby
Puppet::Type.type(:magnum_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/magnum/api-paste.ini'
|
|
end
|
|
|
|
# added for backwards compatibility with older versions of inifile
|
|
def file_path
|
|
self.class.file_path
|
|
end
|
|
|
|
end
|