Executes an nxapi_request request over NX-API.

    commands
        The exec or config commands to be sent.

    method: ``cli_show``
        ``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_conf``.

def _nxapi_request(commands, method='cli_conf', **kwargs):
    '''
    Executes an nxapi_request request over NX-API.

    commands
        The exec or config commands to be sent.

    method: ``cli_show``
        ``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_conf``.
    '''
    if CONNECTION == 'ssh':
        return '_nxapi_request is not available for ssh proxy'
    conn_args = DEVICE_DETAILS['conn_args']
    conn_args.update(kwargs)
    data = __utils__['nxos.nxapi_request'](commands, method=method, **conn_args)
    return data