Add support for ondemand provisioning to vmfloaty

This commit adds support for provisioning instances on demand with
vmpooler. Additionally, this change adds a capability to detect on
demand pools available in ABS. Without this change vmfloaty does not
support provisioning instances via the vmpooler ondemand endpoints.
This commit is contained in:
kirby@puppetlabs.com 2020-05-22 15:36:21 -07:00
parent 482d4328d1
commit 05a133fc72
6 changed files with 78 additions and 9 deletions

View file

@ -75,10 +75,14 @@ class Service
@service_object.list_active verbose, url, token, user
end
def retrieve(verbose, os_types, use_token = true)
def retrieve(verbose, os_types, use_token = true, ondemand = nil)
puts 'Requesting a vm without a token...' unless use_token
token_value = use_token ? token : nil
@service_object.retrieve verbose, os_types, token_value, url, user, @config
@service_object.retrieve verbose, os_types, token_value, url, user, @config, ondemand
end
def wait_for_request(verbose, requestid)
@service_object.wait_for_request verbose, requestid, url
end
def ssh(verbose, host_os, use_token = true)