PITA::Guest::Storage - Guest Storage Engine base class
Looking after Guest images is a full time job.
And so PITA::Guest::Storage provides a dedicated API for locating, verifying, storing, managing and serving the many gigabytes worth of image data that is typically stored in a Guest image library.
my $store = My::Storage->new( param1 => 'value1', param2 => 'value2', paramN => 'valueN', );
The new constructor (regardless of the subclass) takes a set of key/value params and returns a new PITA::Guest::Storage object.
new
Note the PITA::Guest::Storage class itself cannot be instantiated directly. You can only create objects of subclasses.
Returns a new PITA::Guest::Storage object, or throws an exception on error.
$store->add_guest( $pita_xml_guest );
The add_guest method takes a single PITA::XML::Guest object, does significant testing to validate that the guest object is actually a valid testing guest image, probes it to determine the testing platforms within the guest image, and then adds it to the Guest Storage.
add_guest
As you can imagine, the add_guest method may take some time to run.
Returns the modified, fully resolved, version of the PITA::XML::Guest object if the guest is ok and was added, or throws an exception on error.
my $guest = $store->guest( $guid );
The guest method takes a GUID param, locates and returns the Guest image metadata for the GUID.
guest
Returns a PITA::XML::Guest if found, false if the GUID does not exist in the Guest storage, or throws an exception on error.
The guests method returns the Guest image metadata for all of the Guest images in the Guest Storage object.
guests
Returns a list of PITA::XML::Guest objects, or throws an exception on error.
my $platform = $self->platform( $guid );
The platform method locates a single testing PITA::XML::Platform within some guest, within the Guest Storage.
platform
Returns a PITA::XML::Platform object, false if the GUID does not exist in the storage, or throws an exception on error.
The platforms method returns the Testing Platform metadata for all of the platforms in the Guest Storage.
platforms
Returns a list of PITA::XML::Platform objects, or throws an exception on error.
Bugs should be reported via the CPAN bug tracker at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=PITA
For other issues, contact the author.
Adam Kennedy <adamk@cpan.org>
PITA, http://ali.as/pita/
Copyright 2005 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
To install PITA, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PITA
CPAN shell
perl -MCPAN -e shell install PITA
For more information on module installation, please visit the detailed CPAN module installation guide.