Use of InvokeSync with Smarts Perl API
search cancel

Use of InvokeSync with Smarts Perl API

book

Article ID: 327748

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Symptoms:


What parameters are needed to use invokeSync command?

invokeSync command is being used from a Perl script as follows:

       my $resultString=$action1->invoke("invokeSync",$notif_ref,$notif_ref,$templist);

templist being a 2-element array the following error is shown when running the script:

      [6] Reference to 2-element array expected for argument to InCharge primitive 'invokeOperation', stopped at /opt/InCharge6/SAM/smarts/local/actions/server/remoteTool.pl line 87

Environment

VMware Smart Assurance - SMARTS

Resolution

A two-dimensional array, with two rows in it is needed as the parameter. For example:

            my $resultObj = $action1->invokeSync($obj, $obj, [    
                        [ "ANYVALARRAY",
                        [ [ "STRING", "1" ],
                        [ "STRING", "1" ]
                        ] ] ] );


Additional Information

invokeSync is a command that belongs to ICS_Action Class. From the dmctl --help command the following can be seen:

       <structure set> invokeSync <object>target <object>translated_target <structure set>parameters.