Cisco::UCS::Chassis - Class providing operations with a Cisco UCS Chassis
my $chassis = $ucs->chassis(1); print $chassis->serial; foreach my $chassis (sort $ucs->get_chassis) { print "Chassis: " . $chassis->id . " - Serial: " . $chassis->serial . "\n"; }
Cisco::UCS::Chassis is a class providing operations with a Cisco UCS chassis.
Note that you are not supposed to call the constructor yourself, rather a Cisco::UCS::Chassis is created automatically via calls to a Cisco::UCS object like get_chassis or chassis.
my $blade = $ucs->chassis(1)->blade(2); print $blade->serial;
Returns a Cisco::UCS::Blade object for the blade identified by the given slot ID. This method takes a single mandatory argument - an integer value specifying the slot ID of the desired blade.
Note that the default behaviour of this method is to return a cached object retrieved in a previous lookup if one is available. Please see the Caching Methods section in NOTES for further information.
my $chassis = $ucs->chassis(3); my $blade = $chassis->get_blade(1); print "Blade " . $blade->id . " thermal is " . $blade->thermal ", power is " . $blade->power . "\n";
Returns a Cisco::UCS::Blade object for the specified blade identified by the given slot ID.
This method always queries the UCSM for information on the specified blade - contrast this behaviour with the behaviour of the analogous caching method blade();
foreach my $blade ($ucs->chassis(1)->get_blades) { print $blade->serial . "\n" }
Returns an array of Cisco::UCS::Blade objects. This is a non-caching method.
my $fex = $ucs->chassis(1)->fex(1); print $blade->serial;
Returns a Cisco::UCS::FEX object for the blade identified by the given slot ID. This method takes a single mandatory argument - an integer value specifying the slot ID of the desired FEX.
my $fex = $ucs->chassis(1)->fex(1); print $fex->serial;
Returns a Cisco::UCS::FEX object for the FEX identified by the given slot ID.
This method always queries the UCSM for information - contrast this with the behaviour of the analagous caching method fex().
my @fex = $ucs->chassis(1)->get_fexs;
Returns an array of Cisco::UCS::FEX objects for the FEXs in the specified chassis. This is a non-caching method.
print $ucs->chassis(1)->fan_module(1)->thermal;
Returns a Cisco::UCS::Common::FanModule object for the specified fan module. Note that the default behaviour of this method is to return a cached object as retrieved by a previous call to the UCSM if available. See the Caching Method section in NOTES for further details.
my $fm = $ucs->chassis(1)->get_fan_module(1);
Returns a Cisco::UCS::Common::FanModule object for the specified fan module in the designated chassis.
This is a non-caching method and always queries the UCSM for information.
my @fan_modules = $ucs->chassis(3)->get_fan_modules;
Returns an array of Cisco::UCS::Common::FanModules for the specified chassis. This is a non-caching method.
my $psu = $ucs->chassis(1)->psu(2); print $psu->serial;
Returns a Cisco::UCS::Common::PSU object for the chassis identified by the given PSU ID. This method takes a single mandatory argument - an integer value specifying the ID of the desired PSU.
my $psu = $ucs->chassis(1)->get_psu(1);
Returns a Cisco::UCS::Common::PSU object for the chassis identified by the given PSU ID. This method is non-caching and will always query the UCSM for information.
my @psus = $ucs->chassis(1)->get_psus;
Returns an array of Cisco::UCS::PSU objects for the given chassis. This method is non-caching.
Returns the administrative state of the chassis.
Returns the connection patrh status of the chassis.
Returns the connection status of the chassis.
Returns the distinguished name of the chassis in the UCS management heirarchy.
Returns the error status of the chassis.
Returns the numerical ID of the chassis.
Returns the user defined label of the chassis.
Returns the managing UCSM instance of the chassis (i.e. either A or B).
Returns the model number of the chassis.
Returns the operational state of the chassis.
Returns the operability status of the chassis.
Returns the power status of the chassis.
Returns the presence status of the chassis.
Returns the SEEPROM operational status of the chassis.
Returns the serial number of the chassis.
Returns the thermal status of the chassis.
Returns the vendor information for the chassis.
Several methods in the module return cached objects that have been previously retrieved by querying UCSM, this is done to improve the performance of methods where a cached copy is satisfactory for the intended purpose. The trade off for the speed and lower resource requirement is that the cached copy is not guaranteed to be an up-to-date representation of the current state of the object.
As a matter of convention, all caching methods are named after the singular object (i.e. interconnect(), chassis()) whilst non-caching methods are named get_<object>. Non-caching methods will always query UCSM for the object, as will requests for cached objects not present in cache.
Luke Poskitt, <ltp at cpan.org>
<ltp at cpan.org>
Please report any bugs or feature requests to bug-cisco-ucs-chassis at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Cisco-UCS-Chassis. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-cisco-ucs-chassis at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Cisco::UCS::Chassis
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Cisco-UCS-Chassis
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Cisco-UCS-Chassis
CPAN Ratings
http://cpanratings.perl.org/d/Cisco-UCS-Chassis
Search CPAN
http://search.cpan.org/dist/Cisco-UCS-Chassis/
Copyright 2012 Luke Poskitt.
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.
To install Cisco::UCS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Cisco::UCS
CPAN shell
perl -MCPAN -e shell install Cisco::UCS
For more information on module installation, please visit the detailed CPAN module installation guide.