in reply to OpenNebula : Run command ($onevm list ) using perl script
Looking at OpenNebula.pm line 128, we see that
my $data = $self->_rpc("one.vm.info", [ int => $id ]);
so clone that subroutine, and make your own script that fetches the one.vmpool.info instead. Then, with "use Data::Dumper;" try to dump $data and see if there is useful information.
EDIT:
Net::OpenNebula::RPCClient is what you need (untested, but at least it runs without me having OpenNebula):
use Data::Dumper; use Net::OpenNebula::RPCClient; my $one = Net::OpenNebula::RPCClient->new( url => "http://server:2633/RPC2", user => "oneadmin", password => "onepass", ); my $ret = $one->_rpc("one.vmpool.info"); die Dumper $ret; #die Dumper $one;
OLD, probably BAD STUFF:
use Data::Dumper; use Net::OpenNebula; my $one = Net::OpenNebula->new( url => "http://server:2633/RPC2", user => "oneadmin", password => "onepass", ); my $data = $one->_rpc("one.vmpool.info"); die Dumper \$data;
sorry for being vague... I do not know the module, nor your application.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: OpenNebula : Run command ($onevm list ) using perl script
by rajuskark (Acolyte) on Mar 21, 2017 at 14:54 UTC | |
by marto (Cardinal) on Mar 21, 2017 at 15:07 UTC | |
by rajuskark (Acolyte) on Mar 22, 2017 at 10:29 UTC | |
by marto (Cardinal) on Mar 22, 2017 at 10:33 UTC |