# $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 StorageDiskPartition ComponentState Module (auto-generated by CGT) ## @author dl-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::CS::StorageDiskPartition =head1 DESCRIPTION C is a derived class of L. It represents the state of an ONTAP StorageDiskPartition. A related class is L, which represents access to an ONTAP StorageDiskPartition. =head1 ATTRIBUTES The individual pieces of data that are part of the state of the StorageDiskPartition element are the attributes of the StorageDiskPartition ComponentState. Additionally, the command_interface used to obtain the ComponentState object is also an attribute of the object. This makes it easier to obtain the component object corresponding to the CS object, using L. =over =item command_interface The command_interface with which the CS object was obtained. (Available in all CS objects regardless of requested_fields and the mode/interface) =item C<< pathnames >> List of Path Based Disk Names (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $pathnames = $obj->pathnames(); # $pathnames contains a reference to the array of values my @pathnames = $obj->pathnames(); # @pathnames 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 => { pathnames = [ value1, value2...] } Filled in for CMode CLI =item C<< is_zeroing >> Is Zeroing? possible value(s) are, true,false Filled in for CMode CLI =item C<< container_disk_uid >> Container Disk Unique Id Filled in for CMode CLI =item C<< container_disk >> Container Disk Name Filled in for CMode CLI =item C<< home_node_name >> Home Owner Name possible value(s) are, ,local Filled in for CMode CLI =item C<< media_scrub_last_done_time_interval >> Number of Seconds Since Last Scrub Filled in for CMode CLI =item C<< capacity_sectors >> Capacity in Number of Sectors Filled in for CMode CLI =item C<< is_sparecore >> Is Sparecore? possible value(s) are, true,false Filled in for CMode CLI =item C<< raid_zeroing_percent >> RAID Percent Completion of Zeroing Filled in for CMode CLI =item C<< dr_home_node_name >> DR Owner Name possible value(s) are, ,local Filled in for CMode CLI =item C<< spare_pool >> Name of RAID Spare Pool Filled in for CMode CLI =item C<< storage_pool >> Name of Shared Storage Pool Filled in for CMode CLI =item C<< raid_group_name >> Name of Parent RAID Group Filled in for CMode CLI =item C<< usable_size >> Usable Size Filled in for CMode CLI =item C<< is_offline >> Is Offline? possible value(s) are, true,false Filled in for CMode CLI =item C<< is_zeroed >> Is Zeroed? possible value(s) are, true,false Filled in for CMode CLI =item C<< uid >> Unique Id of the Logical Disk Filled in for CMode CLI =item C<< physical_blocks >> RAID Capacity in 4KB Blocks Filled in for CMode CLI =item C<< aggregate_name >> Name of Aggregate Filled in for CMode CLI =item C<< nodelist >> List of nodes attached to the disk possible value(s) are, ,local (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $nodelist = $obj->nodelist(); # $nodelist contains a reference to the array of values my @nodelist = $obj->nodelist(); # @nodelist 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 => { nodelist = [ value1, value2...] } Filled in for CMode CLI =item C<< copy_destination_uid >> Unique Id of Copy Destination Filled in for CMode CLI =item C<< copy_reason >> Reason for Copying Filled in for CMode CLI =item C<< storage_is_zeroing >> Is a DISK_ZERO_DISK Request Outstanding? possible value(s) are, true,false Filled in for CMode CLI =item C<< is_prefailed >> Is Prefailed? possible value(s) are, true,false Filled in for CMode CLI =item C<< reconstruct_percent_complete >> Percent Completion of Reconstruct Filled in for CMode CLI =item C<< zeroing_percent >> Percent Completion of Zeroing Filled in for CMode CLI =item C<< right_size_sectors >> Number of Usable Disk Sectors Filled in for CMode CLI =item C<< partition >> Partition Name Filled in for CMode CLI =item C<< is_reconstructing >> Is Reconstructing? possible value(s) are, true,false Filled in for CMode CLI =item C<< syncmirror_pool >> SyncMirror Pool Number Filled in for CMode CLI =item C<< container_name >> Container Name Filled in for CMode CLI =item C<< plex_name >> Name of Parent Plex Filled in for CMode CLI =item C<< position >> Position of Logical Disk possible value(s) are, copy , data , dparity , orphan , parity , pending , present Filled in for CMode CLI =item C<< is_media_scrubbing >> Is Media Scrub Running? possible value(s) are, true,false Filled in for CMode CLI =item C<< dr_home_node_id >> DR Owner ID Filled in for CMode CLI =item C<< raid_zeroing_blocks_done >> RAID Zeroed Blocks in 4KB Filled in for CMode CLI =item C<< age >> Age of the Ownership Record Filled in for CMode CLI =item C<< raid_is_zeroing >> Is Zeroing? possible value(s) are, true,false Filled in for CMode CLI =item C<< used_blocks >> RAID File System Region in 4KB Blocks Filled in for CMode CLI =item C<< container_diskpathnames >> List of Path Based Container Disk Names (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $container_diskpathnames = $obj->container_diskpathnames(); # $container_diskpathnames contains a reference to the array of values my @container_diskpathnames = $obj->container_diskpathnames(); # @container_diskpathnames 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 => { container_diskpathnames = [ value1, value2...] } Filled in for CMode CLI =item C<< is_replacing >> Is Replacing? possible value(s) are, true,false Filled in for CMode CLI =item C<< media_scrub_count >> Number of Times Media was Scrubbed Since Boot Filled in for CMode CLI =item C<< owner_node_name >> Current Owner Name possible value(s) are, ,local Filled in for CMode CLI =item C<< is_sanown_failed >> Not Found possible value(s) are, true,false Filled in for CMode CLI =item C<< active_node_name >> Active RAID Controller Node Name possible value(s) are, ,local Filled in for CMode CLI =item C<< reservation_id >> Reservation Owner ID Filled in for CMode CLI =item C<< owner_update_count >> Update Count Filled in for CMode CLI =item C<< outage_reason >> Outage Reason Filled in for CMode CLI =item C<< copy_percent_complete >> Percent Completion of Copy Filled in for CMode CLI =item C<< storage_zeroing_blocks_done >> Storage Zeroed Blocks in 4KB for the DISK_ZERO_DISK Request Filled in for CMode CLI =item C<< home_node_id >> Home Owner ID Filled in for CMode CLI =item C<< owner_node_id >> Current Owner ID Filled in for CMode CLI =item C<< container_type >> Type of the Container possible value(s) are, aggregate , broken , foreign , labelmaint , maintenance , shared , spare , unassigned , unknown , volume Filled in for CMode CLI =item C<< is_evacuating >> Is Evacuating? possible value(s) are, true,false Filled in for CMode CLI =item C<< storage_zeroing_percent >> Storage Percent Completion of the DISK_ZERO_DISK Request Filled in for CMode CLI =item C<< is_root >> Is Root Partition? possible value(s) are, true,false Filled in for CMode CLI. =item C<< storage_pool_uuid >> Uuid of Shared Storage Pool Filled in for CMode CLI. =item C<< disk_type >> Disk Type possible value(s) are, ATA , BSAS , EATA , FCAL , FSAS , LUN , MSATA , SAS , SATA , SCSI , SSD , XATA , XSAS , VMDISK Filled in for CMode CLI. =back =cut package NACL::CS::StorageDiskPartition; 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 [ array => 'pathnames', scalar => 'is_zeroing', scalar => 'container_disk_uid', scalar => 'container_disk', scalar => 'home_node_name', scalar => 'media_scrub_last_done_time_interval', scalar => 'capacity_sectors', scalar => 'is_sparecore', scalar => 'raid_zeroing_percent', scalar => 'dr_home_node_name', scalar => 'spare_pool', scalar => 'storage_pool', scalar => 'raid_group_name', scalar => 'usable_size', scalar => 'is_offline', scalar => 'is_zeroed', scalar => 'uid', scalar => 'physical_blocks', scalar => 'aggregate_name', array => 'nodelist', scalar => 'copy_destination_uid', scalar => 'copy_reason', scalar => 'storage_is_zeroing', scalar => 'is_prefailed', scalar => 'reconstruct_percent_complete', scalar => 'zeroing_percent', scalar => 'right_size_sectors', scalar => 'partition', scalar => 'is_reconstructing', scalar => 'syncmirror_pool', scalar => 'container_name', scalar => 'plex_name', scalar => 'position', scalar => 'is_media_scrubbing', scalar => 'dr_home_node_id', scalar => 'raid_zeroing_blocks_done', scalar => 'age', scalar => 'raid_is_zeroing', scalar => 'used_blocks', array => 'container_diskpathnames', scalar => 'is_replacing', scalar => 'media_scrub_count', scalar => 'owner_node_name', scalar => 'is_sanown_failed', scalar => 'active_node_name', scalar => 'reservation_id', scalar => 'owner_update_count', scalar => 'outage_reason', scalar => 'copy_percent_complete', scalar => 'storage_zeroing_blocks_done', scalar => 'home_node_id', scalar => 'owner_node_id', scalar => 'container_type', scalar => 'is_evacuating', scalar => 'storage_zeroing_percent', scalar => 'is_root', scalar => 'storage_pool_uuid', scalar => 'disk_type', ]; =head1 METHODS =head2 fetch my $StorageDiskPartition_state = NACL::CS::StorageDiskPartition->fetch(command_interface => $ci, ...); my @StorageDiskPartition_states = NACL::CS::StorageDiskPartition->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 => 'storage disk partition show', choices => [ { method => '_fetch_cmode_cli', interface => 'CLI', set => 'CMode' } ], exception_text => 'No matching storage disk partition(s) found', frontend => 'NACL::CS::StorageDiskPartition::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_disk_partition_show',); $Log->exit() if $may_exit; return @state_objs; } 1;