NAME

Mojo::Cloudstack

DESCRIPTION

Generic Class for Cloudstack API calls The goal is to have blessed classes generated by AUTOLOAD, which are replaced step by step by 'real' classes when enhanced functionality is needed.

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,
);

sync

Sync possible API calls against Cloudstack with your account dependend on your permisions.

$cs->sync;

_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