# $Id$ # # Copyright (c) 2001-2014 NetApp, Inc., All Rights Reserved # Any use, modification, or distribution is prohibited # without prior written consent from NetApp, Inc. # ## @summary VserverFpolicyPolicyExternalEngine ComponentState Module (auto-generated by CGT) ## @author dl-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::CS::VserverFpolicyPolicyExternalEngine =head1 DESCRIPTION C is a derived class of L. It represents the state of an ONTAP VserverFpolicyPolicyExternalEngine. A related class is L, which represents access to an ONTAP VserverFpolicyPolicyExternalEngine. =head1 ATTRIBUTES The individual pieces of data that are part of the state of the VserverFpolicyPolicyExternalEngine element are the attributes of the VserverFpolicyPolicyExternalEngine 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<< status_req_interval >> Interval for Sending Status Requests Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< certificate_common_name >> FQDN or Custom Common Name Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< certificate_ca >> Certificate Authority Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< reqs_cancel_timeout >> Timeout for Canceling a Request Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< ssl_option >> SSL Option for External Communication possible value(s) are, no-auth,server-auth,mutual-auth Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< session_timeout >> Session ID Purge Timeout During Reconnection Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< server_progress_timeout >> Timeout for Disconnecting Non-responsive Server Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< certificate_serial >> Serial Number of Certificate Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< max_connection_retries >> Max Reconnect Attempt Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< recv_buffer_size >> Receive Buffer Size Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< keep_alive_interval >> Interval for Sending Keep-Alive Messages Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< send_buffer_size >> Send Buffer Size Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< extern_engine_type >> External Engine Type Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< vserver >> Vserver Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< port >> Port Number of FPolicy Service ranges from 1 to 65535 Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< max_server_reqs >> Maximum Outstanding Requests for FPolicy Server Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< reqs_abort_timeout >> Timeout for Aborting a Request Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< engine_name >> Engine Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< primary_servers >> Primary FPolicy Servers (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $primary_servers = $obj->primary_servers(); # $primary_servers contains a reference to the array of values my @primary_servers = $obj->primary_servers(); # @primary_servers 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 => { primary_servers = [ value1, value2...] } Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< secondary_servers >> Secondary FPolicy Servers (Array) Note that for array fields, the accessor method can be invoked in either scalar or list context. my $secondary_servers = $obj->secondary_servers(); # $secondary_servers contains a reference to the array of values my @secondary_servers = $obj->secondary_servers(); # @secondary_servers 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 => { secondary_servers = [ value1, value2...] } Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =back =cut package NACL::CS::VserverFpolicyPolicyExternalEngine; use strict; use warnings; use Params::Validate qw(validate); use NATE::Log qw(log_global); use NACL::Exceptions::NoElementsFound qw(:try); use NACL::CS::ComponentState::ZapiSkip qw(make_zapi_skip); use NACL::CS::ComponentState::ZapiArray qw(make_zapi_array); use base 'NACL::CS::ComponentState::ONTAP'; use Class::MethodMaker [ scalar => 'status_req_interval', scalar => 'certificate_common_name', scalar => 'certificate_ca', scalar => 'reqs_cancel_timeout', scalar => 'ssl_option', scalar => 'session_timeout', scalar => 'server_progress_timeout', scalar => 'certificate_serial', scalar => 'max_connection_retries', scalar => 'recv_buffer_size', scalar => 'keep_alive_interval', scalar => 'send_buffer_size', scalar => 'extern_engine_type', scalar => 'vserver', scalar => 'port', scalar => 'max_server_reqs', scalar => 'reqs_abort_timeout', scalar => 'engine_name', array => 'primary_servers', array => 'secondary_servers', ]; my $Log = log_global(); my $may_enter = $Log->may_enter(); my $may_exit = $Log->may_exit(); =head1 METHODS =head2 fetch my $VserverFpolicyPolicyExternalEngine_state = NACL::CS::VserverFpolicyPolicyExternalEngine->fetch(command_interface => $ci, ...); my @VserverFpolicyPolicyExternalEngine_states = NACL::CS::VserverFpolicyPolicyExternalEngine->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/ZAPI. Invokes fpolicy-policy-external-engine-get-iter API for CMode ZAPI iter. =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 => 'vserver fpolicy policy external-engine show', choices => [ { method => '_fetch_cmode_cli', interface => 'CLI', set => 'CMode', zapi_type => 'none', }, { method => '_fetch_cmode_zapi', interface => 'ZAPI', set => 'CMode', zapi_type => 'iter' }, ], exception_text => 'No matching vserver fpolicy policy external-engine(s) found', frontend => 'NACL::CS::VserverFpolicyPolicyExternalEngine::fetch', ); $Log->exit() if $may_exit; return wantarray ? @state_objs : $state_objs[0]; } sub _update_state_objs_cmode_zapi { $Log->enter() if $may_enter; my ($pkg, @args) = @_; $pkg->SUPER::_update_state_objs_cmode_zapi( @args, zapi_field_translations => { hyphenate_value => [qw(ssl-option)], sec_to_hrminsec => [ qw(status-req-interval reqs-cancel-timeout server-progress-timeout keep-alive-interval reqs-abort-timeout session-timeout) ], }, ); $Log->exit() if $may_exit; } sub _fetch_cmode_cli { $Log->enter() if $may_enter; my ($pkg, @args) = @_; my @state_objs = $pkg->SUPER::_fetch_cmode_cli(@args, api => 'vserver_fpolicy_policy_external_engine_show',); $Log->exit() if $may_exit; return @state_objs; } sub _fetch_cmode_zapi { $Log->enter() if $may_enter; my ($pkg, @args) = @_; my @state_objs = $pkg->SUPER::_fetch_cmode_zapi( @args, copy => [ qw(certificate-common-name certificate-ca ssl-option session-timeout server-progress-timeout certificate-serial max-connection-retries recv-buffer-size keep-alive-interval send-buffer-size extern-engine-type vserver engine-name ) ], map => { 'status-req-interval' => 'status-request-interval', 'reqs-cancel-timeout' => 'request-cancel-timeout', 'port' => 'port-number', 'reqs-abort-timeout' => 'request-abort-timeout', 'max-server-reqs' => 'max-server-requests', 'secondary-servers' => [ make_zapi_array('secondary-servers'), make_zapi_skip('ip-address'), ], 'primary-servers' => [ make_zapi_array('primary-servers'), make_zapi_skip('ip-address'), ], }, api => "fpolicy-policy-external-engine-get-iter", ); $Log->exit() if $may_exit; return @state_objs; } 1;