# # Copyright (c) 2001-2013 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_spare_disks() (auto-generated by CGT) ## @author dl-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::CS::StorageAggregateShowSpareDisks =head1 DESCRIPTION C is a derived class of L. Object(s) of this type are returned when NACL::C::StorageAggregate->show_spare_disks() 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_spare_disks() is invoked.) =head1 ATTRIBUTES The fields of the output are fields of the ComponentState object. =over =item C<< checksum_style >> Checksum Style possible value(s) are, advanced_zoned , block , none , zoned/advanced_zoned Filled in for CMode CLI/ZAPI =item C<< disk_type >> Disk Type possible value(s) are, ATA , BSAS , FCAL , FSAS , LUN , MSATA , SAS , SATA , SSD Filled in for CMode CLI/ZAPI =item C<< disk >> Disk Name Filled in for CMode CLI/ZAPI =item C<< is_disk_shared >> Is Disk Shared? possible value(s) are, true,false Filled in for CMode CLI/ZAPI =item C<< sparecore_percent >> Sparecore Percentage Completed Filled in for CMode CLI =item C<< local_usable_data_size >> Local Node Data Usable Size Filled in for CMode CLI/ZAPI =item C<< owner_name >> Current Owner possible value(s) are, ,local Filled in for CMode CLI =item C<< cluster_disk_name >> Cluster Disk Name Filled in for CMode CLI =item C<< disk_rpm >> Disk RPM Filled in for CMode CLI/ZAPI =item C<< hidden_header1 >> CLI Header Line1 Filled in for CMode CLI =item C<< home_owner_name >> Home Owner possible value(s) are, ,local Filled in for CMode CLI =item C<< is_sparecore >> Sparecore Disk? possible value(s) are, true,false Filled in for CMode CLI/ZAPI =item C<< disk_ui_row >> Disk UI Output Row Filled in for CMode CLI =item C<< hidden_header2 >> CLI Header Line2 Filled in for CMode CLI =item C<< storage_pool >> Name of the Shared Storage Pool Filled in for CMode CLI =item C<< usable_size >> Disk Usable Size Filled in for CMode CLI/ZAPI =item C<< local_usable_root_size >> Local Node Root Usable Size Filled in for CMode CLI/ZAPI =item C<< is_disk_zeroing >> Is Disk Zeroing? possible value(s) are, true,false Filled in for CMode CLI/ZAPI =item C<< hidden_header0 >> CLI Header Line1 Filled in for CMode CLI =item C<< original_owner >> Original Owner Filled in for CMode CLI/ZAPI =item C<< effective_disk_type >> Effective Disk Type possible value(s) are, ATA , BSAS , FCAL , FSAS , LUN , MSATA , SAS , SATA , SSD Filled in for CMode CLI/ZAPI =item C<< total_size >> Total Size Filled in for CMode CLI/ZAPI =item C<< sparecore_status >> Sparecore Status Filled in for CMode CLI =item C<< dr_owner_name >> DR Home Owner possible value(s) are, ,local Filled in for CMode CLI =item C<< disk_ui_status >> Disk UI Status Filled in for CMode CLI =item C<< zeroing_percent >> Zeroing Percentage Completed Filled in for CMode CLI/ZAPI =item C<< is_disk_zeroed >> Is Disk Zeroed? possible value(s) are, true,false Filled in for CMode CLI/ZAPI =item C<< pool_ui_string >> Pool String CLI Filled in for CMode CLI =item C<< hidden_header3 >> CLI Header Line3 Filled in for CMode CLI =item C<< syncmirror_pool >> Pool Number Filled in for CMode CLI/ZAPI =item C<< is_disk_offline >> Is Disk Offline? possible value(s) are, true,false Filled in for CMode CLI. =item C<< is_disk_sick >> Is Disk Sick? possible value(s) are, true,false Filled in for CMode CLI. =item C<< is_disk_left_behind >> Is Disk Left Behind Spare? possible value(s) are, true,false Filled in for CMode CLI. =item C<< effective_disk_rpm >> Effective Disk RPM Filled in for CMode CLI. =item C<< disk_index >> Disk's Index in Table Filled in for CMode CLI. =item C<< node >> Site ID Filled in for CMode CLI. =back =cut package NACL::CS::StorageAggregateShowSpareDisks; 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 => 'checksum_style', scalar => 'disk_type', scalar => 'disk', scalar => 'is_disk_shared', scalar => 'sparecore_percent', scalar => 'local_usable_data_size', scalar => 'owner_name', scalar => 'cluster_disk_name', scalar => 'disk_rpm', scalar => 'hidden_header1', scalar => 'home_owner_name', scalar => 'is_sparecore', scalar => 'disk_ui_row', scalar => 'hidden_header2', scalar => 'storage_pool', scalar => 'usable_size', scalar => 'local_usable_root_size', scalar => 'is_disk_zeroing', scalar => 'hidden_header0', scalar => 'original_owner', scalar => 'effective_disk_type', scalar => 'total_size', scalar => 'sparecore_status', scalar => 'dr_owner_name', scalar => 'disk_ui_status', scalar => 'zeroing_percent', scalar => 'is_disk_zeroed', scalar => 'pool_ui_string', scalar => 'hidden_header3', scalar => 'syncmirror_pool', scalar => 'is_disk_offline', scalar => 'is_disk_sick', scalar => 'is_disk_left_behind', scalar => 'effective_disk_rpm', scalar => 'disk_index', scalar => 'node', ]; =head1 METHODS =head2 fetch my $StorageAggregateShowSpareDisks_state = NACL::CS::StorageAggregateShowSpareDisks->fetch(command_interface => $ci, ...); my @StorageAggregateShowSpareDisks_states = NACL::CS::StorageAggregateShowSpareDisks->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-spare-get-iter" API for CMode ZAPI. =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 => 'storage aggregate show-spare-disks', choices => [ { method => '_fetch_cmode_cli', interface => 'CLI', set => 'CMode' }, { method => '_fetch_cmode_zapi', interface => 'ZAPI', set => 'CMode', }, ], exception_text => 'No matching storage aggregate(s) found', frontend => 'NACL::CS::StorageAggregateShowSpareDisks::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_spare_disks',); $Log->exit() if $may_exit; return @state_objs; } sub _fetch_cmode_zapi { $Log->enter() if $may_enter; my ($pkg, @args) = @_; my %opts = validate @args, $pkg->_fetch_backend_validate_spec(); my $zapi_copy = [ qw( checksum-style is-disk-zeroing disk-type disk is-disk-shared total-size effective-disk-type is-sparecore is-disk-zeroed usable-size syncmirror-pool disk-rpm local-usable-data-size local-usable-root-size zeroing-percent) ]; my @state_objs = $pkg->SUPER::_fetch_cmode_zapi( %opts, api => 'aggr-spare-get-iter', copy => $zapi_copy, ); $Log->exit() if $may_exit; return @state_objs; } ## end sub _fetch_cmode_zapi 1;