# $Id$ # # Copyright (c) 2013 NetApp, Inc., All Rights Reserved # Any use, modification, or distribution is prohibited # without prior written consent from NetApp, Inc. # ## @summary CifsDomain ComponentState Module (auto-generated by OCUM CGT) ## @author dl-mpo-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::CS::DFM::CifsDomain =head1 DESCRIPTION C is a derived class of L. It represents the state of a CifsDomain. ## Link removed =head1 ATTRIBUTES The individual pieces of data that are part of the state of the CifsDomain element are the attributes of the CifsDomain ComponentState. =over =item C<< cifs_dns_domain_name >> =item C<< cifs_domain_name >> =back =cut package NACL::CS::DFM::CifsDomain; use strict; use warnings; use Params::Validate qw(validate validate_with SCALAR ARRAYREF HASHREF); use NACL::ComponentUtils qw(Dumper); use NATE::Log qw(log_global); my $Log = log_global(); my $may_enter = $Log->may_enter(); my $may_exit = $Log->may_exit(); use base 'NACL::CS::ComponentState::DFM'; use Class::MethodMaker [ new => [ '-hash', 'new' ], scalar => 'cifs_dns_domain_name', scalar => 'cifs_domain_name', ]; =head1 METHODS =head2 fetch my $state = NACL::CS::DFM::CifsDomain->fetch(command_interface => $ci, ...); my @states = NACL::CS::DFM::CifsDomain->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. =cut sub fetch { $Log->enter() if $may_enter; my $pkg = shift; my @state_objs = $pkg->SUPER::fetch( @_, choices => [ { method => '_fetch_zapi', interface => 'ZAPI', set => 'DFM', }, ], exception_text => 'No matching CifsDomain(s) found.', ); $Log->exit() if $may_exit; return wantarray ? @state_objs : $state_objs[0]; } sub _fetch_zapi { $Log->enter() if $may_enter; my $pkg = shift; my @state_objs = $pkg->SUPER::_fetch_dfm_zapi( @_, api => 'cifs-domain-list-info-iter', ); $Log->exit() if $may_exit; return @state_objs; } 1;