mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-25 21:28:40 -05:00
Add info on vmpooler api urls
This commit is contained in:
parent
b14fdc6219
commit
75f2a212a4
1 changed files with 7 additions and 3 deletions
|
|
@ -4,12 +4,13 @@ require 'net/http'
|
||||||
class CLI < Thor
|
class CLI < Thor
|
||||||
desc "get <OPERATING SYSTEM,...> [--withpe]", "Gets a VM"
|
desc "get <OPERATING SYSTEM,...> [--withpe]", "Gets a VM"
|
||||||
option :withpe
|
option :withpe
|
||||||
def get(os)
|
def get(os_list)
|
||||||
|
# POST -d os_list vmpooler.company.com/vm
|
||||||
say "vmpooler: #{@vmpooler_url}"
|
say "vmpooler: #{@vmpooler_url}"
|
||||||
if options[:withpe]
|
if options[:withpe]
|
||||||
say "Get a #{os} VM here and provision with PE verison #{options[:withpe]}"
|
say "Get a #{os_list} VM here and provision with PE verison #{options[:withpe]}"
|
||||||
else
|
else
|
||||||
say "Get a #{os} VM here"
|
say "Get a #{os_list} VM here"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -25,6 +26,7 @@ class CLI < Thor
|
||||||
|
|
||||||
desc "list [PATTERN]", "List all open VMs"
|
desc "list [PATTERN]", "List all open VMs"
|
||||||
def list(pattern=nil)
|
def list(pattern=nil)
|
||||||
|
# HTTP GET vmpooler.company.com/vm
|
||||||
if pattern
|
if pattern
|
||||||
say "Filtering VMs based on #{pattern}"
|
say "Filtering VMs based on #{pattern}"
|
||||||
else
|
else
|
||||||
|
|
@ -34,6 +36,8 @@ class CLI < Thor
|
||||||
|
|
||||||
desc "release <HOSTNAME>", "Schedules a VM for deletion"
|
desc "release <HOSTNAME>", "Schedules a VM for deletion"
|
||||||
def release(hostname)
|
def release(hostname)
|
||||||
|
# HTTP DELETE vmpooler.company.com/vm/#{hostname}
|
||||||
|
# { "ok": true }
|
||||||
say 'Releases a VM'
|
say 'Releases a VM'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue