Luke Poskitt > Cisco-UCS-0.29 > Cisco::UCS::Chassis

Download:
Cisco-UCS-0.29.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  1
View/Report Bugs
Module Version: 0.1   Source   Latest Release: Cisco-UCS-0.33

NAME ^

Cisco::UCS::Chassis - Class providing operations with a Cisco UCS Chassis

SYNOPSIS ^

        my $chassis = $ucs->chassis(1);

        print $chassis->serial;

        foreach my $chassis (sort $ucs->get_chassis) {
                print "Chassis: " . $chassis->id . " - Serial: " . $chassis->serial . "\n";
        }

DESCRIPTION ^

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.

METHODS

blade ( $id )

  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.

get_blade ( $id )

  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();

get_blades

  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.

fex ( $id )

  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.

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.

get_fex ( $id )

  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().

get_fexs

  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.

fan_module ( $id )

  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.

get_fan_module ( $id )

  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.

get_fan_modules

  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.

psu ( $id )

  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.

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.

get_psu ( $id )

  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.

get_psus

  my @psus = $ucs->chassis(1)->get_psus;

Returns an array of Cisco::UCS::PSU objects for the given chassis. This method is non-caching.

admin_state

Returns the administrative state of the chassis.

conn_path

Returns the connection patrh status of the chassis.

conn_status

Returns the connection status of the chassis.

dn

Returns the distinguished name of the chassis in the UCS management heirarchy.

error

Returns the error status of the chassis.

id

Returns the numerical ID of the chassis.

label

Returns the user defined label of the chassis.

managing_instance

Returns the managing UCSM instance of the chassis (i.e. either A or B).

model

Returns the model number of the chassis.

oper_state

Returns the operational state of the chassis.

operability

Returns the operability status of the chassis.

power

Returns the power status of the chassis.

presence

Returns the presence status of the chassis.

seeprom_oper_state

Returns the SEEPROM operational status of the chassis.

serial

Returns the serial number of the chassis.

thermal

Returns the thermal status of the chassis.

vendor

Returns the vendor information for the chassis.

NOTES ^

Caching Methods

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.

AUTHOR ^

Luke Poskitt, <ltp at cpan.org>

BUGS ^

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.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc Cisco::UCS::Chassis

You can also look for information at:

ACKNOWLEDGEMENTS ^

LICENSE AND COPYRIGHT ^

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.

syntax highlighting: