
This massive code commit actually implements something very simple. previously, we allowed nova_config to omit a section and assumed that section was default. This commit updates the code to require section names for all settings. This change is being made b/c: - it better maps to the config on disk - it is consistent with the other modules Change-Id: Iae71a4c48ed0f9792566f16f0bf13e61569b46e5
33 lines
677 B
Ruby
33 lines
677 B
Ruby
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
|