Send arbitrary show or config commands to the NX-OS device.

    command
        The command to be sent.

    method:
        ``cli_show_ascii``: Return raw test or unstructured output.
        ``cli_show``: Return structured output.
        ``cli_conf``: Send configuration commands to the device.
        Defaults to ``cli_show_ascii``.

        NOTES for SSH proxy minon:
          ``method`` is ignored for SSH proxy minion.
          Only show commands are supported and data is returned unstructured.
          This function is preserved for backwards compatibilty.

    .. code-block: bash

        salt '*' nxos.cmd sendline 'show run | include "^username admin password"'

def sendline(command, method='cli_show_ascii', **kwargs):
    '''
    Send arbitrary show or config commands to the NX-OS device.

    command
        The command to be sent.

    method:
        ``cli_show_ascii``: Return raw test or unstructured output.
        ``cli_show``: Return structured output.
        ``cli_conf``: Send configuration commands to the device.
        Defaults to ``cli_show_ascii``.

        NOTES for SSH proxy minon:
          ``method`` is ignored for SSH proxy minion.
          Only show commands are supported and data is returned unstructured.
          This function is preserved for backwards compatibilty.

    .. code-block: bash

        salt '*' nxos.cmd sendline 'show run | include "^username admin password"'
    '''
    try:
        if CONNECTION == 'ssh':
            result = _sendline_ssh(command, **kwargs)
        elif CONNECTION == 'nxapi':
            result = _nxapi_request(command, method, **kwargs)
    except (TerminalException, NxosCliError) as e:
        log.error(e)
        raise
    return result