# # Copyright (c) 2001-2012 NetApp, Inc., All Rights Reserved # Any use, modification, or distribution is prohibited # without prior written consent from NetApp, Inc. # ## @summary AntivirusOnDemandCommandScanCluster Task Module ## @author dl-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::STask::AntivirusOnDemandCommandScanCluster =head1 DESCRIPTION C provides a number of well-defined but potentially complex or multi-step methods related to AntivirusOnDemandCommandScanClusters in ONTAP. It builds on top of, and is a derived class of C, and so it also provides methods that are more in the scope of individual AntivirusOnDemandCommandScanCluster-related commands. See C for details. This also means that a C object may generally be used in place of a component object. =head1 ATTRIBUTES =head2 command_interface (Required) A component object that represents the host to which to send commands. =head2 name (Required) The name of the AntivirusOnDemandCommandScanCluster. =head2 vserver (Required) The vserver for which the scan is being performed. =cut package NACL::STask::AntivirusOnDemandCommandScanCluster; use base qw(NACL::C::AntivirusOnDemandCommandScanCluster NACL::STask::STask); # Pull implementation from mix-in use NACL::STask::_Mixins::AntivirusOnDemandCommand qw(:all); =head1 METHODS =head2 create my $Avod_Scan_Cluster_Obj = NACL::STask::AntivirusOnDemandCommand->create( command_interface => $command_interface, name => $command_name, vserver => $vserver_name, nacltask_if_exists => $action, # default 'die' nacltask_verify => 0|1, # default '0' %other_options ); (Class method) Create an Antivirus On-Demand Command. This method provides additional services beyond what's inherent to the product's AntivirusOnDemandCommand creation commands, as controlled and described by the new C and C options. =over =item Options =over =item C<< nacltask_if_exists => $action >> (Optional, defaults to "die") Specifies an action to be taken if the AntivirusOnDemandCommand already exists. =over =item C When set to "die", an exception is thrown if the AntivirusOnDemandCommand already exists. =item C If a AntivirusOnDemandCommand of the same name already exists, reuse it. =item C If a AntivirusOnDemandCommand of the same name already exists, purge it and create a new one. =back =back =item C<< nacltask_verify => 0|1 >> (Optional, defaults to 0) =over =item When set to 0, verification is not performed. =item When set to 1, it is verified that the created AntivirusOnDemandCommand has all of the attributes specified. =back Note that it is also possible to perform the verification later by calling L. This can be used for cases where ONTAP chooses to not set all attributes to the exact values specified. In the call we can specify those attributes we want verified. =item C<< _was_created => \$scalar >> (Optional) When this option is provided a reference to a scalar variable, the variable gets filled in with a boolean value describing whether the volume was found (value will be 0; this scenario is possible when nacltask_if_exists => "reuse") or whether the aggregate was created (value will be 1). This is necessary to determine whether the aggregate needs to be cleaned up later. my $was_created; my $Avod_Scan_Cluster_Obj = NACL::STask::AntivirusOnDemandCommandScanCluster->create( nacltask_if_exists => 'reuse', _was_created => \$was_created, %other_opts ); # Operate on $Avod_Scan_Cluster_Obj here # ... # Now determine whether to clean up the AntivirusOnDemandCommand, since we're not sure # whether we reused an existing command or created a new one if ($was_created) { # New avod command was created. Clean it up. $Avod_Scan_Cluster_Obj->purge(); } =item Other options All of the other various options are described in L<< NACL::C::AntivirusOnDemandCommandScanCluster->create|lib-NACL-C-AntivirusOnDemandCommandScanCluster-pm/create >> =back =over =item Exceptions =over =item C This type of exception is thrown when an attempt is made to create AntivirusOnDemandCommand Scan Cluster when it already exists. =item C This type of exception is thrown when verification fails for the created AntivirusOnDemandCommand Scan Cluster. =back =back =head2 modify NACL::STask::AntivirusOnDemandCommandScanCluster->modify( command_interface => $command_interface, name => $name, vserver => $vserver, nacltask_verify => $boolean, %other_opts ); or $Avod_Scan_Cluster_Obj->modify(nacltask_verify => $boolean, %other_opts); Modifies properties of the scan. Also supports verification that all of the properties got modified to the new values through the C argument. =over =item Options =over =item C<< nacltask_verify => 0 | 1 >> (Optional, defaults to 0) If the value is 1, then verifies that all the properties got modified to the new values. Note that this can be performed separately using the L method. =back =back =head2 purge NACL::STask::AntivirusOnDemandCommandScanCluster->purge( command_interface => $command_interface, name => $name, vserver => $vserver_name, %other_options, ); or $Avod_Scan_Cluster_Obj->purge(); (Class or instance method) This method deletes an Antivirus On-Demand Command. =over =item Options =over =item C<< nacltask_if_purged => 'die' | 'pass' >> (Optional, defaults to 'die') What to do if the operation has already been deleted. A value of "die" will result in an exception being throw, a value of "pass" will result in the exception being suppressed. =item C<< nacltask_verify => 0 | 1 >> (Optional, defaults to 0) Verifies that the operation has been deleted if the value is 1. Note that this can be performed separately using the L method. =item Other options All of the other various options are described in L<< NACL::C::AntivirusOnDemandCommandScanCluster->delete|lib-NACL-C-AntivirusOnDemandCommandScanCluster-pm/delete >> =back =back =over =item Exceptions =over =item C This type of exception is thrown when an attempt is made to delete AntivirusOnDemandCommand Scan Cluster that does not exists. =item C This type of exception is thrown when an attempt is made to delete AntivirusOnDemandCommand Scan Cluster when it is in use. =item C This type of exception is thrown when verification fails for the deleted AntivirusOnDemandCommand Scan Cluster. =back =back =cut 1;