mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
Remove duplicated return statements
This commit removes two duplicate return statements in both branches of a conditional with one return statement outside the conditional blocks.
This commit is contained in:
parent
ed88fb1302
commit
392232fb6a
1 changed files with 2 additions and 2 deletions
|
|
@ -242,7 +242,6 @@ module Vmpooler
|
||||||
target[dc]['hosts'].delete(host)
|
target[dc]['hosts'].delete(host)
|
||||||
target[dc]['hosts'] << host
|
target[dc]['hosts'] << host
|
||||||
end
|
end
|
||||||
return host
|
|
||||||
else
|
else
|
||||||
raise("there is no candidate in vcenter that meets all the required conditions, that the cluster has available hosts in a 'green' status, not in maintenance mode and not overloaded CPU and memory") unless target[dc].key?('hosts')
|
raise("there is no candidate in vcenter that meets all the required conditions, that the cluster has available hosts in a 'green' status, not in maintenance mode and not overloaded CPU and memory") unless target[dc].key?('hosts')
|
||||||
|
|
||||||
|
|
@ -251,8 +250,9 @@ module Vmpooler
|
||||||
target[dc]['architectures'].each do |arch|
|
target[dc]['architectures'].each do |arch|
|
||||||
target[dc]['architectures'][arch] = arch.partition { |v| v != host }.flatten if arch.include?(host)
|
target[dc]['architectures'][arch] = arch.partition { |v| v != host }.flatten if arch.include?(host)
|
||||||
end
|
end
|
||||||
return host
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return host
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue