FTP adapter request and response for a rm command
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 configuration because they might cause errors.
The following table describes the elements of an FTP adapter request with a rm command.
Elements of an FTP adapter request with a rm command
Element |
Description |
Required |
---|---|---|
|
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 |
|
Indicates the mode to be used for data transfer |
No |
|
Contains the FTP command element |
Yes |
|
Indicates the remote path and the file name for the file to be removed from the remote server |
Yes |
|
Specifies the supporting CharSet |
No |
The following figure shows an XML template of the adapter request for the FTP adapter with rm command.
XML template of the FTP adapter request with rm command
<ftp-request>
<targets>
<target name=""/>
</targets>
<data-transfer-mode></data-transfer-mode>
<commands>
<rm></rm>
</commands>
</ftp-request>
The following figure shows an XML sample of the adapter request for the FTP adapter with rm command.
XML sample of the FTP adapter request with rm command
<ftp-request>
<targets>
<target name="host1"/>
<character-set>Shift_JIS</character-set>
</targets>
<data-transfer-mode>PASSIVE</data-transfer-mode>
<commands>
<rm>/path/to/file/filename</rm>
</commands>
</ftp-request>
The rm command request for the FTP adapter returns an adapter response containing the summary information for the command. The following table describes the elements of an FTP adapter response to a request with rm command.
Elements of an FTP adapter response to a request with rm command
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 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 sequence in which the command is executed |
|
Specifies the command executed |
|
Specifies the duration of the command execution, in milliseconds |
|
Indicates the status of the command execution |
|
Contains the error message if a command level error occurs |
|
Contains any lines that result from the command |
The following figure illustrates an XML sample of the adapter response for the FTP adapter with rm command.
XML sample of the FTP adapter response with rm command
<ftp-command-output>
<request-metadata>
<status>success</status>
<error>Present only with status of 'error'</error>
</request-metadata>
<targets-output>
<target-output host="server1">
<target-metadata>
<status>success</status>
<error>Present only with status of 'error'</error>
</target-metadata>
<commands-output>
<command-output>
<metadata>
<id>1</id>
<command>rm</command>
<execution-milliseconds>value</execution-milliseconds>
<status>success</status>
<error>Present only with status of 'error'</error>
</metadata>
<output/>
</command-output>
</commands-output>
</target-output>
</targets-output>
</ftp-command-output>
Comments
Log in or register to comment.