fix rubocoop offences

This commit is contained in:
Samuel Beaulieu 2022-07-25 08:59:12 -05:00
parent f5866d51b6
commit c846e41780
No known key found for this signature in database
GPG key ID: 12030F74136D0F34
2 changed files with 8 additions and 7 deletions

View file

@ -66,6 +66,7 @@ Style/Next:
Enabled: false Enabled: false
Metrics/ParameterLists: Metrics/ParameterLists:
Max: 10 Max: 10
MaxOptionalParameters: 10
Style/GuardClause: Style/GuardClause:
Enabled: false Enabled: false

View file

@ -1596,19 +1596,19 @@ module Vmpooler
$config[:pools].each do |pool| $config[:pools].each do |pool|
provider_name = pool['provider'] provider_name = pool['provider']
# The provider_class parameter can be defined in the provider's data eg # The provider_class parameter can be defined in the provider's data eg
#:providers: # :providers:
# :vsphere: # :vsphere:
# provider_class: 'vsphere' # provider_class: 'vsphere'
# :another-vsphere: # :another-vsphere:
# provider_class: 'vsphere' # provider_class: 'vsphere'
# the above would create two providers/vsphere.rb class objects named 'vsphere' and 'another-vsphere' # the above would create two providers/vsphere.rb class objects named 'vsphere' and 'another-vsphere'
# each pools would then define which provider definition to use: vsphere or another-vsphere # each pools would then define which provider definition to use: vsphere or another-vsphere
# #
# if provider_class is not defined it will try to use the provider_name as the class, this is to be # if provider_class is not defined it will try to use the provider_name as the class, this is to be
# backwards compatible for example when there is only one provider listed # backwards compatible for example when there is only one provider listed
# :providers: # :providers:
# :dummy: # :dummy:
# filename: 'db.txs' # filename: 'db.txs'
# the above example would create an object based on the class providers/dummy.rb # the above example would create an object based on the class providers/dummy.rb
if $config[:providers].nil? || $config[:providers][provider_name.to_sym].nil? || $config[:providers][provider_name.to_sym]['provider_class'].nil? if $config[:providers].nil? || $config[:providers][provider_name.to_sym].nil? || $config[:providers][provider_name.to_sym]['provider_class'].nil?
provider_class = provider_name provider_class = provider_name