# $Id$ # # Copyright (c) 2001-2015 NetApp, Inc., All Rights Reserved # Any use, modification, or distribution is prohibited # without prior written consent from NetApp, Inc. # ## @summary VserverServicesNameServiceLdapClientSchema ComponentState Module (auto-generated by CGT) ## @author dl-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::CS::VserverServicesNameServiceLdapClientSchema =head1 DESCRIPTION C is a derived class of L. It represents the state of an ONTAP VserverServicesNameServiceLdapClientSchema. A related class is L, which represents access to an ONTAP VserverServicesNameServiceLdapClientSchema. =head1 ATTRIBUTES The individual pieces of data that are part of the state of the VserverServicesNameServiceLdapClientSchema element are the attributes of the VserverServicesNameServiceLdapClientSchema 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<< posix_account_object_class >> RFC 2307 posixAccount Object Class Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< member_uid_attribute >> RFC 2307 memberUid Attribute Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< posix_group_object_class >> RFC 2307 posixGroup Object Class Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< unix_account_attribute >> ONTAP Name Mapping unixAccount Attribute Filled in for CMode CLI/ZAPI iter =item C<< uid_number_attribute >> RFC 2307 uidNumber Attribute Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< nis_mapentry_attribute >> RFC 2307 nisMapEntry Attribute Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< schema >> Schema Template Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< cn_netgroup_attribute >> RFC 2307 cn (for Netgroups) Attribute Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< windows_to_unix_attribute >> ONTAP Name Mapping windowsToUnix Attribute Filled in for CMode CLI/ZAPI iter =item C<< unique_member_attribute >> RFC 2307bis uniqueMember Attribute Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< nis_netgroup_triple_attribute >> RFC 2307 nisNetgroupTriple Attribute Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< user_password_attribute >> RFC 2307 userPassword Attribute Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< is_owner >> Vserver Owns Schema possible value(s) are, true,false Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< home_directory_attribute >> RFC 2307 homeDirectory Attribute Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< windows_to_unix_object_class >> ONTAP Name Mapping windowsToUnix Object Class Filled in for CMode CLI/ZAPI iter =item C<< cn_group_attribute >> RFC 2307 cn (for Groups) Attribute Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< login_shell_attribute >> RFC 2307 loginShell Attribute 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<< gecos_attribute >> RFC 2307 gecos Attribute Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< member_nis_netgroup_attribute >> RFC 2307 memberNisNetgroup Attribute Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< nis_netgroup_object_class >> RFC 2307 nisNetgroup Object Class Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< gid_number_attribute >> RFC 2307 gidNumber Attribute Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< maximum_groups_rfc2307bis >> Maximum groups supported when RFC 2307bis enabled ranges from 1 to 1024 Filled in for CMode CLI/ZAPI iter =item C<< group_of_unique_names_object_class >> RFC 2307bis groupOfUniqueNames Object Class Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< comment >> Comment Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< uid_attribute >> RFC 2307 uid Attribute Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< windows_account_attribute >> ONTAP Name Mapping windowsAccount Attribute Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< nis_object_class >> RFC 2307 nisObject Object Class Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< enable_rfc2307bis >> Enable Support for Draft RFC 2307bis possible value(s) are, true,false Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =item C<< nis_mapname_attribute >> RFC 2307 nisMapName Attribute Filled in for CMode CLI/ZAPI iter Mapping for CMode ZAPI iter: =back =cut package NACL::CS::VserverServicesNameServiceLdapClientSchema; 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 => 'posix_account_object_class', scalar => 'member_uid_attribute', scalar => 'posix_group_object_class', scalar => 'unix_account_attribute', scalar => 'uid_number_attribute', scalar => 'nis_mapentry_attribute', scalar => 'schema', scalar => 'cn_netgroup_attribute', scalar => 'windows_to_unix_attribute', scalar => 'unique_member_attribute', scalar => 'nis_netgroup_triple_attribute', scalar => 'user_password_attribute', scalar => 'is_owner', scalar => 'home_directory_attribute', scalar => 'windows_to_unix_object_class', scalar => 'cn_group_attribute', scalar => 'login_shell_attribute', scalar => 'vserver', scalar => 'gecos_attribute', scalar => 'member_nis_netgroup_attribute', scalar => 'nis_netgroup_object_class', scalar => 'gid_number_attribute', scalar => 'maximum_groups_rfc2307bis', scalar => 'group_of_unique_names_object_class', scalar => 'comment', scalar => 'uid_attribute', scalar => 'windows_account_attribute', scalar => 'nis_object_class', scalar => 'enable_rfc2307bis', scalar => 'nis_mapname_attribute', ]; my $Log = log_global(); my $may_enter = $Log->may_enter(); my $may_exit = $Log->may_exit(); =head1 METHODS =head2 fetch my $VserverServicesNameServiceLdapClientSchema_state = NACL::CS::VserverServicesNameServiceLdapClientSchema->fetch(command_interface => $ci, ...); my @VserverServicesNameServiceLdapClientSchema_states = NACL::CS::VserverServicesNameServiceLdapClientSchema->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 ldap-client-schema-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 services name-service ldap client schema 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 VserverServicesNameServiceLdapClientSchema(s) found', frontend => 'NACL::CS::VserverServicesNameServiceLdapClientSchema::fetch', ); $Log->exit() if $may_exit; return wantarray ? @state_objs : $state_objs[0]; } sub _fetch_cmode_cli { $Log->enter() if $may_enter; my ($pkg, @args) = @_; my @state_objs = $pkg->SUPER::_fetch_cmode_cli(@args, api => 'vserver_services_name_service_ldap_client_schema_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(member-uid-attribute posix-account-object-class posix-group-object-class uid-number-attribute nis-mapentry-attribute cn-netgroup-attribute schema unique-member-attribute nis-netgroup-triple-attribute user-password-attribute is-owner home-directory-attribute cn-group-attribute vserver login-shell-attribute gecos-attribute member-nis-netgroup-attribute gid-number-attribute nis-netgroup-object-class group-of-unique-names-object-class uid-attribute comment windows-account-attribute nis-object-class enable-rfc2307bis nis-mapname-attribute ) ], api => "ldap-client-schema-get-iter", ); $Log->exit() if $may_exit; return @state_objs; } 1;