# $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 VolumeFileMove ComponentState Module (auto-generated by CGT) ## @author dl-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::CS::VolumeFileMove =head1 DESCRIPTION C is a derived class of L. It represents the state of an ONTAP VolumeFileMove. A related class is L, which represents access to an ONTAP VolumeFileMove. =head1 ATTRIBUTES The individual pieces of data that are part of the state of the VolumeFileMove element are the attributes of the VolumeFileMove 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<< source_fileid >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< scanner_total >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< cursor >> Filled in for CMode CLI. =item C<< scanner_percent >> Filled in for CMode CLI. =item C<< source_file_path >> Filled in for CMode CLI/ZAPI. (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $source_file_path = $obj->source_file_path(); # $source_file_path contains a reference to the array of values my @source_file_path = $obj->source_file_path(); # @source_file_path contains the array of values Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: @values =item C<< destination_generation >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and output mapping: $value =item C<< node >> Filled in for CMode CLI. =item C<< scanner_limit >> Filled in for CMode CLI. =item C<< destination_path >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< job_uuid >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< operation >> Filled in for CMode CLI. =item C<< is_snapshot_fenced >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< max_throughput >> Filled in for CMode CLI. =item C<< max_cutover_time >> Filled in for CMode CLI. =item C<< source_generation >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and output mapping: $value =item C<< file_index >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< scanner_active >> Filled in for CMode CLI. =item C<< scanner_paused >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and output mapping: $value =item C<< source_msid >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< destination_dsid >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< destination_fileid >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< source_dsid >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< is_scanner_active >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< scanner_status >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< scanner_progress >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< destination_file_path >> Filled in for CMode CLI/ZAPI. (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $destination_file_path = $obj->destination_file_path(); # $destination_file_path contains a reference to the array of values my @destination_file_path = $obj->destination_file_path(); # @destination_file_path contains the array of values Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: @values =item C<< source_vserver_id >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and output mapping: $value =item C<< comments >> Filled in for CMode CLI. =item C<< message_catalog_code >> Filled in for CMode CLI. =item C<< ontap_error_code >> Filled in for CMode CLI. =item C<< cutover_time >> Filled in for CMode CLI. =item C<< is_destination_ready >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< elapsed_time >> Filled in for CMode CLI. =item C<< source_file_index >> *Source File Index Filled in for CMode CLI. =item C<< hold_quiescence >> *Hold Quiescence, possible value(s) are true,false Filled in for CMode CLI. =item C<< plugin_interfaces >> Filled in for CMode CLI. =item C<< source_job_uuid >> *Source Job UUID Filled in for CMode CLI. =item C<< last_failure_code >> Last Failure Code Filled in for CMode CLI. =item C<< last_failure_reason >> Last Failure Reason Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and output mapping: $value =item C<< last_zapi_failure_code >> Last Failure Code Filled in for CMode CLI. =item C<< source_snap_id >> Source Snapshot copy ID Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and output mapping: $value =item C<< source_zapi_file_path >> Source File Path Filled in for CMode CLI. =item C<< destination_zapi_file_path >> Destination File Path Filled in for CMode CLI. =item C<< source_vserver_uuid >> Source Vserver UUID Filled in for CMode CLI. =item C<< last_failure_location >> Last Failure Filename:Line Filled in for CMode CLI. =item C<< report_completed >> Report Completed Status (120 secs) possible value(s) are, true,false Filled in for CMode CLI. =item C<< raw_last_failure_reason >> Raw Last Failure Reason Filled in for CMode CLI. =item C<< report_time >> Report Time (s) Filled in for CMode CLI. =back =cut package NACL::CS::VolumeFileMove; 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 NACL::CS::_Mixins::VolumeFileCopyMove qw(:all); use base 'NACL::CS::ComponentState::ONTAP'; use Class::MethodMaker [ scalar => 'source_fileid', scalar => 'scanner_total', scalar => 'cursor', scalar => 'scanner_percent', array => 'source_file_path', scalar => 'destination_generation', scalar => 'node', scalar => 'scanner_limit', scalar => 'destination_path', scalar => 'job_uuid', scalar => 'operation', scalar => 'is_snapshot_fenced', scalar => 'max_throughput', scalar => 'max_cutover_time', scalar => 'source_generation', scalar => 'file_index', scalar => 'scanner_active', scalar => 'scanner_paused', scalar => 'source_msid', scalar => 'destination_dsid', scalar => 'destination_fileid', scalar => 'source_dsid', scalar => 'is_scanner_active', scalar => 'scanner_status', scalar => 'scanner_progress', array => 'destination_file_path', scalar => 'source_vserver_id', scalar => 'comments', scalar => 'message_catalog_code', scalar => 'ontap_error_code', scalar => 'cutover_time', scalar => 'is_destination_ready', scalar => 'elapsed_time', scalar => 'source_file_index', scalar => 'hold_quiescence', scalar => 'plugin_interfaces', scalar => 'source_job_uuid', scalar => 'last_failure_code', scalar => 'last_failure_reason', scalar => 'last_zapi_failure_code', scalar => 'source_snap_id', scalar => 'source_zapi_file_path', scalar => 'destination_zapi_file_path', scalar => 'source_vserver_uuid', scalar => 'last_failure_location', scalar => 'report_completed', scalar => 'raw_last_failure_reason', scalar => 'report_time', ]; =head1 METHODS =head2 fetch my $VolumeFileMove_state = NACL::CS::VolumeFileMove->fetch(command_interface => $ci, ...); my @VolumeFileMove_states = NACL::CS::VolumeFileMove->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 a CMode CLI/ZAPI APISet. Invokes "file-move-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 = shift; my @state_objs = $pkg->SUPER::fetch( @_, choices => [ { method => '_fetch_cmode_cli', interface => 'CLI', set => 'CMode' }, { method => '_fetch_cmode_zapi', interface => 'ZAPI', set => 'CMode' } ], exception_text => 'No matching volume file move(s) found' ); $Log->exit() if $may_exit; return wantarray ? @state_objs : $state_objs[0]; } sub _fetch_cmode_cli { $Log->enter() if $may_enter; my $pkg = shift; my @state_objs = $pkg->SUPER::_fetch_cmode_cli(@_, api => 'volume_file_move_show',); $Log->exit() if $may_exit; return @state_objs; } sub _fetch_cmode_zapi { $Log->enter() if $may_enter; my ($pkg, @opts) = @_; my @state_objs = $pkg->_fetch_zapi_helper(@opts, api => 'file-move-get-iter'); $Log->exit() if $may_exit; return @state_objs; } 1;