# $Id$ # # Copyright (c) 2001-2014 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::StorageAggregate->show_status() (auto-generated by CGT) ## @author dl-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::CS::StorageAggregateShowStatus =head1 DESCRIPTION C is a derived class of L. Object(s) of this type are returned when NACL::C::StorageAggregate->show_status() is invoked. ((This module does not represent the state of any element, but is an object repesentation of the output obtained when NACL::C::StorageAggregate->show_status() is invoked.) =head1 ATTRIBUTES The fields of the output are fields of the ComponentState object. =over =item C<< plex_resync_percent >> Resync Percentage Filled in for CMode CLI/ZAPI iter =item C<< storage_pool_banner >> Storage pool Banner (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $storage_pool_banner = $obj->storage_pool_banner(); # $storage_pool_banner contains a reference to the array of values my @storage_pool_banner = $obj->storage_pool_banner(); # @storage_pool_banner contains the array of values If this field needs to be passed to the filter hash, the value for this field should be passed in as an arrayref # filter => { storage_pool_banner = [ value1, value2...] } Filled in for CMode CLI/ZAPI iter =item C<< rg_raidtype >> RAID Group's RAID Type (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $rg_raidtype = $obj->rg_raidtype(); # $rg_raidtype contains a reference to the array of values my @rg_raidtype = $obj->rg_raidtype(); # @rg_raidtype contains the array of values If this field needs to be passed to the filter hash, the value for this field should be passed in as an arrayref # filter => { rg_raidtype = [ value1, value2...] } Filled in for CMode CLI/ZAPI iter =item C<< aggr_raid_status >> RAID Status of Aggregate Filled in for CMode CLI/ZAPI iter =item C<< disk_rpm >> Disk RPM Filled in for CMode CLI/ZAPI iter =item C<< is_scrub_active >> Is Scrub Active? possible value(s) are, true,false (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $is_scrub_active = $obj->is_scrub_active(); # $is_scrub_active contains a reference to the array of values my @is_scrub_active = $obj->is_scrub_active(); # @is_scrub_active contains the array of values If this field needs to be passed to the filter hash, the value for this field should be passed in as an arrayref # filter => { is_scrub_active = [ value1, value2...] } Filled in for CMode CLI/ZAPI iter =item C<< usable_size >> Disk Usable Size Filled in for CMode CLI/ZAPI iter =item C<< rg_ui_status >> RAID Group's UI Status (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $rg_ui_status = $obj->rg_ui_status(); # $rg_ui_status contains a reference to the array of values my @rg_ui_status = $obj->rg_ui_status(); # @rg_ui_status contains the array of values If this field needs to be passed to the filter hash, the value for this field should be passed in as an arrayref # filter => { rg_ui_status = [ value1, value2...] } Filled in for CMode CLI/ZAPI iter =item C<< disk_ui_status >> Disk's Status Filled in for CMode CLI/ZAPI iter =item C<< effective_disk_rpm >> Effective Disk RPM Filled in for CMode CLI/ZAPI iter =item C<< rg_fsm_state >> RAID Group's FSM state (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $rg_fsm_state = $obj->rg_fsm_state(); # $rg_fsm_state contains a reference to the array of values my @rg_fsm_state = $obj->rg_fsm_state(); # @rg_fsm_state contains the array of values If this field needs to be passed to the filter hash, the value for this field should be passed in as an arrayref # filter => { rg_fsm_state = [ value1, value2...] } Filled in for CMode CLI/ZAPI iter =item C<< aggr_raid_type >> Aggregate's RAID Type Filled in for CMode CLI/ZAPI iter =item C<< disk_type >> Disk Type Filled in for CMode CLI/ZAPI iter =item C<< node >> Filer ID Filled in for CMode CLI/ZAPI iter =item C<< plex_is_resyncing >> Is Plex Resyncing possible value(s) are, true,false Filled in for CMode CLI/ZAPI iter =item C<< physical_size >> Disk Physical Size Filled in for CMode CLI/ZAPI iter =item C<< aggr_ui_status >> Aggregate Status Filled in for CMode CLI/ZAPI iter =item C<< storage_pool_uuid >> Uuid of Storage Pool Filled in for CMode CLI/ZAPI iter =item C<< bay >> Disk Bay Filled in for CMode CLI/ZAPI iter =item C<< carrier_id >> Carrier ID Filled in for CMode CLI/ZAPI iter =item C<< serial_number >> Serial Number Filled in for CMode CLI/ZAPI iter =item C<< effective_disk_type >> Effective Disk Type Filled in for CMode CLI/ZAPI iter =item C<< plex_is_online >> Is Plex Online possible value(s) are, true,false Filled in for CMode CLI/ZAPI iter =item C<< rg_banner >> RAID Group UI Banner Filled in for CMode CLI/ZAPI iter =item C<< raidgroup_str >> RAID Group UI String (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $raidgroup_str = $obj->raidgroup_str(); # $raidgroup_str contains a reference to the array of values my @raidgroup_str = $obj->raidgroup_str(); # @raidgroup_str contains the array of values If this field needs to be passed to the filter hash, the value for this field should be passed in as an arrayref # filter => { raidgroup_str = [ value1, value2...] } Filled in for CMode CLI/ZAPI iter =item C<< disk_index >> Position of Disk in Aggregate Filled in for CMode CLI/ZAPI iter =item C<< model >> Disk Model Filled in for CMode CLI/ZAPI iter =item C<< plex_ui_status >> Plex User Visible Status Filled in for CMode CLI/ZAPI iter =item C<< raidgroup >> RAID Group Name (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $raidgroup = $obj->raidgroup(); # $raidgroup contains a reference to the array of values my @raidgroup = $obj->raidgroup(); # @raidgroup contains the array of values If this field needs to be passed to the filter hash, the value for this field should be passed in as an arrayref # filter => { raidgroup = [ value1, value2...] } Filled in for CMode CLI/ZAPI iter =item C<< secondary_banner >> Banner for Pending or Orphaned Disks Filled in for CMode CLI/ZAPI iter =item C<< copy_percent >> Copy Percentage Completed Filled in for CMode CLI/ZAPI iter =item C<< storage_pool >> Name of Storage Pool Filled in for CMode CLI/ZAPI iter =item C<< aggr_cksumstyle >> Checksum Style of Aggregate Filled in for CMode CLI/ZAPI iter =item C<< is_offline >> Is Disk Offline possible value(s) are, true,false Filled in for CMode CLI/ZAPI iter =item C<< physical_blocks >> Number of Physical Blocks Filled in for CMode CLI/ZAPI iter =item C<< scrub_percent_complete >> Scrubbing Percentage Completed (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $scrub_percent_complete = $obj->scrub_percent_complete(); # $scrub_percent_complete contains a reference to the array of values my @scrub_percent_complete = $obj->scrub_percent_complete(); # @scrub_percent_complete contains the array of values If this field needs to be passed to the filter hash, the value for this field should be passed in as an arrayref # filter => { scrub_percent_complete = [ value1, value2...] } Filled in for CMode CLI/ZAPI iter =item C<< revision >> Firmware Revision Filled in for CMode CLI/ZAPI iter =item C<< is_recons_active >> Is Reconstruction Active possible value(s) are, true,false Filled in for CMode CLI/ZAPI iter =item C<< shelf >> Disk Shelf Filled in for CMode CLI/ZAPI iter =item C<< is_rg_recomputing_parity >> Is RAID Group Recomputing Parity possible value(s) are, true,false (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $is_rg_recomputing_parity = $obj->is_rg_recomputing_parity(); # $is_rg_recomputing_parity contains a reference to the array of values my @is_rg_recomputing_parity = $obj->is_rg_recomputing_parity(); # @is_rg_recomputing_parity contains the array of values If this field needs to be passed to the filter hash, the value for this field should be passed in as an arrayref # filter => { is_rg_recomputing_parity = [ value1, value2...] } Filled in for CMode CLI/ZAPI iter =item C<< zeroing_percent >> Zeroing Percentage Completed Filled in for CMode CLI/ZAPI iter =item C<< reconstruction_percent >> Reconstruction Percentage Completed Filled in for CMode CLI/ZAPI iter =item C<< plex_pool >> Pool ranges from 0 to 1 Filled in for CMode CLI/ZAPI iter =item C<< syncmirror_pool >> Pool Number Filled in for CMode CLI/ZAPI iter =item C<< plex_resync_level >> Resync Level ranges from 0 to 1 Filled in for CMode CLI/ZAPI iter =item C<< is_rg_reconstructing >> Is RAID Group Reconstructing possible value(s) are, true,false (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $is_rg_reconstructing = $obj->is_rg_reconstructing(); # $is_rg_reconstructing contains a reference to the array of values my @is_rg_reconstructing = $obj->is_rg_reconstructing(); # @is_rg_reconstructing contains the array of values If this field needs to be passed to the filter hash, the value for this field should be passed in as an arrayref # filter => { is_rg_reconstructing = [ value1, value2...] } Filled in for CMode CLI/ZAPI iter =item C<< disk >> Disk Name Filled in for CMode CLI/ZAPI iter =item C<< plex_status >> Plex Status Filled in for CMode CLI/ZAPI iter =item C<< rg_reparity_percent >> RAID Group Reparity Percentage (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $rg_reparity_percent = $obj->rg_reparity_percent(); # $rg_reparity_percent contains a reference to the array of values my @rg_reparity_percent = $obj->rg_reparity_percent(); # @rg_reparity_percent contains the array of values If this field needs to be passed to the filter hash, the value for this field should be passed in as an arrayref # filter => { rg_reparity_percent = [ value1, value2...] } Filled in for CMode CLI/ZAPI iter =item C<< position >> Position of Disk Filled in for CMode CLI/ZAPI iter =item C<< plex >> Plex Name Filled in for CMode CLI/ZAPI iter =item C<< is_replacing >> Is Disk Replacing possible value(s) are, true,false Filled in for CMode CLI/ZAPI iter =item C<< is_empty_disk >> Is the Disk Missing? possible value(s) are, true,false Filled in for CMode CLI/ZAPI iter =item C<< aggr_wafl_status >> WAFL Status of Aggregate Filled in for CMode CLI/ZAPI iter =item C<< aggregate >> Aggregate Name Filled in for CMode CLI/ZAPI iter =item C<< aggr_is_online >> Is Aggregate Online? possible value(s) are, true,false Filled in for CMode CLI/ZAPI iter =item C<< disk_header >> Disk's Header Filled in for CMode CLI/ZAPI iter =item C<< is_sdc_active >> Is SDC Active possible value(s) are, true,false Filled in for CMode CLI/ZAPI iter =item C<< is_sick >> Is Disk Sick possible value(s) are, true,false Filled in for CMode CLI/ZAPI iter =item C<< rg_recons_percent >> RAID Group Recons Percentage (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $rg_recons_percent = $obj->rg_recons_percent(); # $rg_recons_percent contains a reference to the array of values my @rg_recons_percent = $obj->rg_recons_percent(); # @rg_recons_percent contains the array of values If this field needs to be passed to the filter hash, the value for this field should be passed in as an arrayref # filter => { rg_recons_percent = [ value1, value2...] } Filled in for CMode CLI/ZAPI iter =item C<< bps >> Bytes Per Sector Filled in for CMode CLI/ZAPI iter =item C<< aggregate_uuid >> Aggregate UUID Filled in for CMode CLI/ZAPI iter =item C<< rg_cksumstyle >> RAID Group's Checksum Style (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $rg_cksumstyle = $obj->rg_cksumstyle(); # $rg_cksumstyle contains a reference to the array of values my @rg_cksumstyle = $obj->rg_cksumstyle(); # @rg_cksumstyle contains the array of values If this field needs to be passed to the filter hash, the value for this field should be passed in as an arrayref # filter => { rg_cksumstyle = [ value1, value2...] } Filled in for CMode CLI/ZAPI iter =item C<< is_evacuating >> Is Disk Evacuating possible value(s) are, true,false Filled in for CMode CLI/ZAPI iter =item C<< vendor >> Disk Vendor Filled in for CMode CLI/ZAPI iter =back =cut package NACL::CS::StorageAggregateShowStatus; use strict; use warnings; use Params::Validate qw(validate); use NATE::Log qw(log_global); use NACL::Exceptions::NoElementsFound qw(:try); use NACL::CS::ComponentState::ZapiSkip qw(make_zapi_skip); use NACL::CS::ComponentState::ZapiArray qw(make_zapi_array); use base 'NACL::CS::ComponentState::ONTAP'; use Class::MethodMaker [ scalar => 'plex_resync_percent', array => 'storage_pool_banner', array => 'rg_raidtype', scalar => 'aggr_raid_status', scalar => 'disk_rpm', array => 'is_scrub_active', scalar => 'usable_size', array => 'rg_ui_status', scalar => 'disk_ui_status', scalar => 'effective_disk_rpm', array => 'rg_fsm_state', scalar => 'aggr_raid_type', scalar => 'disk_type', scalar => 'node', scalar => 'plex_is_resyncing', scalar => 'physical_size', scalar => 'aggr_ui_status', scalar => 'storage_pool_uuid', scalar => 'bay', scalar => 'carrier_id', scalar => 'serial_number', scalar => 'effective_disk_type', scalar => 'plex_is_online', scalar => 'rg_banner', array => 'raidgroup_str', scalar => 'disk_index', scalar => 'model', scalar => 'plex_ui_status', array => 'raidgroup', scalar => 'secondary_banner', scalar => 'copy_percent', scalar => 'storage_pool', scalar => 'aggr_cksumstyle', scalar => 'is_offline', scalar => 'physical_blocks', array => 'scrub_percent_complete', scalar => 'revision', scalar => 'is_recons_active', scalar => 'shelf', array => 'is_rg_recomputing_parity', scalar => 'zeroing_percent', scalar => 'reconstruction_percent', scalar => 'plex_pool', scalar => 'syncmirror_pool', scalar => 'plex_resync_level', array => 'is_rg_reconstructing', scalar => 'disk', scalar => 'plex_status', array => 'rg_reparity_percent', scalar => 'position', scalar => 'plex', scalar => 'is_replacing', scalar => 'is_empty_disk', scalar => 'aggr_wafl_status', scalar => 'aggregate', scalar => 'aggr_is_online', scalar => 'disk_header', scalar => 'is_sdc_active', scalar => 'is_sick', array => 'rg_recons_percent', scalar => 'bps', scalar => 'aggregate_uuid', array => 'rg_cksumstyle', scalar => 'is_evacuating', scalar => 'vendor', ]; my $Log = log_global(); my $may_enter = $Log->may_enter(); my $may_exit = $Log->may_exit(); =head1 METHODS =head2 fetch my $StorageAggregateShowStatus_state = NACL::CS::StorageAggregateShowStatus->fetch(command_interface => $ci, ...); my @StorageAggregateShowStatus_states = NACL::CS::StorageAggregateShowStatus->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/ZAPI. Invokes aggr-status-get-iter API for CMode ZAPI iter. =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, choices => [ { method => '_fetch_cmode_cli', interface => 'CLI', set => 'CMode', zapi_type => 'none', }, { method => '_fetch_cmode_zapi', interface => 'ZAPI', set => 'CMode', zapi_type => 'iter' }, ], show_cmd => 'storage aggregate show-status', exception_text => 'No matching storage aggregate(s) found', frontend => 'NACL::CS::StorageAggregateShowStatus::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 => 'storage_aggregate_show_status',); $Log->exit() if $may_exit; return @state_objs; } sub _fetch_cmode_zapi { $Log->enter() if $may_enter; my ($pkg, %opts) = @_; my @state_objs = $pkg->SUPER::_fetch_cmode_zapi( %opts, api => 'aggr_status_get_iter', copy => [ qw( aggr-raid-type aggr-raid-status aggregate-uuid aggr-wafl-status aggregate node aggr-cksumstyle plex-is-online plex-is-resyncing plex-pool plex-resync-level plex-resync-percent plex-status is-rg-recomputing-parity is-rg-reconstructing is-scrub-active raidgroup rg-cksumstyle rg-raidtype scrub-percent-complete copy-percent disk disk-rpm disk-type is-evacuating is-offline is-recons-active is-replacing is-sdc-active is-sick physical-size position reconstruction-percent syncmirror-pool usable-size rg-recons-percent rg-reparity-percent ) ], ); $Log->exit() if $may_exit; return @state_objs; } 1;