Get grains for minion.

    .. code-block: bash

        salt '*' nxos.cmd grains

def grains(**kwargs):
    '''
    Get grains for minion.

    .. code-block: bash

        salt '*' nxos.cmd grains
    '''
    import __main__ as main  # pylint: disable=unused-import
    if not DEVICE_DETAILS['grains_cache']:
        data = sendline('show version')
        if CONNECTION == 'nxapi':
            data = data[0]
        ret = salt.utils.nxos.system_info(data)
        log.debug(ret)
        DEVICE_DETAILS['grains_cache'].update(ret['nxos'])
    return {'nxos': DEVICE_DETAILS['grains_cache']}