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

attach_disk(region, instance, disk, device_name)

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’.

attach_disk!(region, instance, disk, 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.

create_disk(region, size)

Specs

create_disk(region :: binary, size :: integer) ::
  :ok |
  binary

Creates an empty persistent disk in the given ‘region’ with the specified ‘size’.

create_disk(region, size, image)

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’.

create_disk!(region, size)

Specs

create_disk!(region :: binary, size :: integer) :: HTTPoison.Response.t

Same as create_disk/2 but returns the complete HTTP reply.

create_disk!(region, size, image)

Specs

create_disk!(region :: binary, size :: integer, image :: binary) :: HTTPoison.Response.t

Same as create_disk/3 but returns the complete HTTP reply.

create_virtual_machine(region, class, image, auto_delete)

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.

create_virtual_machine!(region, class, image, auto_delete)

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.

delete_disk(region, disk)

Specs

delete_disk(region :: binary, disk :: binary) ::
  :ok |
  binary

Deletes the given ‘disk’ in the specified ‘region’.

delete_disk!(region, disk)

Specs

delete_disk!(region :: binary, disk :: binary) :: HTTPoison.Response.t

Same as delete_disk/2 but returns the complete HTTP reply.

delete_virtual_machine(region, instance)

Specs

delete_virtual_machine(region :: binary, instance :: binary) ::
  :ok |
  binary

Deletes the Virtual Machine ‘instance’ in the given ‘region’.

delete_virtual_machine!(region, instance)

Specs

delete_virtual_machine!(region :: binary, instance :: binary) :: HTTPoison.Response.t

Same as delete_virtual_machine/2 but returns the complete HTTP reply.

detach_disk(region, instance, disk)

Specs

detach_disk(region :: binary, instance :: binary, disk :: binary) ::
  :ok |
  binary

Detaches the given ‘disk’ from the ‘instance’.

detach_disk!(region, instance, disk)

Specs

detach_disk!(region :: binary, instance :: binary, disk :: binary) :: HTTPoison.Response.t

Same as detach_disk/3 but returns the complete HTTP reply.

get_disk(region, disk)

Specs

get_disk(region :: binary, disk :: binary) ::
  {binary, binary, binary, binary, binary} |
  binary

Returns the specified ‘disk’ name, size, image, status and type.

get_disk!(region, disk)

Specs

get_disk!(region :: binary, disk :: binary) :: HTTPoison.Response.t

Same as get_disk/2 but returns the complete HTTP reply.

get_virtual_machine(region, instance)

Specs

get_virtual_machine(region :: binary, instance :: binary) :: {binary, binary, binary, binary}

Returns the Virtal Machine ‘instance’ name, status, public IP and class.

get_virtual_machine!(region, instance)

Specs

get_virtual_machine!(region :: binary, instance :: binary) :: HTTPoison.Response.t

Same as get_virtual_machine/2 but returns the complete HTTP reply.

list_classes()

Specs

list_classes :: [binary]

Lists all available Virtual Machine classes.

list_disks(region)

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.

list_disks!(region)

Specs

list_disks!(region :: binary) :: HTTPoison.Response.t

Same as list_disks/1 but returns the complete HTTP reply.

list_regions()

Specs

list_regions :: [binary] | [{binary, [binary]}]

Lists all available regions (and their zones if possible).

list_regions!()

Specs

list_regions! :: HTTPoison.Response.t

Same as list_regions/0 but returns the complete HTTP reply.

list_virtual_machines(region)

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.

list_virtual_machines!(region)

Specs

list_virtual_machines!(region :: binary) :: HTTPoison.Response.t

Same as list_virtual_machines/1 but returns the complete HTTP reply.

reboot_virtual_machine(region, instance)

Specs

reboot_virtual_machine(region :: binary, instance :: binary) ::
  :ok |
  binary

Reboots the Virtual Machine ‘instance’ in the given ‘region’.

reboot_virtual_machine!(region, instance)

Specs

reboot_virtual_machine!(region :: binary, instance :: binary) :: HTTPoison.Response.t

Same as reboot_virtual_machine/2 but returns the complete HTTP reply.

set_virtual_machine_class(region, instance, class)

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.

set_virtual_machine_class!(region, instance, class)

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.

start_virtual_machine(region, instance)

Specs

start_virtual_machine(region :: binary, instance :: binary) ::
  :ok |
  binary

Starts the Virtual Machine ‘instance’ in the given ‘region’.

start_virtual_machine!(region, instance)

Specs

start_virtual_machine!(region :: binary, instance :: binary) :: HTTPoison.Response.t

Same as start_virtual_machine/2 but returns the complete HTTP reply.

stop_virtual_machine(region, instance)

Specs

stop_virtual_machine(region :: binary, instance :: binary) ::
  :ok |
  binary

Stops the Virtual Machine ‘instance’ in the given ‘region’.

stop_virtual_machine!(region, instance)

Specs

stop_virtual_machine!(region :: binary, instance :: binary) :: HTTPoison.Response.t

Same as stop_virtual_machine/2 but returns the complete HTTP reply.