# $Id$ # # Copyright (c) 2001-2011 NetApp, Inc., All Rights Reserved # Any use, modification, or distribution is prohibited # without prior written consent from NetApp, Inc. # ## @summary MetroclusterVserverSwitchbackLatency Component Module (auto-generated by CGT) ## @author dl-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::C::MetroclusterVserverSwitchbackLatency =head1 DESCRIPTION C is a derived class of L. It represents access to an ONTAP MetroclusterVserverSwitchbackLatency. A related class is L, which represents the past state of an ONTAP MetroclusterVserverSwitchbackLatency. However, since it does not have any primary keys, 'find' and 'state' do not work for this component. (This component is considered a 'singleton', i.e. there is only one row shown by the relevant 'show' command) =cut =head1 ATTRIBUTES None. =cut package NACL::C::MetroclusterVserverSwitchbackLatency; use strict; use warnings; use NACL::CS::MetroclusterVserverSwitchbackLatency; use NACL::ComponentUtils qw (_optional_scalars Dumper); use base 'NACL::C::Component::ONTAP'; use Params::Validate qw(validate_with SCALAR ARRAYREF SCALARREF); use NATE::Log qw(log_global); my $Log = log_global(); my $may_enter = $Log->may_enter(); my $may_exit = $Log->may_exit(); =head1 METHODS =head2 new my $MetroclusterVserverSwitchbackLatency = NACL::C::MetroclusterVserverSwitchbackLatency->new( command_interface => $ci, ); Return a new MetroclusterVserverSwitchbackLatency component object with the given attributes. =cut use Class::MethodMaker []; =head2 find my $MetroclusterVserverSwitchbackLatency_obj = NACL::C::MetroclusterVserverSwitchbackLatency->find(command_interface => $ci, ...); my @MetroclusterVserverSwitchbackLatency_objs = NACL::C::MetroclusterVserverSwitchbackLatency->find(command_interface => $ci, ...); (Class method) A constructor of sorts, which discovers which elements are present (by interacting with the given command interface). In an array context it creates a component object for each present element and returns them. In a scalar context it creates a component object for just one element. This method is generally not implemented in individual components. The base class (L provides an implementation. See for a more detailed description along with explanation of all the options accepted. Uses a CMode CLI APISet. =head2 state my MetroclusterVserverSwitchbackLatency_state = $MetroclusterVserverSwitchbackLatency_obj->state(); (Instance method) Fetch the current state of the element associated with this component, and return a Component State object corresponding to this component (calling this on NACL::C::MetroclusterVserverSwitchbackLatency would return a NACL::CS::MetroclusterVserverSwitchbackLatency object) This method is generally not implemented in individual components. The base class (L provides an implementation. See for a more detailed description along with explanation of all the options accepted. Uses a CMode CLI APISet. =cut =head2 reset NACL::C::MetroclusterVserverSwitchbackLatency->reset( command_interface => $ci, ...); (Class method) This method is used to reset the Switchback Latency Counters. Uses CMode CLI . =over =item Options =over =item C<< command_interface => $command_interface >> (Required) See L =item C<< apiset_must => $ruleset >> (Optional) See L =item C<< apiset_should => $ruleset >> (Optional) See L =item C<< '*' >> This method takes all other options supported by "metrocluster vserver switchback latency reset" command in ONTAP =item C<< other_options >> This method takes other common options described in L =back =back =over =item Exceptions =over =item C In general, Component methods propagate the exceptions thrown from underlying API layer and the details of those exceptions are described in the L of user guide. =back =back =cut sub reset { $Log->enter() if $may_enter; my ($pkg, @args) = @_; $pkg->_frontend_log_debug_opts(@args); my %opts = $pkg->_common_validate_with( params => \@args, api => 'metrocluster_vserver_switchback_latency_reset', ); $pkg->call_on_apiset( %opts, choices => [ { method => '_reset_cmode_cli', interface => 'CLI', set => 'CMode', }, ], frontend => 'NACL::C::MetroclusterVserverSwitchbackLatency::reset', ); } sub _reset_cmode_cli { $Log->enter() if $may_enter; my ($pkg, @opts) = @_; $pkg->_base_backend_cmode_cli(@opts, api => 'metrocluster_vserver_switchback_latency_reset',); $Log->exit() if $may_exit; } =head2 show_details_per_vserver my $show_details_per_vserver_obj = NACL::C::MetroclusterVserverSwitchbackLatency->show_details_per_vserver(command_interface => $ci, [ filter => { %filter } ,] [ requested_fields => [ @req_fields ]); or my @show_details_per_vserver_objs = NACL::C::MetroclusterVserverSwitchbackLatency->show_details_per_vserver(command_interface => $ci, [ filter => { %filter } ,] [ requested_fields => [ @req_fields ]); or my $show_details_per_vserver_obj = $MetroclusterVserverSwitchbackLatency_obj->show_details_per_vserver(); (Class or Instance method) This method is a CS-like fetch method which accepts all the parameters of L (requested_fields, filter, allow_empty) and has all of the other properties of fetch methods (callable in scalar or list context, throws a NoElementsFound exception if no matching elements are found). The requested fields and filter takes L of NACL::CS::MetroclusterVserverSwitchbackLatencyShowDetailsPerVserver as input. This method returns objects of the type L. =cut sub show_details_per_vserver { $Log->enter() if $may_enter; my ($pkg_or_obj, @args) = @_; my %opts = $pkg_or_obj->_handle_obj_cs_like_calls(@args); require NACL::CS::MetroclusterVserverSwitchbackLatencyShowDetailsPerVserver; my @state_objs = NACL::CS::MetroclusterVserverSwitchbackLatencyShowDetailsPerVserver ->fetch(%opts); $Log->exit() if $may_exit; return wantarray ? @state_objs : $state_objs[0]; } __PACKAGE__->_load_event_class(); 1;