Handling arguments within requests


When you execute requests by using BLCLI commands, scripts and commands on NSH, or Jython scripts, the BMC Server Automation adapter handles commands that contain arguments as follows:

  • If the argument is enclosed in single or double quotation marks, the argument is passed as it is.
  • If the argument is empty or is not enclosed in single or double quotation marks, the argument is enclosed in double quotation marks.

Examples of how the adapter handles commands containing arguments

Input value

Output value

Comments

"test$"

"test$"

Argument is passed as is because it is enclosed in double quotes.

"test $"

"test $"

Although the argument contains a space, it is passed as is because it is enclosed in double quotes.

test $

"test $"

Argument is enclosed in double quotes because it is not enclosed in double or single quotes and contains a space.

'test$'

'test$'

Argument is passed as is because it is enclosed in single quotes.

'test $'

'test $'

Although the argument contains a space, it is passed as is because it is enclosed in single quotes.

test$

"test$"

Argument is enclosed in double quotes because it is not enclosed in double or single quotes.

 

""

Argument is enclosed in double quotes because it is empty.

Example input

<command executable-type="cli">
<namespace>RBACRole</namespace>
<command-name>getUserMap</command-name>
<arguments>
<argument>Test Argument1</argument>
<argument>TestArgument2</argument>
<argument/>
<argument>'Test Argument 4'</argument>
</arguments>
</command>

If you pass the argument within the <argument> element, the adapter forms the command using the values specified in the <argument>, <namespace>, and <command-name> elements.

Example of how the adapter forms the command

<command executable-type="cli">blcli_execute RBACRole getUserMap "Test Argument1"  "TestArgument2" "" 'Test Argument 4'</command>

 

Warning

Note

You must pass arguments in single or double quotation marks in a manner in which you pass arguments on NSH.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

TrueSight Orchestration Content 21.3