Version version = client.versionCmd().exec(); activeApiVersion = version.getApiVersion(); activeExecutionDriver = dockerInfo.getExecutionDriver();
@java.lang.SuppressWarnings("all") public com.github.dockerjava.api.command.VersionCmd versionCmd() { return this.wrappedClient.versionCmd(); }
/** * Executes a platform version request * * @param client * @param message * @return */ private VersionCmd executeVersionRequest(DockerClient client, Message message) { LOGGER.debug("Executing Docker Version Request"); VersionCmd versionCmd = client.versionCmd(); return versionCmd; }
@Override public VersionCmd versionCmd() { return getDelegate().versionCmd(); }
public Version dockerHostVersion() { this.readWriteLock.readLock().lock(); try { return this.dockerClient.versionCmd().exec(); } finally { this.readWriteLock.readLock().unlock(); } }
public Version dockerHostVersion() { this.readWriteLock.readLock().lock(); try { return this.dockerClient.versionCmd().exec(); } finally { this.readWriteLock.readLock().unlock(); } }
public boolean isTriton() { if( _isTriton == null ) { final Version remoteVersion; try(final DockerClient client = dockerApi.getClient()) { remoteVersion = client.versionCmd().exec(); } catch (IOException ex) { throw new RuntimeException(ex); } _isTriton = remoteVersion.getOperatingSystem().equals("solaris"); } return _isTriton; }
public boolean isSwarm() { if (_isSwarm == null) { try(final DockerClient client = getClient()) { Version remoteVersion = client.versionCmd().exec(); // Cache the return. _isSwarm = remoteVersion.getVersion().startsWith("swarm"); } catch (IOException ex) { throw new RuntimeException(ex); } } return _isSwarm; }
public VersionAssert version() { Version version = this.client.versionCmd().exec(); return new VersionAssert(version); }
public FormValidation doTestConnection( @QueryParameter String uri, @QueryParameter String credentialsId, @QueryParameter String apiVersion, @QueryParameter int connectTimeout, @QueryParameter int readTimeout ) { try { final DockerServerEndpoint dsep = new DockerServerEndpoint(uri, credentialsId); final DockerAPI dapi = new DockerAPI(dsep, connectTimeout, readTimeout, apiVersion, null); try(final DockerClient dc = dapi.getClient()) { final VersionCmd vc = dc.versionCmd(); final Version v = vc.exec(); final String actualVersion = v.getVersion(); final String actualApiVersion = v.getApiVersion(); return FormValidation.ok("Version = " + actualVersion + ", API Version = " + actualApiVersion); } } catch (Exception e) { return FormValidation.error(e, e.getMessage()); } } }
/** * Returns the docker version. * * @param serverUrl * The serverUrl to use. */ private static Version getDockerVersion(String serverUrl) { try { DockerClient client = DockerClientBuilder.getInstance(serverUrl).build(); return client.versionCmd().exec(); } catch (Exception e) { return null; } }
/** * Returns the docker version. * * @param serverUrl * The serverUrl to use. */ private static Version getDockerVersion(String serverUrl) { try { DockerClient client = DockerClientBuilder.getInstance(serverUrl).build(); return client.versionCmd().exec(); } catch (Exception e) { return null; } }
@Override public final void execute() throws MojoExecutionException, MojoFailureException { MavenLogAppender.setLog(getLog()); if (skip) { getLog().info("skipped"); return; } // not great eh final Properties properties = properties(); getLog().debug("properties filtering supported for " + properties.keySet()); try { final DockerClient docker = dockerClient(); getLog().info("Docker version " + docker.versionCmd().exec().getVersion()); doExecute(dockerOrchestrator(properties, docker)); } catch (Exception e) { e.printStackTrace(); throw new MojoExecutionException(e.getMessage(), e); } }
if (!initialized) { Info dockerInfo = client.infoCmd().exec(); Version version = client.versionCmd().exec(); activeApiVersion = version.getApiVersion(); activeExecutionDriver = dockerInfo.getExecutionDriver();
final VersionCmd versionCmd = initialClient.versionCmd(); final Version version = versionCmd.exec();