# # Copyright (c) 2001-2012 NetApp, Inc., All Rights Reserved # Any use, modification, or distribution is prohibited # without prior written consent from NetApp, Inc. # ## @summary VserverServicesLdapClientSchema ComponentState Module ## @author dl-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::CS::VserverServicesLdapClientSchema =head1 DESCRIPTION C is a derived class of L. It represents the state of an ONTAP VserverServicesLdapClientSchema. A related class is L, which represents access to an ONTAP VserverServicesLdapClientSchema. =head1 ATTRIBUTES The individual pieces of data that are part of the state of the VserverServicesLdapClientSchema element are the attributes of the VserverServicesLdapClientSchema ComponentState. =over =item C<< "member_uid_attribute" >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< "posix_account_object_class" >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< "posix_group_object_class" >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< "unix_account_attribute" >> Filled in for CMode CLI. =item C<< "uid_number_attribute" >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< "schema" >> Filled in for CMode CLI/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< "cn_netgroup_attribute" >> Filled in for CMode/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< "windows_to_unix_attribute" >> Filled in for CMode CLI. =item C<< "unique_member_attribute" >> Filled in for CMode CLI. =item C<< "nis_netgroup_triple_attribute" >> Filled in for CMode/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< "user_password_attribute" >> Filled in for CMode/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< "home_directory_attribute" >> Filled in for CMode/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< "windows_to_unix_object_class" >> Filled in for CMode CLI. =item C<< "cn_group_attribute" >> Filled in for CMode/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< "login_shell_attribute" >> Filled in for CMode/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< "gecos_attribute" >> Filled in for CMode/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< "member_nis_netgroup_attribute" >> Filled in for CMode/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< "gid_number_attribute" >> Filled in for CMode/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< "nis_netgroup_object_class" >> Filled in for CMode/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< "group_of_unique_names_object_class" >> Filled in for CMode CLI. =item C<< "uid_attribute" >> Filled in for CMode/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< "comment" >> Filled in for CMode/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< "windows_account_attribute" >> Filled in for CMode/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< "enable_rfc2307bis" >> Filled in for CMode CLI. =item C<< is_owner >> Filled in for CMode/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =item C<< vserver >> Filled in for CMode/ZAPI. Maps to: CMode ZAPI: For "requested_fields", "filter" and Output mapping: $value =back =cut package NACL::CS::VserverServicesLdapClientSchema; use strict; use warnings; use Params::Validate qw(validate); use NACL::ComponentUtils qw(_dump_one); use NACL::C::_Mixins::VserverServicesLdapClientSchema qw(:all); 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 => 'member_uid_attribute', scalar => 'posix_account_object_class', scalar => 'posix_group_object_class', scalar => 'unix_account_attribute', scalar => 'uid_number_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 => 'home_directory_attribute', scalar => 'windows_to_unix_object_class', scalar => 'cn_group_attribute', scalar => 'login_shell_attribute', scalar => 'gecos_attribute', scalar => 'member_nis_netgroup_attribute', scalar => 'gid_number_attribute', scalar => 'nis_netgroup_object_class', scalar => 'group_of_unique_names_object_class', scalar => 'uid_attribute', scalar => 'comment', scalar => 'windows_account_attribute', scalar => 'enable_rfc2307bis', scalar => 'is_owner', scalar => 'vserver', ]; =head1 METHODS =head2 fetch my $VserverServicesLdapClientSchema_state = NACL::CS::VserverServicesLdapClientSchema->fetch(command_interface => $ci, ...); my @VserverServicesLdapClientSchema_states = NACL::CS::VserverServicesLdapClientSchema->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. Invokes "ldap-client-schema-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 services ldap client schema show', choices => [ { method => '_fetch_cmode_cli', interface => 'CLI', set => 'CMode', }, { method => '_fetch_cmode_zapi', interface => 'ZAPI', set => 'CMode', }, ], exception_text => 'No matching vserver services ldap client schema(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_services_ldap_client_schema_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 $common_copy = $pkg->_common_zapi_copy(); push(@$common_copy, qw(is_owner vserver)); my @state_objs = $pkg->SUPER::_fetch_cmode_zapi( @_, api => 'ldap_client_schema_get_iter', copy => $common_copy ); $Log->exit() if $may_exit; return @state_objs; } ## end sub _fetch_cmode_zapi 1;