mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-27 05:48:41 -05:00
Abstract out getting all active token vms into Utils
This commit is contained in:
parent
2c9ce5644e
commit
586f4f5c05
4 changed files with 42 additions and 33 deletions
|
|
@ -79,4 +79,17 @@ class Utils
|
|||
puts "- #{vm}.#{domain} (#{metadata.join(", ")})"
|
||||
end
|
||||
end
|
||||
|
||||
def self.get_all_token_vms(verbose, url, token)
|
||||
# get vms with token
|
||||
status = Auth.token_status(verbose, url, token)
|
||||
|
||||
vms = status[token]['vms']
|
||||
if vms.nil?
|
||||
raise "You have no running vms"
|
||||
end
|
||||
|
||||
running_vms = vms['running']
|
||||
running_vms
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
class Version
|
||||
@version = '0.7.1'
|
||||
@version = '0.7.2'
|
||||
|
||||
def self.get
|
||||
@version
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue