# $Id$ # # Copyright (c) 2001-2011 NetApp, Inc., All Rights Reserved # Any use, modification, or distribution is prohibited # without prior written consent from NetApp, Inc. # ## @summary ClusterImageShowUpdateLogDetailTest Component Module (auto-generated by CGT) ## @author dl-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::C::ClusterImageShowUpdateLogDetailTest =head1 DESCRIPTION C is a derived class of L. It represents access to an ONTAP ClusterImageShowUpdateLogDetailTest. A related class is L, which represents the past state of an ONTAP ClusterImageShowUpdateLogDetailTest. =head1 ATTRIBUTES =head2 command_interface See L =head2 node =head2 msg_seq_no =head2 posted_time =head2 current_pid =head2 task_id =cut package NACL::C::ClusterImageShowUpdateLogDetailTest; use strict; use warnings; use NACL::CS::ClusterImageShowUpdateLogDetailTest; use NACL::ComponentUtils qw (_optional_scalars Dumper); use base 'NACL::C::Component::ONTAP'; use Params::Validate qw(validate_with SCALAR ARRAYREF SCALARREF); 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 $ClusterImageShowUpdateLogDetailTest = NACL::C::ClusterImageShowUpdateLogDetailTest->new( command_interface => $ci, 'node' => $node, 'msg-seq-no' => $msg_seq_no, 'posted-time' => $posted_time, 'current-pid' => $current_pid, 'task-id' => $task_id, ); Return a new ClusterImageShowUpdateLogDetailTest component object with the given attributes. =cut use Class::MethodMaker [ scalar => 'node', scalar => 'msg_seq_no', scalar => 'posted_time', scalar => 'current_pid', scalar => 'task_id', ]; =head2 find my $ClusterImageShowUpdateLogDetailTest_obj = NACL::C::ClusterImageShowUpdateLogDetailTest->find(command_interface => $ci, ...); my @ClusterImageShowUpdateLogDetailTest_objs = NACL::C::ClusterImageShowUpdateLogDetailTest->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 ClusterImageShowUpdateLogDetailTest_state = $ClusterImageShowUpdateLogDetailTest_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::ClusterImageShowUpdateLogDetailTest would return a NACL::CS::ClusterImageShowUpdateLogDetailTest 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 create my $ClusterImageShowUpdateLogDetailTest_obj = NACL::C::ClusterImageShowUpdateLogDetailTest->create( command_interface => $ci, 'node' => $node, 'msg-seq-no' => $msg_seq_no, 'posted-time' => $posted_time, 'current-pid' => $current_pid, 'task-id' => $task_id, ...); (Class method) Uses a CMode CLI APISet. =over =item Options =over =item C<< command_interface => $command_interface >> (Required) See L =item C<< apiset_must => $ruleset >> (Optional) See L =item C<< apiset_should => $ruleset >> (Optional) See L =item C<< 'node' => $node >> (Required) Node possible value(s) are, ,local Applicable for CMode CLI =item C<< 'msg-seq-no' => $msg_seq_no >> (Required) Message Sequence Applicable for CMode CLI =item C<< 'posted-time' => $posted_time >> (Required) Posted Time Applicable for CMode CLI =item C<< 'current-pid' => $current_pid >> (Required) process ID Applicable for CMode CLI =item C<< 'task-id' => $task_id >> (Required) Task Id Applicable for CMode CLI =item C<< 'destination' => $string >> task target node Applicable for CMode CLI =item C<< 'status' => $string >> Status Of Task possible value(s) are, created,ready-to-run,running,completed,failed,pause_req,paused,paused-error,cancel_req,canceled,resume_req,default_status Applicable for CMode CLI =item C<< 'src-info' => $string >> Source Information Applicable for CMode CLI =item C<< 'msg-type' => $string >> Type of Message Applicable for CMode CLI =item C<< 'message' => $string >> Update Log Message Applicable for CMode CLI =item C<< 'ndu-phase' => $string >> Update phase Applicable for CMode CLI =item C<< 'task-name' => $string >> Task Name possible value(s) are, initialize,mount-image,restart-hm,get-health,run-scripts,unmount-image,clear-alert,post-restart-hm,cleanup-rd,synch-image,do-download-job,do-failover-job,check-progress,complete-validation,invalid-task,default-task Applicable for CMode CLI =item C<< 'cmd_execution_time' => \$scalar >> (Optional) Scalar reference , it will be updated with the command execution time returned by the apiset response object =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<< '*' >> This method takes all other options supported by "cluster image show update log detail test create" command in ONTAP =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 create { $Log->enter() if $may_enter; my ( $pkg, @args ) = @_; $pkg->_frontend_log_debug_opts(@args); my %opts = $pkg->_common_validate_with( params => \@args, additional_spec => { 'cmd_execution_time' => { type => SCALARREF, optional => 1 }, _optional_scalars( qw( destination status src-info msg-type message ndu-phase task-name ) ), }, api => 'cluster_image_show_update_log_detail_test_create', ); my $obj = $pkg->call_on_apiset( %opts, choices => [ { method => '_create_cmode_cli', interface => 'CLI', set => 'CMode', }, ], frontend => 'NACL::C::ClusterImageShowUpdateLogDetailTest::create', ); $Log->exit() if $may_exit; return $obj; } sub _create_cmode_cli { $Log->enter() if $may_enter; my ( $pkg, %opts ) = @_; my $command_interface = $opts{command_interface}; $pkg->_base_backend_cmode_cli( %opts, api => 'cluster_image_show_update_log_detail_test_create', ); $Log->exit() if $may_exit; return $pkg->new( command_interface => $command_interface, node => $opts{'node'}, msg_seq_no => $opts{'msg-seq-no'}, posted_time => $opts{'posted-time'}, current_pid => $opts{'current-pid'}, task_id => $opts{'task-id'}, ); } =head2 delete NACL::C::ClusterImageShowUpdateLogDetailTest->delete( command_interface => $ci, 'node' => $node, 'msg-seq-no' => $msg_seq_no, 'posted-time' => $posted_time, 'current-pid' => $current_pid, 'task-id' => $task_id, ...); or $ClusterImageShowUpdateLogDetailTest_obj->delete(...); (Class or instance method) Uses a CMode CLI APISet. =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<< 'node' => $node >> (Required for class method, Not Applicable for instance method) Node possible value(s) are, ,local Applicable for CMode CLI =item C<< 'msg-seq-no' => $msg_seq_no >> (Required for class method, Not Applicable for instance method) Message Sequence Applicable for CMode CLI =item C<< 'posted-time' => $posted_time >> (Required for class method, Not Applicable for instance method) Posted Time Applicable for CMode CLI =item C<< 'current-pid' => $current_pid >> (Required for class method, Not Applicable for instance method) process ID Applicable for CMode CLI =item C<< 'task-id' => $task_id >> (Required for class method, Not Applicable for instance method) Task Id Applicable for CMode CLI =item C<< 'cmd_execution_time' => \$scalar >> (Optional) Scalar reference , it will be updated with the command execution time returned by the apiset response object =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<< '*' >> This method takes all other options supported by "cluster image show update log detail test delete" command in ONTAP =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 delete { $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 => { 'cmd_execution_time' => { type => SCALARREF, optional => 1 }, }, api => 'cluster_image_show_update_log_detail_test_delete', ); $pkg_or_obj->call_on_apiset( %opts, choices => [ { method => '_delete_cmode_cli', interface => 'CLI', set => 'CMode', }, ], frontend => 'NACL::C::ClusterImageShowUpdateLogDetailTest::delete', ); $Log->exit() if $may_exit; } sub _delete_cmode_cli { $Log->enter() if $may_enter; my ( $pkg, %opts ) = @_; $pkg->_base_backend_cmode_cli( %opts, api => 'cluster_image_show_update_log_detail_test_delete', ); $Log->exit() if $may_exit; } __PACKAGE__->_load_event_class(); sub _primary_keys_validate_spec { return ( 'node' => { type => SCALAR }, 'msg-seq-no' => { type => SCALAR }, 'posted-time' => { type => SCALAR }, 'current-pid' => { type => SCALAR }, 'task-id' => { type => SCALAR }, ); } 1;