Aditya Ivaturi > VMware-LabManager > VMware::LabManager

Download:
VMware-LabManager-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.01   Source  

NAME ^

VMware::LabManager - Perl module to provide basic VMware Lab Manager operations.

VERSION ^

Version 0.01

SYNOPSIS ^

This module provides an encapsulation of VMware Lab Manager SOAP API in convenient API format. Basic functionality like deploying & deleting a library config to & from the workspace are provided.

A little code snippet to get you started:

    use VMware::LabManager;
    use Data::Dumper;
    
    #instantiate the LM object
    my $lm = VMware::LabManager->new('username','passwd','labManager hostname', 'org');
    
    #or if you want the XML messages dumped (i.e. verbose), pass the debug option:
    my $lm = VMware::LabManager->new('username','passwd','labManager hostname', 'org', 'debug');
    
    #deploy_config returns the config ID of the config that is deployed
    my $configID = $lm->deploy_config('my_library_config_name');
    print $configID;
    
    #get all the machines in the deployed config
    my $machineArray = $lm->get_machines($configID);
    print Dumper($machineArray);
    
    #delete the config once you are done.
    $action = $lm->delete_config($configID);
    print $action

DESCRIPTION ^

This module does not provide a one-to-one mapping of the Lab Manager SOAP API, but rather it provides an API wrapper, which combines certain SOAP calls as a meaningful single operation. Thus this module is heavily tailored for automation purposes. But, it should also cater to the broader audience as it still does provide overall functionality that might be required.

Using this module, you can checkout a config & deploy it in one single method call, similarly undeploy & delete in a single method call. This module also provides a method to get the list of all machines (and their details) that a deployed configuration has. Apart from that the SOAP object & auth header methods are exposed; So if need be, they can be used to access other SOAP calls available through Lab Manager SOAP service.

SUBROUTINES/METHODS ^

new

This function instantiates the LM object. The arguments in the required order are:

This does not authenticate with the Lab Manager server yet. That happens when you use one of the other methods.

get_soap

This method is primary used internally, but there are situations where it could be used for other SOAP methods that have not been exposed by this module. This method returns SOAP::Lite object & sets the readable option on. You can use this in conjunction with Authentication header, which you can get from get_auth_header() method.

NOTE: Usage of this method outside the scope of this API is not recommended.

get_auth_header

This method returns an authentication header wrapper that is needed for each SOAP call that you make to Lab Manager. It uses the options you provided in the new() method to build this header.

deploy_config

This method is tailored for automation. During automation, one primarily cares about deploying a library image. A single method call to encapsulate the whole set of operations is more deirable.

This method requires a config name (make sure it is unique in the system), which it uses to:

You have to use this config ID to undeploy & delete it at at later stage.

get_machines

This method returns an array of all the Machines in the deployed config. For each machine it includes mac address, name, internal IP, external IP, name & its id.

delete_config

This method performs two actions - 1)undeploy the configuation (if it is not undeployed) and 2) delete the configuation. This method takes the config ID of the configuration you deployed earlier using the deploy_config() method.

AUTHOR ^

"Aditya Ivaturi", <"ivaturi at gmail.com">

BUGS ^

Please report any bugs or feature requests to ivaturi@gmail.com, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=VMware-LabManager. 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 VMware::LabManager

You can also look for information at:

LICENSE AND COPYRIGHT ^

Copyright 2010 "Aditya Ivaturi".

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.

syntax highlighting: