exoscale.compute.api.vm

Higher order functions to manipulate VMs

by-name

(by-name config vm)

The infamous name resolver, using listVirtualMachines since Cloudstack does not allow singular get calls

deploy

(deploy config params)

Deploy virtual machine

destroy

(destroy config target)

Destroy virtual machine

ensure-up

(ensure-up config target timeout)

Wait for machine to be up by probbing the SSH port. This assumes that inbound SSH is authorized

get-password

(get-password config target)

Fetch encrypted password

list

(list config & [params])

List virtual machines

reboot

(reboot config target & [params])

Reboot virtual machine.

reset-password

(reset-password config target & [params])

Reset-password virtual machine.

resolve-id

(resolve-id config target)

Yield a target VM id from a target definition (name, ID, or vm return)

resolve-indirect-params

(resolve-indirect-params config {:keys [zoneid zone serviceoffering template]})

sanitize-ag

(sanitize-ag group)

Parse affinitygroup UUID

sanitize-nic

(sanitize-nic {:keys [macaddress ipaddress ip6address], :as nic})

Keep relevant information for public NICs. We do not keep network IDs and name since this isn’t actionable information.

sanitize-nics

(sanitize-nics nics)

Keep relevant information for private network NICs

sanitize-public

(sanitize-public nics)

Filter out public NIC and show relevant information

sanitize-sg

(sanitize-sg {:keys [id name]})

Keep relevant information for security groups

sanitize-template

(sanitize-template {:keys [templatename templateid]})

Rewrite template information to contain UUIDs

sanitize-vm

(sanitize-vm resp)

Coerce API response into something a bit more useful

ssh

(ssh config target command)

Asynchronously reach out to a machine to execute an ssh command

start

(start config target & [params])

Start virtual machine.

stop

(stop config target & [params])

Stop virtual machine.

update

(update config target & [params])

Update virtual machine.

vmdef?

(vmdef? x)

Predicate to test against a valid VM definition