# # Copyright (c) 2001-2012 NetApp, Inc., All Rights Reserved # Any use, modification, or distribution is prohibited # without prior written consent from NetApp, Inc. # ## @summary RepositoryVolumeSnapmirror ComponentState Module (auto-generated by CGT) ## @author dl-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::CS::RepositoryVolumeSnapmirror =head1 DESCRIPTION C is a derived class of L. It represents the state of an ONTAP RepositoryVolumeSnapmirror. A related class is L, which represents access to an ONTAP RepositoryVolumeSnapmirror. =head1 ATTRIBUTES The individual pieces of data that are part of the state of the RepositoryVolumeSnapmirror element are the attributes of the RepositoryVolumeSnapmirror ComponentState. =over =item C<< destination_volume >> Filled in for CMode CLI. =item C<< source_volume >> Filled in for CMode CLI. =item C<< destination_vserver >> Filled in for CMode CLI. =item C<< status >> Filled in for CMode CLI. =item C<< total_progress >> Filled in for CMode CLI. =item C<< source_vserver >> Filled in for CMode CLI. =item C<< healthy >> Filled in for CMode CLI. =item C<< newest_snapshot >> Filled in for CMode CLI. =item C<< state >> Filled in for CMode CLI. =item C<< newest_snapshot_timestamp >> Filled in for CMode CLI. =item C<< destination_cluster >> Filled in for CMode CLI. =item C<< source_cluster >> Filled in for CMode CLI. =item C<< tries >> Filled in for CMode CLI. =item C<< transfer_snapshot >> Filled in for CMode CLI. =item C<< exported_snapshot >> Filled in for CMode CLI. =item C<< schedule >> Filled in for CMode CLI. =item C<< snapshot_progress >> Filled in for CMode CLI. =item C<< throttle >> Filled in for CMode CLI. =item C<< snapshot_checkpoint >> Filled in for CMode CLI. =item C<< exported_snapshot_timestamp >> Filled in for CMode CLI. =item C<< type >> Filled in for CMode CLI. =item C<< foreground >> Filled in for CMode CLI. =item C<< policy >> Filled in for CMode CLI. =item C<< relationship_capability >> Filled in for CMode CLI. =item C<< lag_time >> *Lag Time of Mirror Filled in for CMode CLI. =item C<< last_transfer_from >> *Source of Last Transfer Filled in for CMode CLI. =item C<< last_transfer_error >> *Last Transfer Error Filled in for CMode CLI. =item C<< last_transfer_type >> *Last Transfer Type, possible value(s) are initialize,update,resync,restore,check Filled in for CMode CLI. =item C<< current_transfer_type >> *Transfer Type, possible value(s) are initialize,update,resync,restore,check Filled in for CMode CLI. =item C<< relationship_id >> *Relationship Id Filled in for CMode CLI. =item C<< last_transfer_size >> *Last Transfer Size, possible value(s) are [KB,MB,GB,TB,PB] Filled in for CMode CLI. =item C<< last_transfer_duration >> *Last Transfer Duration Filled in for CMode CLI. =item C<< current_transfer_error >> *Transfer Error Filled in for CMode CLI. =item C<< progress_last_updated >> *Timestamp of Last Progress Update Filled in for CMode CLI. =item C<< destination_path >> *Destination Path, possible value(s) are [[-destination-path] {<[vserver:]volume>,<[cluster:][//vserver/]volume> Filled in for CMode CLI. =item C<< source_path >> *Source Path, possible value(s) are [ -source-path {<[vserver:]volume>,<[cluster:][//vserver/]volume> Filled in for CMode CLI. =item C<< current_throttle >> Current Transfer Throttle (KB/sec) possible value(s) are, throttleType Filled in for CMode CLI. =item C<< current_transfer_priority >> Current Transfer Priority possible value(s) are, low,normal Filled in for CMode CLI. =item C<< last_transfer_end_timestamp >> Last Transfer End Timestamp Filled in for CMode CLI. =back =cut package NACL::CS::RepositoryVolumeSnapmirror; use strict; use warnings; use Params::Validate qw(validate); use NACL::ComponentUtils qw(_dump_one); use NATE::Log qw(log_global); my $Log = log_global(); my $may_enter = $Log->may_enter(); my $may_exit = $Log->may_exit(); use Data::Dumper; use NACL::Exceptions::NoElementsFound qw(:try); use base 'NACL::CS::ComponentState::ONTAP'; use Class::MethodMaker [ scalar => 'destination_volume', scalar => 'source_volume', scalar => 'destination_vserver', scalar => 'status', scalar => 'total_progress', scalar => 'source_vserver', scalar => 'healthy', scalar => 'newest_snapshot', scalar => 'state', scalar => 'newest_snapshot_timestamp', scalar => 'destination_cluster', scalar => 'source_cluster', scalar => 'tries', scalar => 'transfer_snapshot', scalar => 'exported_snapshot', scalar => 'schedule', scalar => 'snapshot_progress', scalar => 'throttle', scalar => 'snapshot_checkpoint', scalar => 'exported_snapshot_timestamp', scalar => 'type', scalar => 'foreground', scalar => 'policy', scalar => 'relationship_capability', scalar => 'lag_time', scalar => 'last_transfer_from', scalar => 'last_transfer_error', scalar => 'last_transfer_type', scalar => 'current_transfer_type', scalar => 'relationship_id', scalar => 'last_transfer_size', scalar => 'last_transfer_duration', scalar => 'current_transfer_error', scalar => 'progress_last_updated', scalar => 'destination_path', scalar => 'source_path', scalar => 'current_throttle', scalar => 'current_transfer_priority', scalar => 'last_transfer_end_timestamp', ]; =head1 METHODS =head2 fetch my $RepositoryVolumeSnapmirror_state = NACL::CS::RepositoryVolumeSnapmirror->fetch(command_interface => $ci, ...); my @RepositoryVolumeSnapmirror_states = NACL::CS::RepositoryVolumeSnapmirror->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. Supports 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 = shift; $Log->debug("Opts to 'fetch' frontend are:\n" . Dumper(\@_)); my %opts = validate @_, $pkg->_fetch_validate_spec(); my $allow_empty = delete $opts{allow_empty}; my @state_objs = $pkg->call_on_apiset( %opts, show_cmd => 'repository volume snapmirror show', choices => [ { method => '_fetch_cmode_cli', interface => 'CLI', set => 'CMode', }, ], ); $pkg->_check_for_invalid_requested_fields( state_objs => \@state_objs, requested_fields => $opts{requested_fields}, ); $pkg->_apply_filter( state_objs => \@state_objs, filter => $opts{filter}, ); $Log->exit() if $may_exit; if (!@state_objs && !$allow_empty) { NACL::Exceptions::NoElementsFound->throw( "No matching repository volume snapmirror(s) found\n" . "Filter: " . _dump_one($opts{filter}) . "\n"); } ## end if ( !@state_objs && !... return wantarray ? @state_objs : $state_objs[0]; } ## end sub fetch sub _fetch_cmode_cli { $Log->enter() if $may_enter; my $pkg = shift; my @state_objs = $pkg->SUPER::_fetch_cmode_cli( @_, api => 'repository_volume_snapmirror_show', ); $Log->exit() if $may_exit; return @state_objs; } ## end sub _fetch_cmode_cli 1;