mpute;
use Moose;
our $VERSION = '1.1002'; # VERSION
use Carp;
use HTTP::Request;
use JSON qw(from_json to_json);
use LWP;
has auth_url => (is => 'rw', required => 1);
has user => (is =
params);
my $res = $self->_get($self->_url("/servers", $params{detail}, $q));
return from_json($res->content)->{servers};
}
sub get_server {
my ($self, $id) = @_;
croak "Invalid serve
elf->_get($self->_url("/servers/$id"));
return undef unless $res->is_success;
return from_json($res->content)->{server};
}
sub get_servers_by_name {
my ($self, $name) = @_;
my $server
Auth;
use Any::Moose;
with 'Net::OpenStack::Compute::AuthRole';
#use Data::Dumper;
use JSON qw(from_json to_json);
use LWP;
has _info => (is => 'ro', lazy => 1, builder => '_build_info');
has base_
content_type => 'application/json', content => to_json($auth_data));
die $res->status_line . "\n" . $res->content unless $res->is_success;
my $data = from_json($res->content);
my $token
package Net::OpenStack::Compute::AuthRole;
use Moose::Role;
use JSON qw(from_json to_json);
requires qw(
auth_url
user
password
project_id
region
service_name
is_rax_auth
content_type => 'application/json', content => to_json($auth_data));
die $res->status_line . "\n" . $res->content unless $res->is_success;
my $data = from_json($res->content);
my $token