NAME

Mojo::Cloudstack

DESCRIPTION

Generic Class for Cloudstack API call

SYNOPSIS

use Mojo::Cloudstack;

METHODS

new

my $cs = Mojo::Cloudstack->new(
  host       => "cloustack.local",
  path       => "/client/api",
  port       => "443",
  scheme     => "https",
  api_key    => $api_key,
  secret_key => $secret_key,
);

my $vmreq = $cs->deployVirtualMachine(
  serviceofferingid => $so->id,
  templateid => $t->id,
  zoneid => $zone1->id,
  projectid => $project_id,
);

_build_request

my $params = Mojo::Parameters->new('command=listUsers&response=json');
$params->append(apiKey => $cs->api_key);
my $req = $cs->_build_request($params->to_hash)

api_key

API Key from Cloudstack

host

Host to connect to

path

URL path to API

port

Port to connect to

scheme

URL scheme http | https

secret_key

Secret Key from Cloudstack