.. versionadded:: 2019.2.0

    Returns the glusterfs volume's max op-version value
    Requires Glusterfs version > 3.9

    CLI Example:
    .. code-block:: bash

        salt '*' glusterfs.get_max_op_version
9111
def get_max_op_version():
    '''
    
    '''
    if _get_version() < (3, 10,):
        return False, 'Glusterfs version must be 3.10+.  Your version is {0}.'.format(str('.'.join(str(i) for i in _get_version())))

    cmd = 'volume get all cluster.max-op-version'
    root = _gluster_xml(cmd)

    if not _gluster_ok(root):
        return False, root.find('opErrstr').text

    result = {}
    for max_op_version in _iter(root, 'volGetopts'):
        for item in max_op_version:
            if item.tag == 'Value':
                result = item.text
            elif item.tag == 'Opt':
                for child in item:
                    if child.tag == 'Value':
                        result = child.text

    return result
701711
def select(self, versions):
        """"""
        options = list(self.filter(versions))
        if options:
            return max(options)
        return None
649181
def get_osd_config(self, osd_version):
        
        if (osd_version in self.osd_config):
            return(self.osd_config[osd_version])
        else:
            raise IIIFStaticError("OpenSeadragon version %s not supported, available versions are %s" %
                                  (osd_version, ', '.join(sorted(self.osd_config.keys()))))
940555
def version_required #:nodoc:
            max = [ "1.0", 0 ]

            self.each_key do |field|
                attributes = self.class.fields[field.value]
                if attributes.nil?
                    STDERR.puts "Warning: object #{self.class} has undocumented field #{field.value}"
                    next
                end

                version = attributes[:Version] || '1.0'
                level = attributes[:ExtensionLevel] || 0
                current = [ version, level ]

                max = [ max, current, self[field.value].version_required ].max
            end

            max
        end
86793
def new(self, version):
        # type: () -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF NSR Volume Structure already initialized')

        if version == 2:
            self.standard_ident = b'NSR02'
        elif version == 3:
            self.standard_ident = b'NSR03'
        else:
            raise pycdlibexception.PyCdlibInternalError('Invalid NSR version requested')

        self._initialized = True
896442
def get_version(self):
        """"""
        _, version = misc.get_version(self.confdir)
        if version is None:
            return "Can't get the version."
        else:
            return "cslbot - %s" % version
1130636
function maxWireVersion(topologyOrServer) {
  if (topologyOrServer.ismaster) {
    return topologyOrServer.ismaster.maxWireVersion;
  }

  if (topologyOrServer.description) {
    return topologyOrServer.description.maxWireVersion;
  }

  return null;
}
1137379
def version():
    '''
    
    '''
    amajor = FT_Int()
    aminor = FT_Int()
    apatch = FT_Int()
    library = get_handle()
    FT_Library_Version(library, byref(amajor), byref(aminor), byref(apatch))
    return (amajor.value, aminor.value, apatch.value)
1000992
def get_version():
    
    _globals = {}
    _locals = {}
    exec(
        compile(
            open(TOP + "/manta/version.py").read(), TOP + "/manta/version.py",
            'exec'), _globals, _locals)
    return _locals["__version__"]
1353428
def version():
    '''
    
    '''
    cmd = 'dnsmasq -v'
    out = __salt__['cmd.run'](cmd).splitlines()
    comps = out[0].split()
    return comps[2]
653463
def find_version_to_install(self, name):
        
        version = Version.parse(name)
        if version.patch is not None:
            return name
        try:
            best_match = max((
                inst_version
                for inst_version in self.iter_installable_versions()
                if inst_version.matches_minor(version)
            ), key=operator.attrgetter('cmpkey'))
        except ValueError:
            raise ValueError(
                'no installable version found for {0!r}'.format(name),
            )
        return best_match
576761
def get_mutect_version(self):
        
        if self._mutect_version is None:
            mutect_jar = self._get_jar("muTect", ["mutect"])
            self._mutect_version = get_mutect_version(mutect_jar)
        return self._mutect_version
204662
def _compute_version_info():
    
    ray_version = ray.__version__
    python_version = ".".join(map(str, sys.version_info[:3]))
    pyarrow_version = pyarrow.__version__
    return ray_version, python_version, pyarrow_version
653976
def get_version(self):
        
        raw_version = run_cmd(["podman", "version"], return_output=True)
        regex = re.compile(r"Version:\s*(\d+)\.(\d+)\.(\d+)")
        match = regex.findall(raw_version)
        try:
            return match[0]
        except IndexError:
            logger.error("unable to parse version from `podman version`")
            return
133913
def _get_version(name, results):
    '''
    
    '''
    for line in salt.utils.itertools.split(results, '\n'):
        if not line:
            continue
        try:
            pkgname, pkgver = line.rsplit('-', 1)
        except ValueError:
            continue
        if pkgname == name:
            return pkgver
    return None
317410
def choose(self, versions, conflict='silent'):
		
		assert conflict in ('silent', 'warning', 'error')
		if not versions:
			raise VersionRangeMismatch('No versions to choose from')
		version_map = {}
		for version in versions:
			version_map[version] = str2nr(version, mx=self.limit)
		top_version, top_nr = None, 0
		""" Try to find the highest value in range. """
		for version, nr in version_map.items():
			if nr >= top_nr:
				if self.min <= nr <= self.max:
					top_version, top_nr = version, nr
		if top_version:
			return top_version
		""" We need to look outside the range, so maybe give a warning. """
		version_problem_notify('No matching version found for range "{0:s}" from options "{1:s}"; other options might be considered.'.format(
			str(self), '/'.join(str(v) for v in versions)), conflict=conflict)
		""" Failing the above, try to find the lowest value above the range. """
		top_nr = self.highest
		for version, nr in version_map.items():
			if nr < top_nr:
				if nr >= self.max:
					top_version, top_nr = version, nr
		if top_version:
			return top_version
		""" Failing the above two, try to highest value below the range (so just the highest). """
		top_nr = 0
		for version, nr in version_map.items():
			if nr > top_nr:
				top_version, top_nr = version, nr
		if top_version:
			return top_version
1234227
function maxPrerelease (versions, prerelease) {
  return first(desc(versions), function (version) {
    return isPrerelease(version, prerelease);
  });
}