CDP - Perl wrapper R1Soft CDP (Constant Data Protection) API.
This module is designed to provide a cleaner procedurally driven interface to the
You may import all methods: use CDP qw/:ALL/;
Or You may impliment each module independently.
use CDP::backupTask qw /:ALL/; use CDP::diskSafe qw /:ALL/; use CDP::mySQL qw /:ALL/; use CDP::taskRun qw /:ALL/; use CDP::volume qw /:ALL/; use CDP::Connect qw /:ALL/; use CDP::host qw /:ALL/; use CDP::storagepool qw /:ALL/; use CDP::user qw /:ALL/; use CDP::Dump qw /:ALL/;
This is a wrapper module for the R1Soft CDP v2.0 API.
The goal behind this project was to make a cleaner interface between the R1Soft API and Perl programs.
By default this module does not autoload any methods and allows you to import the specific methods you require. However, I did write CDP.pm as a parent module to allow a quick and easy way to import everything.
This module implements Frontier Client to make XML/Java Script calls to the CDP Server.
None by default.
Frontier::Client
Using Frontier::Client use Frontier::Client;
# To connect: my $u_name = 'test'; my $pw = 'password'; my $cdp_url = 'cdp.example.com'; my $control_server_url = "http://$u_name:$pw\@$cdp_url:8084/xmlrpc"; my $debug = 0; my $encoding = 'ISO-8859-1'; my $client = Frontier::Client->new( 'url' => $control_server_url, 'debug' => $debug, 'encoding' => $encoding, ); # Some example procedure calls: my $host_id_aref = $client->call('host.getHostByHostname', $name); my $host_name = $client->call('host.getHostname', $host_id); my $host_map = $client->call('host.getHostAsMap', $host_id); my $host_disk_safe_aref = $client->call('diskSafe.getDiskSfaeIDs' $host_id);
Using CDP: use CDP qw/:ALL/;
# To Connect my $u_name = 'test'; my $pw = 'password'; my $cdp_url = 'cdp.example.com'; my $client = OpenCDP $cdp_url, $u_name, $pw; # Some example procedure calls my $host_id_aref = getHostByHostname $client, $name; my $host_name = getHostname $client, $host_id; my $host_map = getHostAsMap $client, $host_id; my $host_disk_safe_aref = getDiskSfaeIDs $client, $host_id;
R1Soft API Documentation: http://wiki.r1soft.com/display/pdf/CDP+Server+API+Guide
Please Feel Free to contact me with any questions, comments, or suggestions.
Jon A, <jon[replacewithat]cyberspacelogistics[replacewithdot]com>
Copyright (C) 2011 by jon
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.
To install CDP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CDP
CPAN shell
perl -MCPAN -e shell install CDP
For more information on module installation, please visit the detailed CPAN module installation guide.