NAME
PITA::Guest::Storage - Guest Storage Engine base class
DESCRIPTION
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.
METHODS
new
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.
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.
add_guest
$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.
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.
guest
my $guest = $store->guest( $guid );
The guest
method takes a GUID param, locates and returns the Guest image metadata for the GUID.
Returns a PITA::XML::Guest if found, false if the GUID does not exist in the Guest storage, or throws an exception on error.
guests
The guests
method returns the Guest image metadata for all of the Guest images in the Guest Storage object.
Returns a list of PITA::XML::Guest objects, or throws an exception on error.
platform
my $platform = $self->platform( $guid );
The platform
method locates a single testing PITA::XML::Platform within some guest, within the Guest Storage.
Returns a PITA::XML::Platform object, false if the GUID does not exist in the storage, or throws an exception on error.
platforms
The platforms
method returns the Testing Platform metadata for all of the platforms in the Guest Storage.
Returns a list of PITA::XML::Platform objects, or throws an exception on error.
SUPPORT
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.
AUTHOR
Adam Kennedy <adamk@cpan.org>
SEE ALSO
COPYRIGHT
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.