Adapter request and response for a Kerberized SSH adapter for a local client
The Kerberized SSH adapter does not use an action. You must leave the adapter's Action field blank when configuring the Activity properties for a Call Adapter Activity in BMC Atrium Orchestrator Development Studio.
To configure an adapter request to communicate with a host that is not defined in the adapter configuration, you can designate a dynamic target by assigning values for the required configuration elements. These elements work as a set. Partial information cannot be retrieved from the configuration node.
You can omit the <targets>
block from the adapter request. In the absence of a <targets>
block, the default target from the adapter configuration is used.
When you use a context item as an input for an adapter request, you must enclose the adapter request in the <request-data>
elements. However, when you create a static request, <request-data>
is not required and the adapter request starts with the <adapterName-adapter-request>
element.
BMC recommends that you do not include unused elements in the adapter request because they might cause errors.
The following table describes the elements of the Kerberized SSH adapter request with a local client.
Elements of the Kerberized SSH adapter request for a local client
Element |
Description |
Required |
---|---|---|
|
Contains additional |
Conditional; required when one or more |
|
Displays the console prompt when the system is waiting for a command |
No |
|
Determines whether the adapter must determine the target OS type soon after authentication is complete or a connection is established |
No |
|
Contains the |
Conditional; required if a target is referenced or defined in the request |
|
Contains a |
Conditional; required if a target is referenced or defined in the request |
|
Specifies the host name or the IP address of the remote host |
Conditional; required when defining a dynamic target |
|
Specifies the port on which the remote host listens |
No |
|
Specifies the location of a valid Kerberos Ticket Granting Ticket (TGT) |
Yes |
|
Specifies the location of the SSH client executable |
No |
|
Contains one or more |
Conditional; required when one or more |
|
Specifies an available SSH option
|
No |
|
Contains one or more |
Conditional; required when one or more |
|
Specifies an available SSH argument
|
No |
|
Displays the console prompt when the system is waiting for a command |
Conditional; required when using the proxy command feature |
|
Specifies the time, in seconds, to wait for the expected prompt to be returned |
Conditional |
|
Specifies the time, in seconds, to wait for user authentication on the target server |
No |
|
Contains the |
Yes |
|
Specifies the command to be executed on the remote host |
Yes |
The following figure shows an XML sample request for the Kerberized SSH adapter with a local client. Use the adapter request XML when you create a custom process by using the Call Adapter activity in BMC Atrium Orchestrator Development Studio. In this sample, the first target references the adapter configuration and the second target is a dynamic target.
XML sample of the Kerberized SSH adapter request for a local client
<krb-request>
<prompts>
<prompt name ="prompt 1">user1-></prompt>
</prompts>
<verify-os></verify-os>
<targets>
<target name="host1"/>
<target>
<host>server2</host>
<port>2200</port>
<ktgt-cache-file-name></ktgt-cache-file-name>
<ssh-command></ssh-command>
<ssh-options>
<ssh-option>GSSAPIAuthentication=yes</ssh-option>
</ssh-options>
<ssh-arguments>
<ssh-argument>-t -v</ssh-argument>
</ssh-arguments>
<prompt>pr1</prompt>
<timeout-secs>120</timeout-secs>
<establish-connection-timeout-secs>90</establish-connection-timeoutsecs>
</target>
</targets>
<commands>
<command prompt="prompt 1">ls -l</command>
<command prompt="prompt 1">pwd</command>
</commands>
</krb-request>
The following table describes the elements of a Kerberized SSH adapter response to a request with a local client.
Elements of a Kerberized SSH adapter response for a local client
Element |
Description |
---|---|
|
Contains the request level summary information |
|
Indicates the status of the request |
|
Indicates the error message returned when the value of the |
|
Contains the command output for all the targets |
|
Contains the command output for a specific target |
|
Contains the target level summary information |
|
Indicates the operating system type of the target |
|
Indicates the operating system version of the target |
|
Indicates the architecture of the target system |
|
Indicates the status of the target connection |
|
Contains the error message if a target level error occurs |
|
Contains the command responses for all the commands executed on the target computer |
|
Contains the command response for a specific command |
|
Contains the command summary information |
|
Specifies the command executed |
|
Specifies the number of lines returned by the command |
|
Specifies the duration of the command execution, in milliseconds |
|
Specifies the exit code returned by the target after the command is executed |
|
Indicates the status of the command execution |
|
Contains the error message if the execution of the command is interrupted |
|
Contains the lines that result from the command |
|
Specifies the output resulting from the command |
The following figure illustrates the adapter response for the Kerberized SSH adapter with a local client.
XML sample of the Kerberized SSH adapter response for a local client
<kerberos-ssh-command-output>
<request-metadata>
<status>success</status>
</request-metadata>
<targets-output>
<target-output host="server1">
<target-metadata>
<os-id>Linux</os-id>
<os-version>2.6.12-1.1381_FC3smp</os-version>
<status>success</status>
</target-metadata>
<commands-output>
<command-output>
<metadata>
<command>first command executed</command>
<line-count>2</line-count>
<execution-milliseconds>value</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
</metadata>
<output>
<line index="1">line 1</line>
<line index="2">line 2</line>
</output>
</command-output>
<command-output>
<metadata>
<command>second command executed</command>
<line-count>1</line-count>
<execution-milliseconds>value</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
</metadata>
<output>
<line index="1">line 1</line>
</output>
</command-output>
</commands-output>
</target-output>
</targets-output>
</kerberos-ssh-command-output>
Comments
Log in or register to comment.