Disconnect from a Terminal session previously established with the Connect Terminal action. Used to disconnect from a transaction with a terminal. This step is always used in conjunction with other terminal actions such as Connect Terminal and Send Terminal Text. The terminal actions are used in leu of terminal emulation software. Using the terminal actions, legacy systems can be automated in the background without the use of third-party software.
Declaration
<AMDISCONNECTTERM SESSION="text" />
Example 1 - Disconnect terminal session named myTerminalSession.
<AMDISCONNECTTERM SESSION="myTerminalSession" />
Example 2 - A example that uses all available terminal actions. Examining the step parameters and properties of this task may assist you in creating your own terminal emulation task.
<AMVARIABLE NAME="thePassword">password</AMVARIABLE>
<AMCONNECTTERM EMULATION="VT220" HOST="linux.networkautomation.com" SHOWTERMINALWINDOW="YES" />
<AMWAITFORTERMTEXT TYPE="TEXT">login:</AMWAITFORTERMTEXT>
<AMSENDTERMTEXT>%theUsername%{ENTER}</AMSENDTERMTEXT>
<AMSHOWDIALOG>OK to proceed?</AMSHOWDIALOG>
<AMWAITFORTERMTEXT TYPE="TEXT">Password:</AMWAITFORTERMTEXT>
<AMSENDTERMTEXT>%thePassword%{ENTER}</AMSENDTERMTEXT>
<AMSHOWDIALOG>OK to proceed?</AMSHOWDIALOG>
<AMDISCONNECTTERM />
See Also: Connect Terminal, Send Terminal Text, Get Terminal Text, Wait Terminal, Control Terminal
Property |
Type |
Required |
Default |
Markup |
Description |
Session Name |
Text (options) |
No |
TermSess1 |
SESSION="terminalsession2" |
Specifies the session name to disconnect. This session must have been created in a prior step using Connect Terminal. Session names allow several connections to be active simultaneously. If you are only using one connection at a time, do not specify a value other than the default. |