mirror of
https://github.com/OpenNebula/one.git
synced 2025-08-14 05:49:26 +03:00
L #-: Rubocop 1.70.0
This commit is contained in:
@ -23,6 +23,7 @@ AllCops:
|
||||
TargetRubyVersion: 2.5.9
|
||||
Exclude:
|
||||
- /**/*.schema
|
||||
- src/onecfg/lib/config/type/yaml.rb
|
||||
- src/sunstone/public/node_modules/**/*
|
||||
- src/vnm_mad/remotes/vcenter/vnet_create
|
||||
- src/vnm_mad/remotes/vcenter/vnet_delete
|
||||
@ -801,6 +802,9 @@ Style/SuperArguments:
|
||||
# LINT
|
||||
######
|
||||
|
||||
Lint/ConstantResolution:
|
||||
Enabled: false
|
||||
|
||||
Lint/IneffectiveAccessModifier:
|
||||
Enabled: false
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
require 'yaml'
|
||||
|
||||
# rubocop:disable Lint/ConstantResolution
|
||||
# rubocop:disable Style/ClassAndModuleChildren
|
||||
module OneCfg::Config::Type
|
||||
|
||||
@ -284,8 +285,9 @@ module OneCfg::Config::Type
|
||||
|
||||
if di1 && di2
|
||||
# skip
|
||||
# rubocop:disable Lint/void
|
||||
nil
|
||||
|
||||
# rubocop:enable Lint/void
|
||||
elsif di1
|
||||
# delete array item
|
||||
ret << {
|
||||
@ -716,3 +718,4 @@ module OneCfg::Config::Type
|
||||
|
||||
end
|
||||
# rubocop:enable Style/ClassAndModuleChildren
|
||||
# rubocop:enable Lint/ConstantResolution
|
||||
|
@ -1041,10 +1041,8 @@ module VCenterDriver
|
||||
:template_id=> vm_id
|
||||
}
|
||||
|
||||
if nic[:pg_type] ==
|
||||
VCenterDriver::Network::NETWORK_TYPE_NSXV ||
|
||||
nic[:pg_type] ==
|
||||
VCenterDriver::Network::NETWORK_TYPE_NSXT
|
||||
if [VCenterDriver::Network::NETWORK_TYPE_NSXV,
|
||||
VCenterDriver::Network::NETWORK_TYPE_NSXT].include?(nic[:pg_type])
|
||||
import_opts[:nsx_id] = config[:nsx_id]
|
||||
import_opts[:nsx_vni] = config[:nsx_vni]
|
||||
import_opts[:nsx_tz_id] = config[:nsx_tz_id]
|
||||
|
@ -76,7 +76,7 @@ class EquinixProvider
|
||||
|
||||
# HTTP 422 is returned if IP already assigned to the device
|
||||
# e.g. VM poweroff from inside + onevm resume
|
||||
unless resp.code == '201' || resp.code == '422'
|
||||
unless ['201', '422'].include?(resp.code)
|
||||
STDERR.puts "Error assigning #{external}:#{resp.message}"
|
||||
return 1
|
||||
end
|
||||
|
@ -89,7 +89,7 @@ class ScalewayProvider
|
||||
fip_req)
|
||||
|
||||
# HTTP 409 is returned if IP is being assigned to the device
|
||||
unless resp.code == '200' || resp.code == '409'
|
||||
unless ['200', '409'].include?(resp.code)
|
||||
STDERR.puts "Error assigning #{external}:#{resp.message}"
|
||||
return 1
|
||||
end
|
||||
@ -117,7 +117,7 @@ class ScalewayProvider
|
||||
fip_req)
|
||||
|
||||
# HTTP 409 is returned if IP is being unassigned to the device
|
||||
unless resp.code == '200' || resp.code == '409'
|
||||
unless ['200', '409'].include?(resp.code)
|
||||
STDERR.puts "Error unassigning #{external}:#{resp.message}"
|
||||
return 1
|
||||
end
|
||||
|
Reference in New Issue
Block a user