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

@ -45,7 +45,9 @@ class Utils
result = {}
response_body.each do |os, value|
STDOUT.puts "response body is #{response_body}"
filtered_response_body = response_body.reject { |key, _| key == 'request_id' || key == 'ready' }
filtered_response_body.each do |os, value|
hostnames = Array(value['hostname'])
hostnames.map! { |host| "#{host}.#{domain}" } if domain
result[os] = hostnames