fix rubocop offenses

This commit is contained in:
Samuel Beaulieu 2022-07-28 09:13:38 -05:00
parent 4df7c2b746
commit b563239e76
No known key found for this signature in database
GPG key ID: 12030F74136D0F34

View file

@ -64,23 +64,26 @@ module Vmpooler
# main configuration options # main configuration options
def region def region
provider_config['region'] if provider_config['region'] provider_config['region']
end end
# main configuration options, overridable for each pool # main configuration options, overridable for each pool
def zone(pool_name) def zone(pool_name)
return pool_config(pool_name)['zone'] if pool_config(pool_name)['zone'] return pool_config(pool_name)['zone'] if pool_config(pool_name)['zone']
provider_config['zone'] if provider_config['zone']
provider_config['zone']
end end
def amisize(pool_name) def amisize(pool_name)
return pool_config(pool_name)['amisize'] if pool_config(pool_name)['amisize'] return pool_config(pool_name)['amisize'] if pool_config(pool_name)['amisize']
provider_config['amisize'] if provider_config['amisize']
provider_config['amisize']
end end
def volume_size(pool_name) def volume_size(pool_name)
return pool_config(pool_name)['volume_size'] if pool_config(pool_name)['volume_size'] return pool_config(pool_name)['volume_size'] if pool_config(pool_name)['volume_size']
provider_config['volume_size'] if provider_config['volume_size']
provider_config['volume_size']
end end
# dns # dns
@ -107,7 +110,7 @@ module Vmpooler
end end
def to_provision(pool_name) def to_provision(pool_name)
pool_config(pool_name)['provision'] if pool_config(pool_name)['provision'] pool_config(pool_name)['provision']
end end
# Base methods that are implemented: # Base methods that are implemented:
@ -434,10 +437,10 @@ module Vmpooler
return false if instances.nil? return false if instances.nil?
# add new label called token-user, with value as user # add new label called token-user, with value as user
instances.create_tags(tags:[key:"token-user", value: user]) instances.create_tags(tags: [key: 'token-user', value: user])
true true
rescue StandardError => _e rescue StandardError => _e
return false false
end end
# END BASE METHODS # END BASE METHODS