Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Access OpenNebula RPC via perl
Perl
branch: master
Failed to load latest commit information.
lib/Net switched to Dist::Zilla for easier release management
.gitignore inital commit
Contributors
MANIFEST.SKIP inital commit
README.pod update
dist.ini version bump

README.pod

NAME

Net::OpenNebula - Access OpenNebula RPC interface

DESCRIPTION

Perl library to access OpenNebula RPC interface.

SYNOPSIS

 use Net::OpenNebula;
 my $one = Net::OpenNebula->new(
    url      => "http://server:2633/RPC2",
    user     => "oneadmin",
    password => "onepass",
 );
    
 my @vms = $one->get_vms();
 my $vm  = $one->create_vm(
    name     => "the-name",
    template => $template_id
 );
    
 my $state = $vm->state;
 while($state ne "running") {
    sleep 5; # wait 5 seconds for the next request
    $state = $vm->state;
 }
    
 my @nics = $vm->nics;
 my $ip = $nics[0]->ip; # get the ip of the first device
Something went wrong with that request. Please try again.