NAME

Net::CloudStack - Bindings for the CloudStack API

VERSION

Version 0.00013

SYNOPSIS

use Net::CloudStack;
my $api = Net::CloudStack->new(
    base_url        => 'http://...',
    api_path        => 'client/api?',
    api_key         => '<your api key>',
    secret_key      => '<your secret key>',
    xml_json        => 'json', #response format.you can select json or xml. xml is default.
    send_request    => 'yes',  #yes or no.
                               #When you select yes,you can get response.
                               #If you don't want to get response(only generating url),please input no. 
);

# CloudStack API Methods
$api->listVirtualMachines();         # no argument.
$api->listVirtualMachines("id=123"); # one argument.

$api->deployVirtualMachine("serviceofferingid=1&templateid=1&zoneid=1"); # use & for some arguments.

# Original Methods
print $api->url; # print generated url
print $api->response; # print API response

METHODS

This module supports all CloudStack commands,basically you can use methods as following,

$api->some_command("parm1=$parm1&parm2=$parm2")

Please refer API Reference in following Developer's Guide:CloudStack.

http://docs.cloud.com/CloudStack_Documentation/Developer%27s_Guide%3A_CloudStack

Followings are some examples for API command,

listVirtualMachines

$api->listVirtualMachines()
$api->listVirtualMachines("id=$id")

deployVirtualMachine

$api->deployVirtualMachine("serviceoffeingid=$serviceoffeingid&templateid=$templateid&zoneid=$zoneid")

startVirtualMachine/stopVirtualMachine

$api-> startVirtualMachine("id=$id")
$api->stopVirtualMachine("id=$id")

Followings are some examples for original command,

test

$api->test()

This method prints each defined attributes(base_url,api_path,api_key,secret_key,send_request,xml_json) and options.

url

$api->url()

This method prints generated URL that is send to CloudStack API.

test

$api->response()

This method prints response from CloudStack API.

AUTHOR

Shugo Numano, <snumano at cpan.org>

@shugonumano

BUGS

Please report any bugs or feature requests to bug-net-cloudstack at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-CloudStack. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Net::CloudStack

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2011 Shugo Numano.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.