mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 05:28:40 -05:00
(rubocop) Fix Layout/SpaceInsideBlockBraces
This commit is contained in:
parent
b16e3fc792
commit
7cd0256a97
2 changed files with 5 additions and 5 deletions
|
|
@ -51,7 +51,7 @@ class Vmfloaty
|
|||
os_types = Utils.generate_os_hash(args)
|
||||
|
||||
max_pool_request = 5
|
||||
large_pool_requests = os_types.select{|_,v| v > max_pool_request}
|
||||
large_pool_requests = os_types.select{ |_,v| v > max_pool_request }
|
||||
if ! large_pool_requests.empty? && ! force
|
||||
STDERR.puts "Requesting vms over #{max_pool_request} requires a --force flag."
|
||||
STDERR.puts 'Try again with `floaty get --force`'
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class Utils
|
|||
|
||||
response_body.each do |os, value|
|
||||
hostnames = Array(value['hostname'])
|
||||
hostnames.map! {|host| "#{host}.#{domain}"} if domain
|
||||
hostnames.map! { |host| "#{host}.#{domain}" } if domain
|
||||
result[os] = hostnames
|
||||
end
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ class Utils
|
|||
when 'Pooler'
|
||||
tag_pairs = []
|
||||
unless host_data['tags'].nil?
|
||||
tag_pairs = host_data['tags'].map {|key, value| "#{key}: #{value}"}
|
||||
tag_pairs = host_data['tags'].map { |key, value| "#{key}: #{value}" }
|
||||
end
|
||||
duration = "#{host_data['running']}/#{host_data['lifetime']} hours"
|
||||
metadata = [host_data['template'], duration, *tag_pairs]
|
||||
|
|
@ -117,7 +117,7 @@ class Utils
|
|||
when 'Pooler'
|
||||
message = status_response['status']['message']
|
||||
pools = status_response['pools']
|
||||
pools.select! {|_, pool| pool['ready'] < pool['max']} unless verbose
|
||||
pools.select! { |_, pool| pool['ready'] < pool['max'] } unless verbose
|
||||
|
||||
width = pools.keys.map(&:length).max
|
||||
pools.each do |name, pool|
|
||||
|
|
@ -136,7 +136,7 @@ class Utils
|
|||
when 'NonstandardPooler'
|
||||
pools = status_response
|
||||
pools.delete 'ok'
|
||||
pools.select! {|_, pool| pool['available_hosts'] < pool['total_hosts']} unless verbose
|
||||
pools.select! { |_, pool| pool['available_hosts'] < pool['total_hosts'] } unless verbose
|
||||
|
||||
width = pools.keys.map(&:length).max
|
||||
pools.each do |name, pool|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue