Send arbitray 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``.
        NOTE: method is ignored for SSH proxy minion.  All data is returned
        unstructured.

    .. code-block: bash

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

def sendline(command, method='cli_show_ascii', **kwargs):
    '''
    Send arbitray 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``.
        NOTE: method is ignored for SSH proxy minion.  All data is returned
        unstructured.

    .. code-block: bash

        salt '*' nxos.cmd sendline 'show run | include "^username admin password"'
    '''
    smethods = ['cli_show_ascii', 'cli_show', 'cli_conf']
    if method not in smethods:
        msg = """
        INPUT ERROR: Second argument 'method' must be one of {0}
        Value passed: {1}
        Hint: White space separated commands should be wrapped by double quotes
        """.format(smethods, method)
        return msg

    if salt.utils.platform.is_proxy():
        return __proxy__['nxos.sendline'](command, method, **kwargs)
    else:
        return _nxapi_request(command, method, **kwargs)