Smarts ASL: How do I pass arguments from within a Smarts ASL script to an external script?
search cancel

Smarts ASL: How do I pass arguments from within a Smarts ASL script to an external script?

book

Article ID: 304057

calendar_today

Updated On:

Products

VMware

Environment

VMware Smart Assurance - SMARTS

Resolution

How do I pass arguments from within a Smarts ASL script to an external script?
How do I use arguments within an Smarts ASL script to call an external script?

How do I pass arguments to ACT_Script from within a Smarts ASL script?




The following shows an example of passing arguments to a external script from within the testScript.sh Adapter Scripting Lanaguage (ASL) script (see Note statement): 

START { .. eol }
do {
    scriptName = "testScript.sh";
    script = create("ACT_Script", "ACT-Script");
    script->scriptName = scriptName;
    params="arg1" . " ". "arg2";
    status = script->run(params);
    if (status != 0) {
        print("Script execution Failed...");
    }
}



Additional Information

The testScript.sh will be located in either of the following Smarts installation directories:

  • <BASEDIR>/smarts/action
  • <BASEDIR>/smarts/local/action