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
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
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>