Deleting an environment by using the command line

You can delete an environment and its associated artifacts by using the Rational® Integration Tester command line. This option is useful in situations where Ant is not available.

The syntax to use is as follows:
IntegrationTesterCmd Options delete-environment
Here is an example syntax:
IntegrationTesterCmd --serverUrl "https://<Host name or IP address>:5443/RTCP/" 
--domain <Domain name> --environment <Environment name> 
--username <User name> --securityToken "<Security token>" -f delete-environment

The following table lists the options that you can use with the IntegrationTesterCmd command for deleting an environment.

Table 1. List of available options
Options Description
--serverUrl/-u URL of Rational® Test Control Panel.
--domain/-d Domain name
--environment/-e Environment name.
--username/-l The user name under which to perform the operation (optional).
--securityToken The value of the security token to use for authentication with Rational® Test Control Panel when domain security is enabled (optional). For more information, see Domain level security.
  • --force/-f
  • --forceIf
  • --forceUnless
Use the force option to delete an environment by attempting to ignore any warnings or errors that might occur.
  • force: To ignore all the problems that occur when you delete an environment.
  • forceIf: Specify a space-separated list of problem identifiers to ignore when you delete an environment.
  • forceUnless: Specify a space-separated list of problem identifiers to not ignore while deleting an environment. If the parameter list is empty, the force setting is not considered and none of the errors are ignored.
You can specify if a specific problem identifier must either be ignored or considered when the environment is deleted. Following are the problem identifier parameters:
  • stubs-running: Indicates that stubs are running in the environment.
  • environment-locked: Indicates that the environment is locked.
  • proxy-rules: Indicates that there are proxy rules that apply to a proxy registered with that environment.
Examples:
  • The command to ignore all the problems:
    IntegrationTesterCmd -u https://localhost:5443/RTCP -d MQ -e test --force delete-environment
  • To ignore a specific set of problems:
    IntegrationTesterCmd -u https://localhost:5443/RTCP
    -d MQ -e test --forceIf "stubs-running proxy-rules"
    delete-environment
Note: All environment deletion events are recorded in the Rational® Test Control Panel Audit log. (For information about this log, refer to Administering Rational Test Control Panel.)

Error codes

For details of any error codes, see Exit codes for Command-line client and Ant client.