mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-11 04:58:16 +03:00
L #-: Linting for new rubocop version
This commit is contained in:
parent
50cd668765
commit
4fe742b863
@ -27,7 +27,7 @@ RG_SETUP_END = '%%RUBYGEMS_SETUP_END%%'
|
||||
# Bundled Ruby gems loader code.
|
||||
# IMPORTANT: Update here and commit into Git as well!
|
||||
# rubocop:disable Layout/HeredocIndentation
|
||||
RG_SETUP = <<-'EOT'
|
||||
RG_SETUP = <<-EOT
|
||||
if File.directory?(GEMS_LOCATION)
|
||||
real_gems_path = File.realpath(GEMS_LOCATION)
|
||||
if !defined?(Gem) || Gem.path != [real_gems_path]
|
||||
|
@ -152,7 +152,7 @@ one_client = OpenNebula::Client.new(token)
|
||||
# Create backup object templates for VM and associated disk images
|
||||
# Monkey patch REXML::DOCUMENT to respond to []
|
||||
# ------------------------------------------------------------------------------
|
||||
rds.define_singleton_method('[]'){|xpath| self.elements[xpath].text }
|
||||
rds.define_singleton_method('[]') {|xpath| elements[xpath].text }
|
||||
|
||||
restorer = TransferManager::BackupRestore.new(
|
||||
:vm_xml64 => vm_xml,
|
||||
|
@ -388,7 +388,7 @@ module OneCfg::Config::Type
|
||||
def self.run_shell_command((*cmd), stdin = nil)
|
||||
rtn = nil
|
||||
|
||||
if Hash == cmd.last
|
||||
if cmd.last == Hash
|
||||
opts = cmd.pop.dup
|
||||
else
|
||||
opts = {}
|
||||
|
@ -576,7 +576,9 @@ CommandParser::CmdParser.new(ARGV) do
|
||||
end
|
||||
rescue StandardError => e
|
||||
puts e.message
|
||||
# rubocop:disable Lint/Debugger
|
||||
pp e.backtrace
|
||||
# rubocop:enable Lint/Debugger
|
||||
[-1, e.message]
|
||||
end
|
||||
|
||||
@ -604,7 +606,9 @@ CommandParser::CmdParser.new(ARGV) do
|
||||
end
|
||||
rescue StandardError => e
|
||||
puts e.name
|
||||
# rubocop:disable Lint/Debugger
|
||||
pp e.backtrace
|
||||
# rubocop:enable Lint/Debugger
|
||||
[-1, e.message]
|
||||
end
|
||||
|
||||
|
@ -110,7 +110,7 @@ module OneProvision
|
||||
rtn = nil
|
||||
|
||||
begin
|
||||
if Hash == cmd.last
|
||||
if cmd.last == Hash
|
||||
opts = cmd.pop.dup
|
||||
else
|
||||
opts = {}
|
||||
|
@ -197,10 +197,10 @@ module TransferManager
|
||||
|
||||
@base_url = "#{opts[:proto]}://#{opts[:ds_id]}/#{chain}"
|
||||
|
||||
if no_ip
|
||||
NIC_LIST << %w[IP IP6 IP6_ULA IP6_GLOBAL]
|
||||
NIC_LIST.flatten!
|
||||
end
|
||||
return unless no_ip
|
||||
|
||||
NIC_LIST << ['IP', 'IP6', 'IP6_ULA', 'IP6_GLOBAL']
|
||||
NIC_LIST.flatten!
|
||||
end
|
||||
|
||||
# Creates Image templates for the backup disks.
|
||||
|
@ -1126,7 +1126,7 @@ end
|
||||
when OPAQUE_CARD.to_s
|
||||
# Select only Opaque Networks
|
||||
opaque_networks = @item.network.select do |net|
|
||||
RbVmomi::VIM::OpaqueNetwork == net.class
|
||||
net.class == RbVmomi::VIM::OpaqueNetwork
|
||||
end
|
||||
opaque_network = opaque_networks.find do |opn|
|
||||
backing.opaqueNetworkId == opn.summary.opaqueNetworkId
|
||||
@ -1296,7 +1296,7 @@ end
|
||||
when OPAQUE_CARD.to_s
|
||||
# Select only Opaque Networks
|
||||
opaque_networks = @item.network.select do |net|
|
||||
RbVmomi::VIM::OpaqueNetwork == net.class
|
||||
net.class == RbVmomi::VIM::OpaqueNetwork
|
||||
end
|
||||
opaque_network = opaque_networks.find do |opn|
|
||||
nic.backing.opaqueNetworkId ==
|
||||
|
Loading…
x
Reference in New Issue
Block a user