The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Net::Gandi::Hosting::VM - Interface to manage VM.

DESCRIPTION

A VM (Virtual Machine) describes a server’s resources and state.

list

Returns the list of VMs associated with apikey, matched by filters, if specified.

Available params are:

  • id

  • memory

  • state

  • shares

  • hostname

  • cores

  • datacenter_id

  • items_per_page

  • page

  • sort_by

count

Returns the number of VMs associated with apikey, matched by filters, if specified.

Available params are:

  • id

  • memory

  • state

  • shares

  • hostname

  • cores

  • datacenter_id

info

Return a mapping of the VM attributes.

Parameter: None

    use Net::Gandi;

    my $vm   = Net::Gandi::Hosting::VM->new( apikey => 'myapikey', id => 42 );
    my $info = $vm->info;

create

Creates a VM and returns the corresponding operations.

create_from

Creates a Disk, and then, a VM, and returns the corresponding operations. It combines the API method disk.create, and vm.create. This is a convenient method to do the disk.create and vm.create in a single API call. Three operations are created and returned (in this order): disk_create, iface_create, create

update

Updates a VM.

start

Starts a VM and return the corresponding operation Parameter: None

stop

Stops a VM and returns the corresponding operation. Parameter: None

reboot

Reboots a VM and returns the corresponding operation Parameter: None

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. Parameter: None

AUTHOR

Natal Ngétal, <hobbestig@cpan.org>

1 POD Error

The following errors were encountered while parsing the POD:

Around line 14:

Non-ASCII character seen before =encoding in 'server’s'. Assuming UTF-8