mirror of
https://github.com/OpenNebula/one.git
synced 2026-12-04 22:21:36 +09:00
L #-: Locally disabling global var checks
for shared $conf
This commit is contained in:
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)
|
||||
|
||||
Reference in new issue
Block a user