Server Version (select banner  from v$version)

    CLI Example:

    .. code-block:: bash

        salt '*' oracle.version
        salt '*' oracle.version my_db
422182
def version(*dbs):
    '''
    
    '''
    pillar_dbs = __salt__['pillar.get']('oracle:dbs')
    get_version = lambda x: [
        r[0] for r in run_query(x, "select banner from v$version order by banner")
        ]
    result = {}
    if dbs:
        log.debug('get db versions for: %s', dbs)
        for db in dbs:
            if db in pillar_dbs:
                result[db] = get_version(db)
    else:
        log.debug('get all(%s) dbs versions', len(dbs))
        for db in dbs:
            result[db] = get_version(db)
    return result
1010292
def versionstring():
    # type: () -> Text
    '''
    
    '''
    pkg = pkg_resources.require("cwltool")
    if pkg:
        return u"%s %s" % (sys.argv[0], pkg[0].version)
    return u"%s %s" % (sys.argv[0], "unknown version")
911226
def version
      SelectVersionsQuery.new.fetch_first || Version.new('0')
    rescue Cassandra::Errors::InvalidError
      raise uninitialized_error
    end
741393
def current_db_version(self):
        

        query = """
        SELECT version from {} WHERE success = TRUE ORDER BY version DESC
        """.format(self.upgrades_table)

        self.cursor.execute(query)

        return self.cursor.fetchone()[0]
992611
def versions():
    '''
    
    '''
    ret = {}
    client = salt.client.get_local_client(__opts__['conf_file'])
    try:
        minions = client.cmd('*', 'test.version', timeout=__opts__['timeout'])
    except SaltClientError as client_error:
        print(client_error)
        return ret

    labels = {
        -2: 'Minion offline',
        -1: 'Minion requires update',
        0: 'Up to date',
        1: 'Minion newer than master',
        2: 'Master',
    }

    version_status = {}

    master_version = salt.version.__saltstack_version__

    for minion in minions:
        if not minions[minion]:
            minion_version = False
            ver_diff = -2
        else:
            minion_version = salt.version.SaltStackVersion.parse(minions[minion])
            ver_diff = salt.utils.compat.cmp(minion_version, master_version)

        if ver_diff not in version_status:
            version_status[ver_diff] = {}
        if minion_version:
            version_status[ver_diff][minion] = minion_version.string
        else:
            version_status[ver_diff][minion] = minion_version

    # Add version of Master to output
    version_status[2] = master_version.string

    for key in version_status:
        if key == 2:
            ret[labels[key]] = version_status[2]
        else:
            for minion in sorted(version_status[key]):
                ret.setdefault(labels[key], {})[minion] = version_status[key][minion]
    return ret
219447
def version(*names, **kwargs):
    '''
    
    '''
    ret = {}
    versions_as_list = \
        salt.utils.data.is_true(kwargs.pop('versions_as_list', False))
    pkg_glob = False
    if names:
        pkgs = __salt__['pkg.list_pkgs'](versions_as_list=True, **kwargs)
        for name in names:
            if '*' in name:
                pkg_glob = True
                for match in fnmatch.filter(pkgs, name):
                    ret[match] = pkgs.get(match, [])
            else:
                ret[name] = pkgs.get(name, [])
    if not versions_as_list:
        __salt__['pkg_resource.stringify'](ret)
    # Return a string if no globbing is used, and there is one item in the
    # return dict
    if len(ret) == 1 and not pkg_glob:
        try:
            return next(six.itervalues(ret))
        except StopIteration:
            return ''
    return ret
981926
def version():
    '''
    
    '''
    cmd = ['znc', '--version']
    out = __salt__['cmd.run'](cmd, python_shell=False).splitlines()
    ret = out[0].split(' - ')
    return ret[0]
608459
public function getServerVersion() : string
    {
        return (is_array($this->apache_info) && array_key_exists('server-version', $this->apache_info))
                ? $this->apache_info['server-version']
                : 'Unknown'
        ;
    }
168610
def version_cmd(argv=sys.argv[1:]):  # pragma: no cover
    
    docopt(version_cmd.__doc__, argv=argv)
    print(__version__)
391629
def print_version(ctx, value):
    """"""
    if not value:
        return
    import pkg_resources
    version = None
    try:
        version = pkg_resources.get_distribution('sandman').version
    finally:
        del pkg_resources
    click.echo(version)
    ctx.exit()
1003897
def build_up_commands
      local_versions.select{ |v| v > current_version && v <= target_version }
                    .map{ |v| ApplyCommand.new(v) }
    end
205958
def check_versions(self, conn):
        
        scripts = self.read_scripts(skip_versions=self.get_db_versions(conn))
        versions = [s['version'] for s in scripts]
        if versions:
            return ('Your database is not updated. You can update it by '
                    'running oq engine --upgrade-db which will process the '
                    'following new versions: %s' % versions)
464218
def version(command='dmenu'):
    '''
    '''

    args = [command, '-v']

    try:
        # start the dmenu process
        proc = subprocess.Popen(
            args,
            universal_newlines=True,
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE)
    except OSError as err:
        # something went wrong with starting the process
        raise DmenuCommandError(args, err)

    if proc.wait() == 0:
        # version information from stdout
        return proc.stdout.read().rstrip('\n')

    # error from dmenu
    raise DmenuCommandError(args, proc.stderr.read())
504399
def version():
    '''
    
    '''
    ret = {}
    cmd = 'imgadm --version'
    res = __salt__['cmd.run'](cmd).splitlines()
    ret = res[0].split()
    return ret[-1]
379398
def _check_valid_version():
    '''
    
    '''
    # pylint: disable=no-member
    bower_version = _LooseVersion(
        __salt__['cmd.run']('bower --version'))
    valid_version = _LooseVersion('1.3')
    # pylint: enable=no-member
    if bower_version < valid_version:
        raise CommandExecutionError(
            '\'bower\' is not recent enough({0} < {1}). '
            'Please Upgrade.'.format(
                bower_version, valid_version
            )
        )
699614
def versioned_script?
      return chunks.size == 1 &&
             chunks[0].pushdata? &&
             chunks[0].canonical? &&
             chunks[0].pushdata.bytesize > 2
    end
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