Add ondemand flag and api v2 support to floaty ssh

This commit is contained in:
Jake Spain 2022-04-04 08:57:23 -04:00
parent 4103fdeccc
commit 667dacbcea
No known key found for this signature in database
GPG key ID: BC1C4DA0A085E113
4 changed files with 115 additions and 34 deletions

View file

@ -87,7 +87,7 @@ class Service
@service_object.wait_for_request verbose, requestid, url
end
def ssh(verbose, host_os, use_token = true)
def ssh(verbose, host_os, use_token = true, ondemand = nil)
token_value = nil
if use_token
begin
@ -97,7 +97,7 @@ class Service
FloatyLogger.info 'Could not get token... requesting vm without a token anyway...'
end
end
Ssh.ssh(verbose, self, host_os, token_value)
Ssh.ssh(verbose, self, host_os, token_value, ondemand)
end
def query(verbose, hostname)