# # Copyright (c) 2001-2012 NetApp, Inc., All Rights Reserved # Any use, modification, or distribution is prohibited # without prior written consent from NetApp, Inc. # ## @summary SecurityCertificateCaIssued Component Module (auto-generated by CGT) ## @author dl-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::C::SecurityCertificateCaIssued =head1 DESCRIPTION C is a derived class of L. It represents access to an ONTAP SecurityCertificateCaIssued. A related class is L, which represents the past state of an ONTAP SecurityCertificateCaIssued. =head1 ATTRIBUTES =head2 command_interface See L =head2 serial =head2 vserver =head2 ca =head2 ca_serial =cut package NACL::C::SecurityCertificateCaIssued; use strict; use warnings; use NACL::CS::SecurityCertificateCaIssued; use NACL::ComponentUtils qw (_optional_scalars Dumper); use base 'NACL::C::Component::ONTAP'; use Params::Validate qw(validate validate_with SCALAR ARRAYREF); use NATE::Log qw(log_global); my $Log = log_global(); my $may_enter = $Log->may_enter(); my $may_exit = $Log->may_exit(); =head1 METHODS =head2 new my $SecurityCertificateCaIssued = NACL::C::SecurityCertificateCaIssued->new( command_interface => $ci, 'serial' => $serial, 'vserver' => $vserver, 'ca'=> $ca, 'ca-serial' => $ca_serial, ); Return a new SecurityCertificateCaIssued component object with the given attributes. =cut use Class::MethodMaker [ scalar => 'serial', scalar => 'vserver', scalar => 'ca', scalar => 'ca_serial', ]; sub init { $Log->enter() if $may_enter; my ($self, @args) = @_; $self->SUPER::init(@args); $self->_vserver_context_init(@args); $Log->exit() if $may_exit; } =head2 find my $SecurityCertificateCaIssued_obj = NACL::C::SecurityCertificateCaIssued->find(command_interface => $ci, ...); my @SecurityCertificateCaIssued_objs = NACL::C::SecurityCertificateCaIssued->find(command_interface => $ci, ...); (Class method) A constructor of sorts, which discovers which elements are present (by interacting with the given command interface). In an array context it creates a component object for each present element and returns them. In a scalar context it creates a component object for just one element. This method is generally not implemented in individual components. The base class (L provides an implementation. See for a more detailed description along with explanation of all the options accepted. Uses a CMode CLI APISet. =head2 state my SecurityCertificateCaIssued_state = $SecurityCertificateCaIssued_obj->state(); (Instance method) Fetch the current state of the element associated with this component, and return a Component State object corresponding to this component (calling this on NACL::C::SecurityCertificateCaIssued would return a NACL::CS::SecurityCertificateCaIssued object) This method is generally not implemented in individual components. The base class (L provides an implementation. See for a more detailed description along with explanation of all the options accepted. Uses a CMode CLI APISet. =cut =head2 revoke NACL::C::SecurityCertificateCaIssued->revoke( command_interface => $ci, 'ca-serial' => $ca_serial, 'serial' => $serial, 'vserver' => $vserver, 'ca' => $ca, ...); or $SecurityCertificateCaIssued_obj->revoke(...); (Class or instance method) This method is used to revoke a Digital Certificate. Uses a CMode CLI/ZAPI APISet. Invokes 'security-certificate-revoke' API for CMode ZAPI. =over =item Options =over =item C<< command_interface => $command_interface >> (Required for class method, Not Applicable for instance method) See L =item C<< apiset_must => $ruleset >> (Optional) See L =item C<< apiset_should => $ruleset >> (Optional) See L =item C<< 'ca-serial' => $ca_serial >> Applicable for CMode CLI/ZAPI Maps to: CM ZAPI: ca-serial-number (Required for class method, Not Applicable for instance method) =item C<< 'serial' => $serial >> Applicable for CMode CLI/ZAPI Maps to: CM ZAPI: serial-number (Required for class method, Not Applicable for instance method) =item C<< 'vserver' => $vserver >> (Required for class method, Not Applicable for instance method) Applicable only for CMode CLI =item C<< 'ca' => $ca >> Applicable for CMode CLI/ZAPI Maps to: CM ZAPI: certificate-authority (Required for class method, Not Applicable for instance method) =item C<< 'common-name' => $string >> Applicable for CMode CLI/ZAPI Maps to: CM ZAPI: common-name =item C<< 'method-timeout' => $time_in_seconds >> (Optional) The default NATE timeout is 60 seconds. If the command might take more time to complete, this option can be used to specify a larger timeout value. The value should be provided in seconds. =item C<< 'extended_query' => $string >> (Optional) Applicable only for CMode CLI =item C<< other_options >> This method takes other common options described in L =item C<< '*' >> This method takes all other options supported by "security certificate ca-issued revoke" command in ONTAP. Applicable for CMode CLI. =back =back =over =item Exceptions =over =item C In general, Component methods propagate the exceptions thrown from underlying API layer and the details of those exceptions are described in the L of user guide. =back =back =cut sub revoke { $Log->enter() if $may_enter; my ($pkg_or_obj, @args) = @_; $pkg_or_obj->_frontend_log_debug_opts(@args); my %opts = $pkg_or_obj->_common_validate_with( params => \@args, additional_spec => { _optional_scalars( qw( common-name ca-serial vserver serial ca ) ), }, cli_cmd => 'security certificate ca-issued revoke', ); my $vserver; $opts{vserver_operated_on} = \$vserver; $pkg_or_obj->call_on_apiset( %opts, choices => [ { method => '_revoke_cmode_cli', interface => 'CLI', set => 'CMode', }, { method => '_revoke_cmode_zapi', interface => 'ZAPI', set => 'CMode', }, ], frontend => 'NACL::C::SecurityCertificateCaIssued::revoke', ); $Log->exit() if $may_exit; } ## end sub revoke sub _revoke_cmode_cli { $Log->enter() if $may_enter; my ($pkg_or_obj, @opts) = @_; $pkg_or_obj->_base_backend_cmode_cli(@opts, api => 'security_certificate_ca_issued_revoke',); $Log->exit() if $may_exit; } ## end sub _revoke_cmode_cli sub _revoke_cmode_zapi { $Log->enter() if $may_enter; my ($pkg_or_obj, @args) = @_; my $allowed_cmode_options = [qw( common-name )]; $pkg_or_obj->_base_backend_cmode_zapi(@args, api => 'security_certificate_revoke', copy => $allowed_cmode_options, map => { "ca-serial" => "ca-serial-number", "ca" => "certificate-authority", "serial" => "serial-number" }, ); $Log->exit() if $may_exit; } __PACKAGE__->_load_event_class(); sub _primary_keys_validate_spec { return ( 'serial' => {type => SCALAR}, 'vserver' => {type => SCALAR}, 'ca-serial' => {type => SCALAR}, 'ca' => {type => SCALAR}, ); } ## end sub _primary_keys_validate_spec 1;