<pre>
Use this operation to get version of xenserver.
</pre>
344812
public static xen_upgrade[] get(nitro_service client) throws Exception
	{
		xen_upgrade resource = new xen_upgrade();
		resource.validate("get");
		return (xen_upgrade[]) resource.get_resources(client);
	}
1259833
public int getVersion() {

    Element versionElement = (Element) xmlResponse.getElementsByTagName(
      "version").item(0);

    if (versionElement == null) {

      return 0;
    }

    return Integer.parseInt(versionElement.getFirstChild().getNodeValue());
  }
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
542581
def _get_version():
    '''
    
    '''
    version_string = __salt__['cmd.run'](
        [_check_pkgin(), '-v'],
        output_loglevel='trace')
    if version_string is None:
        # Dunno why it would, but...
        return False

    version_match = VERSION_MATCH.search(version_string)
    if not version_match:
        return False

    return version_match.group(1).split('.')
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
476473
public com.google.appengine.v1.Version getVersion() {
    return version_ == null ? com.google.appengine.v1.Version.getDefaultInstance() : version_;
  }
772005
def do_version():
    """"""
    v = ApiPool.ping.model.Version(
        name=ApiPool().current_server_name,
        version=ApiPool().current_server_api.get_version(),
        container=get_container_version(),
    )
    log.info("/version: " + pprint.pformat(v))
    return v
1108842
@Override
  public Map<SocketAddress, String> getVersions() {
    final Map<SocketAddress, String> rv =
        new ConcurrentHashMap<SocketAddress, String>();

    CountDownLatch blatch = broadcastOp(new BroadcastOpFactory() {
      @Override
      public Operation newOp(final MemcachedNode n,
          final CountDownLatch latch) {
        final SocketAddress sa = n.getSocketAddress();
        return opFact.version(new OperationCallback() {
          @Override
          public void receivedStatus(OperationStatus s) {
            rv.put(sa, s.getMessage());
          }

          @Override
          public void complete() {
            latch.countDown();
          }
        });
      }
    });
    try {
      blatch.await(operationTimeout, TimeUnit.MILLISECONDS);
    } catch (InterruptedException e) {
      throw new RuntimeException("Interrupted waiting for versions", e);
    }
    return rv;
  }
948856
public String getServerVersion() throws IOException {
        // only do this once -- future invocations will use the known value
        if (m_serverVersion == null) {
            // Make the APIA call for describe repository
            // and make sure that HTTP 302 status is handled.
            String desc = getResponseAsString("/describe?xml=true", true, true);
            logger.debug("describeRepository response:\n" + desc);
            String[] parts = desc.split("<repositoryVersion>");
            if (parts.length < 2) {
                throw new IOException("Could not find repositoryVersion element in content of /describe?xml=true");
            }
            int i = parts[1].indexOf("<");
            if (i == -1) {
                throw new IOException("Could not find end of repositoryVersion element in content of /describe?xml=true");
            }
            m_serverVersion = parts[1].substring(0, i).trim();
            logger.debug("Server version is " + m_serverVersion);
        }
        return m_serverVersion;
    }
365193
Integer getVersionOrThrow(CMAResource resource, String action) {
    final Integer version = resource.getVersion();
    if (version == null) {
      throw new IllegalArgumentException(String.format(
          "Cannot perform %s action on a resource that has no version associated.",
          action));
    }
    return version;
  }
1338578
public int getVersion() {
        if (info == null)
            return -1;
        try {
            int vers = ((Integer)info.get(CertificateVersion.NAME
                        + DOT + CertificateVersion.VERSION)).intValue();
            return vers+1;
        } catch (Exception e) {
            return -1;
        }
    }
219768
public String getXmlVersion() {
	// dynamic load to support jre 1.4 and 1.5
	try {
	    Method m = doc.getClass().getMethod("getXmlVersion", new Class[] {});
	    return Caster.toString(m.invoke(doc, ArrayUtil.OBJECT_EMPTY));
	}
	catch (Exception e) {
	    throw new PageRuntimeException(Caster.toPageException(e));
	}
    }
665724
def GetClientVersion(client_id, token=None):
  """"""
  if data_store.RelationalDBEnabled():
    sinfo = data_store.REL_DB.ReadClientStartupInfo(client_id=client_id)
    if sinfo is not None:
      return sinfo.client_info.client_version
    else:
      return config.CONFIG["Source.version_numeric"]
  else:
    with aff4.FACTORY.Open(client_id, token=token) as client:
      cinfo = client.Get(client.Schema.CLIENT_INFO)
      if cinfo is not None:
        return cinfo.client_version
      else:
        return config.CONFIG["Source.version_numeric"]
566506
public SemanticVersion getNextParentVersion() {
    int major = head.getMajorVersion();
    int minor = head.getMinorVersion();
    int patch = head.getPatchVersion();

    switch (significantDigits) {
      case 1:
        throw new UnsupportedOperationException();
      case 2:
        major++;
        minor = 0;
        patch = 0;
        return new SemanticVersion(major, minor, patch);
      case 3:
        minor++;
        patch = 0;
        return new SemanticVersion(major, minor, patch);
      default:
        throw new UnsupportedOperationException();
    }
  }
1115014
protected String getCurrentReleaseVersion() {
        HttpURLConnection conn = null;
        try {
            final String str = settings.getString(Settings.KEYS.ENGINE_VERSION_CHECK_URL, "http://jeremylong.github.io/DependencyCheck/current.txt");
            final URL url = new URL(str);
            final URLConnectionFactory factory = new URLConnectionFactory(settings);
            conn = factory.createHttpURLConnection(url);
            conn.connect();
            if (conn.getResponseCode() != 200) {
                return null;
            }
            final String releaseVersion = IOUtils.toString(conn.getInputStream(), StandardCharsets.UTF_8);
            if (releaseVersion != null) {
                return releaseVersion.trim();
            }
        } catch (MalformedURLException ex) {
            LOGGER.debug("Unable to retrieve current release version of dependency-check - malformed url?");
        } catch (URLConnectionFailureException ex) {
            LOGGER.debug("Unable to retrieve current release version of dependency-check - connection failed");
        } catch (IOException ex) {
            LOGGER.debug("Unable to retrieve current release version of dependency-check - i/o exception");
        } finally {
            if (conn != null) {
                conn.disconnect();
            }
        }
        return null;
    }
1066514
@Override
    public int getInUseSessionVersion(ServletRequest req, SessionAffinityContext sac) {
        int version = sac.getResponseSessionVersion();
        if (version == -1) { // not set, use request version
            version = sac.getRequestedSessionVersion();
        }
        return version;
    }
565669
private String extractVersionFromFullVersion(String pFullVersion) {
        if (pFullVersion != null) {
            Matcher matcher = GLASSFISH_VERSION.matcher(pFullVersion);
            if (matcher.matches()) {
                serverName = GLASSFISH_NAME;
                vendorName = GLASSFISH_VENDOR_NAME;
                return matcher.group(1);
            }
            matcher = PAYARA_VERSION.matcher(pFullVersion);
            if (matcher.matches()) {
                serverName = PAYARA_NAME;
                vendorName = PAYARA_VENDOR_NAME;
                return matcher.group(1);
            }
        }
        return null;
    }