nomad v0.7.1 NomadVirtualMachines behaviour
Summary
Callbacks
Attaches the given ‘disk’ to the specified ‘instance’ and with the provided ‘device_name’
Same as attach_disk/4 but returns the complete HTTP reply
Creates an empty persistent disk in the given ‘region’ with the specified ‘size’
Creates a bootable disk in the given ‘region’ with the specified ‘size’ and ‘image’
Same as create_disk/2 but returns the complete HTTP reply
Same as create_disk/3 but returns the complete HTTP reply
Creates a new Virtual Machine in the given ‘region’ using the provided ‘class’, ‘image’ and ‘auto_delete’ behaviour
Same as create_virtual_machine/4 but returns the complete HTTP reply
Deletes the given ‘disk’ in the specified ‘region’
Same as delete_disk/2 but returns the complete HTTP reply
Deletes the Virtual Machine ‘instance’ in the given ‘region’
Same as delete_virtual_machine/2 but returns the complete HTTP reply
Detaches the given ‘disk’ from the ‘instance’
Same as detach_disk/3 but returns the complete HTTP reply
Returns the specified ‘disk’ name, size, image, status and type
Same as get_disk/2 but returns the complete HTTP reply
Returns the Virtal Machine ‘instance’ name, status, public IP and class
Same as get_virtual_machine/2 but returns the complete HTTP reply
Lists all available Virtual Machine classes
Lists all disks in the given ‘region’ indicating their names, sizes, images, statuses and types
Same as list_disks/1 but returns the complete HTTP reply
Lists all available regions (and their zones if possible)
Same as list_regions/0 but returns the complete HTTP reply
Lists all Virtual Machines in the given ‘region’ with their names, status, class and public IP
Same as list_virtual_machines/1 but returns the complete HTTP reply
Reboots the Virtual Machine ‘instance’ in the given ‘region’
Same as reboot_virtual_machine/2 but returns the complete HTTP reply
Sets the Virtual Machine ‘instance’ in the given ‘region’ to the specified ‘class’ if possible
Same as set_virtual_machine_class/3 but returns the complete HTTP reply
Starts the Virtual Machine ‘instance’ in the given ‘region’
Same as start_virtual_machine/2 but returns the complete HTTP reply
Stops the Virtual Machine ‘instance’ in the given ‘region’
Same as stop_virtual_machine/2 but returns the complete HTTP reply
Callbacks
Specs
attach_disk(region :: binary, instance :: binary, disk :: binary, device_name :: binary) ::
:ok |
binary
Attaches the given ‘disk’ to the specified ‘instance’ and with the provided ‘device_name’.
Specs
attach_disk!(region :: binary, instance :: binary, disk :: binary, device_name :: binary) :: HTTPoison.Response.t
Same as attach_disk/4 but returns the complete HTTP reply.
Specs
create_disk(region :: binary, size :: integer) ::
:ok |
binary
Creates an empty persistent disk in the given ‘region’ with the specified ‘size’.
Specs
create_disk(region :: binary, size :: integer, image :: binary) ::
:ok |
binary
Creates a bootable disk in the given ‘region’ with the specified ‘size’ and ‘image’.
Specs
create_disk!(region :: binary, size :: integer) :: HTTPoison.Response.t
Same as create_disk/2 but returns the complete HTTP reply.
Specs
create_disk!(region :: binary, size :: integer, image :: binary) :: HTTPoison.Response.t
Same as create_disk/3 but returns the complete HTTP reply.
Specs
create_virtual_machine(region :: binary, class :: binary, image :: binary, auto_delete :: boolean) ::
:ok |
binary
Creates a new Virtual Machine in the given ‘region’ using the provided ‘class’, ‘image’ and ‘auto_delete’ behaviour.
Specs
create_virtual_machine!(region :: binary, class :: binary, image :: binary, auto_delete :: boolean) :: HTTPoison.Response.t
Same as create_virtual_machine/4 but returns the complete HTTP reply.
Specs
delete_disk(region :: binary, disk :: binary) ::
:ok |
binary
Deletes the given ‘disk’ in the specified ‘region’.
Specs
delete_disk!(region :: binary, disk :: binary) :: HTTPoison.Response.t
Same as delete_disk/2 but returns the complete HTTP reply.
Specs
delete_virtual_machine(region :: binary, instance :: binary) ::
:ok |
binary
Deletes the Virtual Machine ‘instance’ in the given ‘region’.
Specs
delete_virtual_machine!(region :: binary, instance :: binary) :: HTTPoison.Response.t
Same as delete_virtual_machine/2 but returns the complete HTTP reply.
Specs
detach_disk(region :: binary, instance :: binary, disk :: binary) ::
:ok |
binary
Detaches the given ‘disk’ from the ‘instance’.
Specs
detach_disk!(region :: binary, instance :: binary, disk :: binary) :: HTTPoison.Response.t
Same as detach_disk/3 but returns the complete HTTP reply.
Specs
get_disk(region :: binary, disk :: binary) ::
{binary, binary, binary, binary, binary} |
binary
Returns the specified ‘disk’ name, size, image, status and type.
Specs
get_disk!(region :: binary, disk :: binary) :: HTTPoison.Response.t
Same as get_disk/2 but returns the complete HTTP reply.
Specs
get_virtual_machine(region :: binary, instance :: binary) :: {binary, binary, binary, binary}
Returns the Virtal Machine ‘instance’ name, status, public IP and class.
Specs
get_virtual_machine!(region :: binary, instance :: binary) :: HTTPoison.Response.t
Same as get_virtual_machine/2 but returns the complete HTTP reply.
Specs
list_disks(region :: binary) ::
[{binary, binary, binary, binary, binary}] |
binary
Lists all disks in the given ‘region’ indicating their names, sizes, images, statuses and types.
Specs
list_disks!(region :: binary) :: HTTPoison.Response.t
Same as list_disks/1 but returns the complete HTTP reply.
Specs
list_regions :: [binary] | [{binary, [binary]}]
Lists all available regions (and their zones if possible).
Specs
list_regions! :: HTTPoison.Response.t
Same as list_regions/0 but returns the complete HTTP reply.
Specs
list_virtual_machines(region :: binary) ::
[{binary, binary, binary, binary}] |
binary
Lists all Virtual Machines in the given ‘region’ with their names, status, class and public IP.
Specs
list_virtual_machines!(region :: binary) :: HTTPoison.Response.t
Same as list_virtual_machines/1 but returns the complete HTTP reply.
Specs
reboot_virtual_machine(region :: binary, instance :: binary) ::
:ok |
binary
Reboots the Virtual Machine ‘instance’ in the given ‘region’.
Specs
reboot_virtual_machine!(region :: binary, instance :: binary) :: HTTPoison.Response.t
Same as reboot_virtual_machine/2 but returns the complete HTTP reply.
Specs
set_virtual_machine_class(region :: binary, instance :: binary, class :: binary) ::
:ok |
binary
Sets the Virtual Machine ‘instance’ in the given ‘region’ to the specified ‘class’ if possible.
Specs
set_virtual_machine_class!(region :: binary, instance :: binary, class :: binary) :: HTTPoison.Response.t
Same as set_virtual_machine_class/3 but returns the complete HTTP reply.
Specs
start_virtual_machine(region :: binary, instance :: binary) ::
:ok |
binary
Starts the Virtual Machine ‘instance’ in the given ‘region’.
Specs
start_virtual_machine!(region :: binary, instance :: binary) :: HTTPoison.Response.t
Same as start_virtual_machine/2 but returns the complete HTTP reply.
Specs
stop_virtual_machine(region :: binary, instance :: binary) ::
:ok |
binary
Stops the Virtual Machine ‘instance’ in the given ‘region’.