Home | Trees | Indices | Help |
|
---|
|
The VtyService class represents a vty on a network element i.e. a cisco device.
VTY Service Set hides the commands executed through it. To view the commands executed through VTY, enable CLI logs as follows.
On NXOS, use vty.write("debug cli parser-detail") in your application, future onep_vty_write() will have the CLI logs in the response. Use vty.write("no debug cli parser-detail") to turn off CLI log or simply reopen vty session.
On IOS, use the following command to view CLI logs on the Router. "show history all"
On XR, use the following command to view CLI logs on the Router. "show cli history detail"
Nested Classes | |
Listener For internal use |
|
CmdResults cmdResults is the collection of command results associated with the VTY and last command run |
|
ParserState ParserState is used to determine what went wrong with a command block. |
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
Class Variables | |
OnepVtyState = enum('ONEP_VTY_STATE_DISCONNECTED', 'ONEP_VTY_S
|
|
OnepVtyCmdInterp = enum('ONEP_VTY_CMD_IOS_SH', 'ONEP_VTY_CMD_T
|
|
OnepVtyOutputFormat = enum('ONEP_VTY_OUTPUT_FORMAT_TLV', 'ONEP
|
|
log = None
|
Instance Variables | |
element The Network Element associated with this VTY service |
Properties | |
max_response The maximum response byte length. |
|
timeout The maximum length to wait for a Network Element response in seconds |
|
Inherited from |
Method Details |
Constructor @raise OnepIllegalArgumentException The exception is thrown when the input argument is invalid @raise OnepConnectionException: The exception is thrown when the connection to a network element has failed. @raise OnepRemoteProcedureException: The exception is thrown when an error has occurred in the remote procedure call made to a network element. @raise OnepException: The exception is thrown when the server returns an invalid CPU sampling interval value. @param element: The Network Element on which to open the vty
|
Open a vty on the network element with the default cmd interpreter - no control messages
Note: On XR, "aaa authorization eventmanager default local" must be configured in config mode, otherwise open() will fail to get a valid handle. Also, the device should have "hostname <whatever-hostname>" config. aaa authorization commands default <group | none>" is recommended to config prior to use. |
Set the output format for vty This API can only be used before the vty is opened. It will raise an exception if vty is already open.
|
Write a String to a vty on the network element
|
Write a String to a vty on the network element with a typeahead list
|
Close a vty.
|
Cancel command execution.
|
Returns the state of the parser after the last command interpretation.
|
Done with VtyService instance so destroy it Throws OnepVtyNotClosed if VTY service is still open |
Class Variable Details |
OnepVtyState
|
OnepVtyCmdInterp
|
OnepVtyOutputFormat
|
Property Details |
max_responseThe maximum response byte length. Responses truncated to this length. Zero is unlimited
|
timeoutThe maximum length to wait for a Network Element response in seconds
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Aug 18 09:17:34 2014 | http://epydoc.sourceforge.net |