Closing CLI channel
Execution phase
result1_value, result2_description = ops.cli.close(fd)
Parameter |
Description |
Value |
---|---|---|
fd |
Indicates a CLI channel handle. |
The value is generated through Opening CLI Channel API. |
The result1_value and result2_description in the API prototype indicate return values.
The result1_value is the first return value, 0 indicates success, and 1 indicates failure.
The result2_description is the second return value, indicating the failure cause. It is returned only when the first return value is 1.
After a device delivers commands, you can close the CLI channel to release the VTY resource.
When a subscription event is matched, you can close the CLI channel.
value, descri_str = ops.cli.close(handle)