Set ini/openstack libs to pass file_path properly

Currently the file_path sections, of the ini_setting.rb's and
openstackconfig.rb's, are not being passed in the best way. When trying
to use ini_settings it throws an error stating "ini_settings only
support collecting instances when a file path is hard coded". Passing
the variables with the 'self.' alleviates this.

This is needed in order to be able to use the purge_config option.

  *Added backwards compatability for older versions of inifile
Change-Id: I9b09bf574208af5c044508129e41ec7420ac1f82
This commit is contained in:
Nathan A. Taylor 2016-04-06 13:01:17 -06:00
parent 98dce78cd7
commit 39698c4d62
27 changed files with 163 additions and 27 deletions

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_agent_linuxbridge).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/plugins/ml2/linuxbridge_agent.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_agent_ovs).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/plugins/ml2/openvswitch_agent.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_api_config).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/api-paste.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_config).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/neutron.conf'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_dhcp_agent_config).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/dhcp_agent.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_fwaas_service_config).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/fwaas_driver.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_l3_agent_config).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/l3_agent.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_lbaas_agent_config).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/lbaas_agent.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_lbaas_service_config).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ruby)
) do
def file_path
def self.file_path
'/etc/neutron/neutron_lbaas.conf'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_metadata_agent_config).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/metadata_agent.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_metering_agent_config).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/metering_agent.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_plugin_cisco).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/plugins/cisco/cisco_plugins.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_plugin_cisco_credentials).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/plugins/cisco/credentials.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_plugin_cisco_db_conn).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/plugins/cisco/db_conn.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_plugin_cisco_l2network).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/plugins/cisco/l2network_plugin.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_plugin_linuxbridge).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_plugin_midonet).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/plugins/midonet/midonet.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_plugin_ml2).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/plugins/ml2/ml2_conf.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,9 +3,14 @@ Puppet::Type.type(:neutron_plugin_nuage).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/plugins/nuage/plugin.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_plugin_nvp).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/plugins/nicira/nvp.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_plugin_opencontrail).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/plugins/opencontrail/ContrailPlugin.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_plugin_plumgrid).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/plugins/plumgrid/plumgrid.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_plugin_sriov).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/plugins/ml2/ml2_conf_sriov.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_plumlib_plumgrid).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/plugins/plumgrid/plumlib.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,7 +3,13 @@ Puppet::Type.type(:neutron_sriov_agent_config).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/plugins/ml2/sriov_agent.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_vpnaas_agent_config).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def file_path
def self.file_path
'/etc/neutron/vpn_agent.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -3,8 +3,13 @@ Puppet::Type.type(:neutron_vpnaas_service_config).provide(
:parent => Puppet::Type.type(:openstack_config).provider(:ruby)
) do
def file_path
def self.file_path
'/etc/neutron/neutron_vpnaas.conf'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end