L #-: Locally disabling global var checks

for shared $conf
This commit is contained in:
Tino Vazquez committed 2020-11-18 15:34:22 +01:00
1 parent 23a19e322f
commit 3aee222422
2 files changed
+6

No files matched your search

@@ -700,6 +700,7 @@ module VCenterDriver
network
end
# rubocop:disable Style/GlobalVars
def get_unimported_networks(npool, vcenter_instance_name, hpool, args)
vcenter_uuid = vcenter_instance_uuid
networks = {}
@@ -750,6 +751,7 @@ module VCenterDriver
networks.map {|_k, v| v[:import_id] = imid += 1 }
{ vcenter_instance_name => networks }
end
# rubocop:enable Style/GlobalVars
end
# class DatatacenterFolder
@@ -28,6 +28,8 @@ module VCenterDriver
VCENTER_DRIVER_DEFAULT = "#{ETC_LOCATION}/vcenter_driver.default"
VM_PREFIX_DEFAULT = 'one-$i-'
# rubocop:disable Style/GlobalVars
# rubocop:disable Style/ClassVars
def self.client
if $conf.nil?
@@client ||= OpenNebula::Client.new # rubocop:disable Style/ClassVars
@@ -38,6 +40,7 @@ module VCenterDriver
)
end
end
# rubocop:enable Style/GlobalVars
def self.set_client(options, client = nil)
if client.nil?
@@ -46,6 +49,7 @@ module VCenterDriver
@@client = client
end
end
# rubocop:enable Style/ClassVars
def self.return_if_error(rc, item, exit_if_fail)
if OpenNebula.is_error?(rc)