def version():
    '''
    Return the actual lxc client version

    .. versionadded:: 2015.8.0

    CLI Example:

    .. code-block:: bash

        salt '*' lxc.version

    '''
    k = 'lxc.version'
    if not __context__.get(k, None):
        cversion = __salt__['cmd.run_all']('lxc-info --version')
        if not cversion['retcode']:
            ver = distutils.version.LooseVersion(cversion['stdout'])
            if ver < distutils.version.LooseVersion('1.0'):
                raise CommandExecutionError('LXC should be at least 1.0')
            __context__[k] = "{0}".format(ver)
    return __context__.get(k, None)
dataset/ETHPy150Open saltstack/salt/salt/modules/lxc.py/version/original