def _Cmd(self, command, mode=None):

    result = super(CiscoNexusDevice, self)._Cmd(command, mode)
    # On Successful execution of a command.
    # ssh gmonitor@us-mtv-43-fabsw1.mtv 'show version'.
    # Password:.
    # Cisco Nexus Operating System (NX-OS) Software
    # TAC support: http://www.cisco.com/tac.
    # [output truncated].

    # Incomplete Command Example.
    # [ mijith@pulsar: ~ ].
    # $ ssh gmonitor@us-mtv-43-fabsw1.mtv 'show'
    # Syntax error while parsing 'show'.
    # Cmd exec error.

    # Invalid Command Example.
    # [ mijith@pulsar: ~ ].
    # $ ssh gmonitor@us-mtv-43-fabsw1.mtv 'foo'.
    # Syntax error while parsing 'foo'.
    # Cmd exec error.

    if result.endswith(INVALID_OUT):
      raise exceptions.CmdError('INVALID COMMAND: %s' % command)

    return result
Cisco Nexus wrapper for ParamikoDevice._Cmd().
dataset/ETHPy150Open google/capirca/tools/ldpush/cisconx.py/CiscoNexusDevice._Cmd