com.github.dockerjava.api.model.Version.getOperatingSystem()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(82)

本文整理了Java中com.github.dockerjava.api.model.Version.getOperatingSystem()方法的一些代码示例,展示了Version.getOperatingSystem()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.getOperatingSystem()方法的具体详情如下:
包路径:com.github.dockerjava.api.model.Version
类名称:Version
方法名:getOperatingSystem

Version.getOperatingSystem介绍

暂无

代码示例

代码示例来源:origin: jenkinsci/docker-plugin

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;
}

代码示例来源:origin: arquillian/arquillian-cube

private void configureDockerExecutor() {
  when(version.getVersion()).thenReturn("1.1.0");
  when(version.getOperatingSystem()).thenReturn("linux");
  when(version.getKernelVersion()).thenReturn("3.1.0");
  when(version.getApiVersion()).thenReturn("1.12");
  when(version.getArch()).thenReturn("x86");
  when(dockerClientExecutor.dockerHostVersion()).thenReturn(version);
}

代码示例来源:origin: arquillian/arquillian-cube

private ReportBuilder createDockerInfoGroup(DockerClientExecutor executor) {
  Version version = executor.dockerHostVersion();
  final ReportBuilder reportBuilder = Reporter.createReport(DOCKER_HOST_INFORMATION)
      .addKeyValueEntry(DOCKER_VERSION, version.getVersion())
      .addKeyValueEntry(DOCKER_OS, version.getOperatingSystem())
      .addKeyValueEntry(DOCKER_KERNEL, version.getKernelVersion())
      .addKeyValueEntry(DOCKER_API_VERSION, version.getApiVersion())
      .addKeyValueEntry(DOCKER_ARCH, version.getArch());
  return reportBuilder;
}

相关文章