# # Copyright (c) 2001-2013 NetApp, Inc., All Rights Reserved # Any use, modification, or distribution is prohibited # without prior written consent from NetApp, Inc. # ## @summary VserverFpolicyPolicyScope ComponentState Module (auto-generated by CGT) ## @author dl-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::CS::VserverFpolicyPolicyScope =head1 DESCRIPTION C is a derived class of L. It represents the state of an ONTAP VserverFpolicyPolicyScope. A related class is L, which represents access to an ONTAP VserverFpolicyPolicyScope. =head1 ATTRIBUTES The individual pieces of data that are part of the state of the VserverFpolicyPolicyScope element are the attributes of the VserverFpolicyPolicyScope 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<< vserver >> Filled in for CMode CLI/ZAPI. Maps to: CM ZAPI: $value =item C<< shares_to_include >> Filled in for CMode CLI/ZAPI (Array) Maps to: CM ZAPI: @array Note that for array fields, the accessor method can be invoked in either scalar or list context. my $shares_to_include = $obj->shares_to_include(); # $shares_to_include contains a reference to the array of values my @shares_to_include = $obj->shares_to_include(); # @shares_to_include contains the array of values Filled in for CMode CLI. =item C<< export_policies_to_include >> Filled in for CMode CLI/ZAPI. (Array) Maps to: CM ZAPI: @array Note that for array fields, the accessor method can be invoked in either scalar or list context. my $export_policies_to_include = $obj->export_policies_to_include(); # $export_policies_to_include contains a reference to the array of values my @export_policies_to_include = $obj->export_policies_to_include(); # @export_policies_to_include contains the array of values Filled in for CMode CLI. =item C<< shares_to_exclude >> Filled in for CMode CLI/ZAPI. (Array) Maps to: CM ZAPI: @array Note that for array fields, the accessor method can be invoked in either scalar or list context. my $shares_to_exclude = $obj->shares_to_exclude(); # $shares_to_exclude contains a reference to the array of values my @shares_to_exclude = $obj->shares_to_exclude(); # @shares_to_exclude contains the array of values Filled in for CMode CLI. =item C<< policy_name >> Filled in for CMode CLI/ZAPI. Maps to: CM ZAPI: $value =item C<< file_extensions_to_include >> Filled in for CMode CLI/ZAPI. (Array) Maps to: CM ZAPI: @array Note that for array fields, the accessor method can be invoked in either scalar or list context. my $file_extensions_to_include = $obj->file_extensions_to_include(); # $file_extensions_to_include contains a reference to the array of values my @file_extensions_to_include = $obj->file_extensions_to_include(); # @file_extensions_to_include contains the array of values Filled in for CMode CLI. =item C<< volumes_to_exclude >> Filled in for CMode CLI/ZAPI. (Array) Maps to: CM ZAPI: @array Note that for array fields, the accessor method can be invoked in either scalar or list context. my $volumes_to_exclude = $obj->volumes_to_exclude(); # $volumes_to_exclude contains a reference to the array of values my @volumes_to_exclude = $obj->volumes_to_exclude(); # @volumes_to_exclude contains the array of values Filled in for CMode CLI. =item C<< volumes_to_exclude >> Filled in for CMode CLI/ZAPI. (Array) Maps to: CM ZAPI: @array =item C<< export_policies_to_exclude >> Filled in for CMode CLI/ZAPI. (Array) Maps to: CM ZAPI: @array Note that for array fields, the accessor method can be invoked in either scalar or list context. my $export_policies_to_exclude = $obj->export_policies_to_exclude(); # $export_policies_to_exclude contains a reference to the array of values my @export_policies_to_exclude = $obj->export_policies_to_exclude(); # @export_policies_to_exclude contains the array of values Filled in for CMode CLI. =item C<< file_extensions_to_exclude >> Filled in for CMode CLI/ZAPI. (Array) Maps to: CM ZAPI: @array Note that for array fields, the accessor method can be invoked in either scalar or list context. my $file_extensions_to_exclude = $obj->file_extensions_to_exclude(); # $file_extensions_to_exclude contains a reference to the array of values my @file_extensions_to_exclude = $obj->file_extensions_to_exclude(); # @file_extensions_to_exclude contains the array of values Filled in for CMode CLI. =item C<< volumes_to_include >> Filled in for CMode CLI/ZAPI. (Array) Maps to: CM ZAPI: @array Note that for array fields, the accessor method can be invoked in either scalar or list context. my $volumes_to_include = $obj->volumes_to_include(); # $volumes_to_include contains a reference to the array of values my @volumes_to_include = $obj->volumes_to_include(); # @volumes_to_include contains the array of values Filled in for CMode CLI. =item C<< volumes_to_include >> Filled in for CMode CLI/ZAPI. (Array) Maps to: CM ZAPI: @array =item C<< enable_file_extension_check_on_directories >> *Enable File Extension Check on Directories, possible value(s) are true,false Filled in for CMode CLI. =item C<< is_file_extension_check_on_directories_enabled >> *Is File Extension Check on Directories Enabled, possible value(s) are true,false Filled in for CMode CLI/ZAPI. Maps to: CM ZAPI: $value =back =cut package NACL::CS::VserverFpolicyPolicyScope; 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::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 => 'vserver', array => 'shares_to_include', array => 'export_policies_to_include', array => 'shares_to_exclude', scalar => 'policy_name', array => 'file_extensions_to_include', array => 'volumes_to_exclude', array => 'export_policies_to_exclude', array => 'file_extensions_to_exclude', array => 'volumes_to_include', scalar => 'enable_file_extension_check_on_directories', scalar => 'is_file_extension_check_on_directories_enabled', ]; =head1 METHODS =head2 fetch my $VserverFpolicyPolicyScope_state = NACL::CS::VserverFpolicyPolicyScope->fetch(command_interface => $ci, ...); my @VserverFpolicyPolicyScope_states = NACL::CS::VserverFpolicyPolicyScope->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. Invokes "fpolicy-policy-scope-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( @_, show_cmd => 'vserver fpolicy policy scope show', choices => [ { method => '_fetch_cmode_cli', interface => 'CLI', set => 'CMode' }, { method => '_fetch_cmode_zapi', interface => 'ZAPI', set => 'CMode' } ## end ], exception_text => 'No matching vserver fpolicy policy scope(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, %opts) = @_; my @state_objs = $pkg->SUPER::_fetch_cmode_cli(%opts, api => 'vserver_fpolicy_policy_scope_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, %opts) = @_; my @state_objs = $pkg->SUPER::_fetch_cmode_zapi( %opts, api => 'fpolicy_policy_scope_get_iter', copy => [qw( policy-name vserver )], map => { 'shares-to-include' => [ make_zapi_array('shares-to-include'), make_zapi_skip('string'), ], 'export-policies-to-exclude' => [ make_zapi_array('export-policies-to-exclude'), make_zapi_skip('string') ], 'export-policies-to-include' => [ make_zapi_array('export-policies-to-include'), make_zapi_skip('string') ], 'file-extensions-to-exclude' => [ make_zapi_array('file-extensions-to-exclude'), make_zapi_skip('string'), ], 'file-extensions-to-include' => [ make_zapi_array('file-extensions-to-include'), make_zapi_skip('string'), ], 'shares-to-exclude' => [ make_zapi_array('shares-to-exclude'), make_zapi_skip('string'), ], 'volumes-to-exclude' => [ make_zapi_array('volumes-to-exclude'), make_zapi_skip('string'), ], 'volumes-to-include' => [ make_zapi_array('volumes-to-include'), make_zapi_skip('string'), ], 'is-file-extension-check-on-directories-enabled' => 'check-extensions-on-directories', }, ); $Log->exit() if $may_exit; return @state_objs; } ## end sub _fetch_cmode_zapi 1;