# $Id$ # # Copyright (c) 2001-2010 NetApp, Inc., All Rights Reserved # Any use, modification, or distribution is prohibited # without prior written consent from NetApp, Inc. # ## @summary ComponentState Module for the method NACL::C::Fcp->network_adapter_stats() (auto-generated by CGT) ## @author dl-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::CS::FcpNetworkAdapterStats =head1 DESCRIPTION C is a derived class of L. Object(s) of this type are returned when NACL::C::Fcp->network_adapter_stats() is invoked. ((This module does not represent the state of any element, but is an object repesentation of the output obtained when NACL::C::Fcp->network_adapter_stats() is invoked.) =head1 ATTRIBUTES The fields of the output are fields of the ComponentState object. =over =item C<< spurious_interrupts >> Count of spurious interrupts Filled in for CMode CLI =item C<< crc_errors >> Total CRC errors occurred Filled in for CMode CLI =item C<< protocol_errors >> Protocol errors occurred Filled in for CMode CLI =item C<< sfp_formfactor >> Form Factor Of Transceiver Filled in for CMode CLI =item C<< sfp_wavelength >> Wavelength In Nanometers Filled in for CMode CLI =item C<< scsi_requests_dropped >> SCSI requests dropped Filled in for CMode CLI =item C<< initiators_connected >> Count of initiators connected Filled in for CMode CLI =item C<< sfp_connector >> Connector Used Filled in for CMode CLI =item C<< sfp_date_code >> Date Code Of Transceiver Filled in for CMode CLI =item C<< sfp_rev >> Revision Of Transceiver Filled in for CMode CLI =item C<< sfp_part_number >> Part Number Of Transceiver Filled in for CMode CLI =item C<< frames_underrun >> Number of frames underrun Filled in for CMode CLI =item C<< nos_received >> Number of NOSs received Filled in for CMode CLI =item C<< ols_received >> Number of OLS received Filled in for CMode CLI =item C<< is_sfp_rx_power_in_range >> Is Received Power In Range possible value(s) are, true,false Filled in for CMode CLI =item C<< sfp_serial_number >> Serial Number Of Transceiver Filled in for CMode CLI =item C<< is_sfp_optical_transceiver_valid >> Validity Of Transceiver possible value(s) are, true,false Filled in for CMode CLI =item C<< sfp_fc_speed_capabilities >> FC Capabilities Of Transceiver Filled in for CMode CLI =item C<< adapter >> Slot Filled in for CMode CLI =item C<< lr_received >> Link reset received Filled in for CMode CLI =item C<< is_sfp_tx_power_in_range >> Is Transmitted Power In Range possible value(s) are, true,false Filled in for CMode CLI =item C<< link_breaks >> Link breaks count Filled in for CMode CLI =item C<< frames_overrun >> Number of frames overrun Filled in for CMode CLI =item C<< sfp_vendor_oui >> Vendor OUI Of Transceiver Filled in for CMode CLI =item C<< total_logins >> Total login counts Filled in for CMode CLI =item C<< lr_sent >> Link reset sent Filled in for CMode CLI =item C<< node >> Node possible value(s) are, ,local Filled in for CMode CLI =item C<< sfp_encoding >> Encoding Used Filled in for CMode CLI =item C<< sfp_tx_power >> SFP Transmitted Optical Power Filled in for CMode CLI =item C<< invalid_xmit_words >> Invalid words transmitted Filled in for CMode CLI =item C<< discarded_frames >> Number of frames discarded Filled in for CMode CLI =item C<< queue_depth >> Count of queue depth on HBA Filled in for CMode CLI =item C<< adapter_resets >> Number of adapter resets Filled in for CMode CLI =item C<< sfp_vendor_name >> Vendor Name Of Transceiver Filled in for CMode CLI =item C<< sfp_rx_power >> Received Optical Power Filled in for CMode CLI =item C<< total_logouts >> Total logout counts Filled in for CMode CLI =item C<< lip_resets >> LIP resets received Filled in for CMode CLI =item C<< is_sfp_diagnostics_internally_calibrated >> Is Internally Calibrated possible value(s) are, true,false Filled in for CMode CLI =back =cut package NACL::CS::FcpNetworkAdapterStats; use strict; use warnings; use Params::Validate qw(validate); use NATE::Log qw(log_global); my $Log = log_global(); my $may_enter = $Log->may_enter(); my $may_exit = $Log->may_exit(); use NACL::Exceptions::NoElementsFound qw(:try); use base 'NACL::CS::ComponentState::ONTAP'; use Class::MethodMaker [ scalar => 'spurious_interrupts', scalar => 'crc_errors', scalar => 'protocol_errors', scalar => 'sfp_formfactor', scalar => 'sfp_wavelength', scalar => 'scsi_requests_dropped', scalar => 'initiators_connected', scalar => 'sfp_connector', scalar => 'sfp_date_code', scalar => 'sfp_rev', scalar => 'sfp_part_number', scalar => 'frames_underrun', scalar => 'nos_received', scalar => 'ols_received', scalar => 'is_sfp_rx_power_in_range', scalar => 'sfp_serial_number', scalar => 'is_sfp_optical_transceiver_valid', scalar => 'sfp_fc_speed_capabilities', scalar => 'adapter', scalar => 'lr_received', scalar => 'is_sfp_tx_power_in_range', scalar => 'link_breaks', scalar => 'frames_overrun', scalar => 'sfp_vendor_oui', scalar => 'total_logins', scalar => 'lr_sent', scalar => 'node', scalar => 'sfp_encoding', scalar => 'sfp_tx_power', scalar => 'invalid_xmit_words', scalar => 'discarded_frames', scalar => 'queue_depth', scalar => 'adapter_resets', scalar => 'sfp_vendor_name', scalar => 'sfp_rx_power', scalar => 'total_logouts', scalar => 'lip_resets', scalar => 'is_sfp_diagnostics_internally_calibrated', ]; =head1 METHODS =head2 fetch my $FcpNetworkAdapterStats_state = NACL::CS::FcpNetworkAdapterStats->fetch(command_interface => $ci, ...); my @FcpNetworkAdapterStats_states = NACL::CS::FcpNetworkAdapterStats->fetch(command_interface => $ci, ...); (Class method) Discovers which elements are present and returns their state in ComponentState objects. Called in scalar context it returns only one state object, in list context it returns all state objects. See L for a more detailed description along with a complete explanation of the options it accepts. Uses CMode CLI. =over =item Exceptions =over =item C When there are no elements matching the query specified or elements of that type doesn't exist, then this exception will be thrown. =back =back =cut sub fetch { $Log->enter() if $may_enter; my ($pkg, @args) = @_; my @state_objs = $pkg->SUPER::fetch( @args, show_cmd => 'network fcp adapter stats', choices => [ { method => '_fetch_cmode_cli', interface => 'CLI', set => 'CMode' } ], exception_text => 'No matching fcp(s) found', frontend => 'NACL::CS::FcpNetworkAdapterStats::fetch', ); $Log->exit() if $may_exit; return wantarray ? @state_objs : $state_objs[0]; } sub _fetch_cmode_cli { $Log->enter() if $may_enter; my ($pkg, @args) = @_; my @state_objs = $pkg->SUPER::_fetch_cmode_cli(@args, api => 'network_fcp_adapter_stats',); $Log->exit() if $may_exit; return @state_objs; } 1;