Put neutron provider commands in neutron.rb

This allows to gain access to all neutron commands using composability,
see[1] for an example.  It removes some redundancy as well.  Finally, it
looks more like the openstacklib/**/openstack.rb provider code.

[1] https://review.openstack.org/#/c/347468/

Change-Id: Iad0354f5babd86822e37053f3f7a1134803fd4f8
This commit is contained in:
Sofer Athlan-Guyot 2016-07-27 21:17:28 +02:00
parent 5c12847420
commit 8a85bb0860
6 changed files with 3 additions and 10 deletions

View File

@ -3,6 +3,9 @@ require 'puppet/util/inifile'
class Puppet::Provider::Neutron < Puppet::Provider
initvars
commands :neutron => 'neutron'
def self.conf_filename
'/etc/neutron/neutron.conf'
end

View File

@ -11,8 +11,6 @@ Puppet::Type.type(:neutron_network).provide(
Assumes that the neutron service is configured on the same host.
EOT
commands :neutron => 'neutron'
mk_resource_methods
def self.neutron_type

View File

@ -12,8 +12,6 @@ Puppet::Type.type(:neutron_port).provide(
EOT
#TODO No security group support
commands :neutron => "neutron"
mk_resource_methods
def self.instances

View File

@ -11,8 +11,6 @@ Puppet::Type.type(:neutron_router).provide(
Assumes that the neutron service is configured on the same host.
EOT
commands :neutron => 'neutron'
mk_resource_methods
def self.do_not_manage

View File

@ -17,8 +17,6 @@ Puppet::Type.type(:neutron_router_interface).provide(
EOT
commands :neutron => 'neutron'
mk_resource_methods
def self.instances

View File

@ -12,8 +12,6 @@ Puppet::Type.type(:neutron_subnet).provide(
Assumes that the neutron service is configured on the same host.
EOT
commands :neutron => 'neutron'
mk_resource_methods
def self.neutron_type