# # Copyright (c) 2001-2012 NetApp, Inc., All Rights Reserved # Any use, modification, or distribution is prohibited # without prior written consent from NetApp, Inc. # ## @summary VserverIscsiConnection ComponentState Module (auto-generated by CGT) ## @author dl-nacl-dev@netapp.com, pkj@netapp.com ## @status shared ## @pod here =head1 NAME NACL::CS::VserverIscsiConnection =head1 DESCRIPTION C is a derived class of L. It represents the state of an ONTAP VserverIscsiConnection. A related class is L, which represents access to an ONTAP VserverIscsiConnection. =head1 ATTRIBUTES The individual pieces of data that are part of the state of the VserverIscsiConnection element are the attributes of the VserverIscsiConnection ComponentState. =over =item C<< "rcvWindowSize" >> Filled in for CMode CLI. =item C<< "has_session" >> Filled in for CMode CLI/ZAPI. Maps to: CM ZAPI: $value =item C<< "dataDigest" >> Filled in for CMode CLI. =item C<< "tgtMaxRcvLen" >> Filled in for CMode CLI. =item C<< "intfName" >> This maps to interface-name for CMode zapi Filled in for CMode CLI/ZAPI. iMaps to: CM ZAPI: $value =item C<< "initAlias" >> Filled in for CMode CLI. =item C<< "localIpPort" >> This maps to for local-ip-port CMode zapi Filled in for CMode CLI/ZAPI. Maps to: CM ZAPI: $value =item C<< "localIpAddr" >> This maps to for local-ip-address CMode zapi Filled in for CMode CLI/ZAPI. Maps to: CM ZAPI: $value =item C<< "node" >> Filled in for CMode CLI/ZAPI. Maps to: CM ZAPI: $value =item C<< "isid" >> =item C<< "initMaxRcvLen" >> Filled in for CMode CLI. =item C<< "sndBufferSz" >> Filled in for CMode CLI. =item C<< "connOffset" >> Filled in for CMode CLI. =item C<< "initNodename" >> Filled in for CMode CLI. =item C<< "vserver" >> Filled in for CMode CLI/ZAPI. Maps to: CM ZAPI: $value =item C<< "connId" >> Filled in for CMode CLI. =item C<< "tsih" >> This maps to session-id for CMode zapi Filled in for CMode CLI/ZAPI. Maps to: CM ZAPI: $value =item C<< "tsih_sort_key" >> Filled in for CMode CLI. =item C<< "connection_state" >> Filled in for CMode CLI/ZAPI. Maps to: CM ZAPI: $value =item C<< "authMethod" >> Filled in for CMode CLI. =item C<< "remoteIpAddr" >> This maps to for remote-ip-address CMode zapi Filled in for CMode CLI/ZAPI. Maps to: CM ZAPI: $value =item C<< "remoteIpPort" >> This maps to for remote-ip-port CMode zapi Filled in for CMode CLI/ZAPI. Maps to: CM ZAPI: $value =item C<< "lif" >> Filled in for CMode CLI. =item C<< "headerDigest" >> Filled in for CMode CLI. =item C<< header_digest_enabled >> Filled in for CMode CLI. =item C<< remote_ip_port >> Filled in for CMode CLI. =item C<< authentication_method >> Filled in for CMode CLI. =item C<< target_mrdsl >> Filled in for CMode CLI. =item C<< local_ip_port >> Filled in for CMode CLI. =item C<< tpgroup >> This maps to tpgroup-name for CMode zapi Filled in for CMode CLI/ZAPI. Maps to: CM ZAPI: $value =item C<< tpgroup_tag >> Filled in for CMode CLI/ZAPI. Maps to: CM ZAPI: $value =item C<< remote_address >> Filled in for CMode CLI. =item C<< data_digest_enabled >> Filled in for CMode CLI. =item C<< rcv_window_size >> Filled in for CMode CLI. =item C<< connection_id >> Filled in for CMode CLI/ZAPI. Maps to: CM ZAPI: $value =item C<< initiator_mrdsl >> Filled in for CMode CLI. =item C<< local_address >> Filled in for CMode CLI. =item C<< vserver_uuid >> Vserver UUID Filled in for CMode CLI. =back =cut package NACL::CS::VserverIscsiConnection; 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 => 'rcvWindowSize', scalar => 'has_session', scalar => 'dataDigest', scalar => 'tgtMaxRcvLen', scalar => 'intfName', scalar => 'initAlias', scalar => 'localIpPort', scalar => 'localIpAddr', scalar => 'node', scalar => 'isid', scalar => 'initMaxRcvLen', scalar => 'sndBufferSz', scalar => 'connOffset', scalar => 'initNodename', scalar => 'vserver', scalar => 'connId', scalar => 'tsih', scalar => 'tsih_sort_key', scalar => 'connection_state', scalar => 'authMethod', scalar => 'remoteIpAddr', scalar => 'remoteIpPort', scalar => 'lif', scalar => 'headerDigest', scalar => 'header_digest_enabled', scalar => 'remote_ip_port', scalar => 'authentication_method', scalar => 'target_mrdsl', scalar => 'local_ip_port', scalar => 'tpgroup', scalar => 'tpgroup_tag', scalar => 'remote_address', scalar => 'data_digest_enabled', scalar => 'rcv_window_size', scalar => 'connection_id', scalar => 'initiator_mrdsl', scalar => 'local_address', scalar => 'vserver_uuid', ]; =head1 METHODS =head2 fetch my $VserverIscsiConnection_state = NACL::CS::VserverIscsiConnection->fetch(command_interface => $ci, ...); my @VserverIscsiConnection_states = NACL::CS::VserverIscsiConnection->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/ZAPI APISet. THis methos executes "iscsi-connection-get-iter" 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( @_, show_cmd => 'vserver iscsi connection show', choices => [ { method => '_fetch_cmode_cli', interface => 'CLI', set => 'CMode', }, { method => '_fetch_cmode_zapi', interface => 'ZAPI', set => 'CMode', }, ], exception_text => 'No matching vserver iscsi connection(s) found' ); $Log->exit() if $may_exit; 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 => 'vserver_iscsi_connection_show'); $Log->exit() if $may_exit; return @state_objs; } ## end sub _fetch_cmode_cli sub _fetch_cmode_zapi { $Log->enter() if $may_enter; my $pkg = shift; my @state_objs = $pkg->SUPER::_fetch_cmode_zapi( @_, api => 'iscsi_connection_get_iter', copy => [ qw(connection-id connection-state has-session node tpgroup-tag vserver) ], map => { 'intfName' => 'interface-name', 'localIpAddr' => 'local-ip-address', 'remoteIpAddr' => 'remote-ip-address', 'remoteIpPort' => 'remote-ip-port', 'tpgroup' => 'tpgroup-name', 'tsih' => 'session-id', 'localIpPort' => 'local-ip-port', }, ); $Log->exit() if $may_exit; return @state_objs; } ## end sub _fetch_cmode_zapi 1;