The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::Gandi::Hosting::VM - Vm interface

VERSION

version 1.121850

ATTRIBUTES

id

rw, Int. Id of the vm.

METHODS

list

  $vm->list;

List virtual machines.

  input: opts (HashRef) : Filtering options
  output: (HashRef)     : List of vm

count

  $vm->count;

Count virtual machines.

  input: opts (HashRef) : Filtering options
  output: (Int)         : count of vm

info

  $vm->info

Get information about a virtual machine.

  input: None
  output: (HashRef) : Vm informations

create

Create a new virtual machine with respect to the attributes specified by vm_spec. Disk, iface, and vm must be in the same datacenter.

  input: vm_spec (HashRef)   : specifications of the VM to create
  output: (ArrayRef)         : Operation vm create and iface create

create_from

Create a disk and a virtual machine. This is a convenient method to do the disk.create and vm.create in a single API call.

  input: vm_spec (HashRef)   : specifications of the VM to create
         disk_spec (HashRef) : specifications of the Disk to create
         src_disk_id (Int)   : source disk unique identifier
  output: (ArrayRef)         : Operation vm create, disk create, and iface create

update

  $vm->update;

Update a virtual machine with respect to the attributes specified by update_spec.

  input: vm_spec (HashRef) : specifications of the virtual machine to update
  output: (HashRef)  : Vm update operation

disk_attach

Attach a disk to a virtual machine. To access the disk data inside the VM, it MUST be attached to the VM. When options.position is 0, swaps position with current disk 0. A disk can be attached to only one VM.

disk_detach

Detach a disk from a virtual machine. If the disk position is 0, i.e. the system disk, the virtual machine must be halted to detach the disk.

start

Starts a VM and return the corresponding operation Parameter: None

stop

Stops a VM and returns the corresponding operation.

  input: None
  output: (HashRef): Operation vm stop

reboot

Reboots a VM and returns the corresponding operation

  input: None
  output: (HashRef): operation vm reboot

delete

Deletes a VM. Deletes the disk attached in position 0, the disk used as system disk. Also deletes the first network interface. Detach all extra disks and network interfaces.

  input: None
  output: (HashRef): Operation vm delete

AUTHOR

Natal Ngétal

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Natal Ngétal.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 291:

Non-ASCII character seen before =encoding in 'Ngétal'. Assuming UTF-8