mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Signed-off-by: Carlos Herrera <cherrera@opennebula.io>
This commit is contained in:
parent
fd03fafb8f
commit
766f0f86fa
@ -557,7 +557,14 @@ class DatacenterFolder
|
||||
networks = {}
|
||||
|
||||
# Selected host in OpenNebula
|
||||
one_client = OpenNebula::Client.new(nil, $conf[:one_xmlrpc])
|
||||
if $conf.nil?
|
||||
one_client = OpenNebula::Client.new
|
||||
else
|
||||
one_client = OpenNebula::Client.new(
|
||||
nil,
|
||||
$conf[:one_xmlrpc]
|
||||
)
|
||||
end
|
||||
|
||||
one_host = OpenNebula::Host.new_with_id(args[:host], one_client)
|
||||
rc = one_host.info
|
||||
|
@ -23,7 +23,14 @@ class VIHelper
|
||||
VM_PREFIX_DEFAULT = "one-$i-"
|
||||
|
||||
def self.client
|
||||
@@client ||= OpenNebula::Client.new(nil, $conf[:one_xmlrpc]) # rubocop:disable Style/ClassVars
|
||||
if $conf.nil?
|
||||
@@client ||= OpenNebula::Client.new # rubocop:disable Style/ClassVars
|
||||
else
|
||||
@@client ||= OpenNebula::Client.new(
|
||||
nil,
|
||||
$conf[:one_xmlrpc]
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def self.set_client(options, client=nil)
|
||||
|
Loading…
x
Reference in New Issue
Block a user