Class: Puppet::Provider::Nova
- Inherits:
-
Openstack
- Object
- Openstack
- Puppet::Provider::Nova
- Extended by:
- Openstack::Auth
- Defined in:
- lib/puppet/provider/nova.rb
Class Method Summary collapse
- .conf_filename ⇒ Object
- .nova_conf ⇒ Object
- .nova_manage_request(*args) ⇒ Object
- .nova_user ⇒ Object
- .reset ⇒ Object
Instance Method Summary collapse
Class Method Details
.conf_filename ⇒ Object
32 33 34 |
# File 'lib/puppet/provider/nova.rb', line 32 def self.conf_filename '/etc/nova/nova.conf' end |
.nova_conf ⇒ Object
36 37 38 39 40 41 |
# File 'lib/puppet/provider/nova.rb', line 36 def self.nova_conf return @nova_conf if @nova_conf @nova_conf = Puppet::Util::IniConfig::File.new @nova_conf.read(conf_filename) @nova_conf end |
.nova_manage_request(*args) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/puppet/provider/nova.rb', line 9 def self.nova_manage_request(*args) # Not using the nova-manage command directly, # so we can disable combining of stderr/stdout output. args.unshift(Puppet::Util.which('nova-manage')) # NOTE(mnaser): We pass the arguments as an array to avoid problems with # symbols in the arguments breaking things. Puppet::Util::Execution.execute(args, { :uid => nova_user, :failonfail => true, :combine => false, :custom_environment => {} }) end |
.nova_user ⇒ Object
28 29 30 |
# File 'lib/puppet/provider/nova.rb', line 28 def self.nova_user 'nova' end |
.reset ⇒ Object
43 44 45 |
# File 'lib/puppet/provider/nova.rb', line 43 def self.reset @nova_conf = nil end |
Instance Method Details
#nova_manage_request(*args) ⇒ Object
24 25 26 |
# File 'lib/puppet/provider/nova.rb', line 24 def nova_manage_request(*args) self.class.nova_manage_request(args) end |