org.jclouds.elasticstack.domain.VNC.getIp()方法的使用及代码示例

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

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

VNC.getIp介绍

暂无

代码示例

代码示例来源:origin: jclouds/legacy-jclouds

@Test(dependsOnMethods = "testCreateAndStartServer")
public void testConnectivity() throws Exception {
 HostAndPort vncsocket = HostAndPort.fromParts(server.getVnc().getIp(), 5900);
 Logger.getAnonymousLogger().info("awaiting vnc: " + vncsocket);
 assert socketTester.apply(vncsocket) : server;
 HostAndPort sshsocket = HostAndPort.fromParts(server.getNics().get(0).getDhcp(), 22);
 Logger.getAnonymousLogger().info("awaiting ssh: " + sshsocket);
 assert socketTester.apply(sshsocket) : server;
 doConnectViaSsh(server, getSshCredentials(server));
}

代码示例来源:origin: jclouds/legacy-jclouds

String vncIp = from.getVnc().getIp();
if (apiVersion.equals("2.0")) {
  builder.put("vnc", "auto");

代码示例来源:origin: apache/jclouds

@Test(dependsOnMethods = "testCreateAndStartServer")
public void testConnectivity() throws Exception {
 HostAndPort vncsocket = HostAndPort.fromParts(server.getVnc().getIp(), 5900);
 Logger.getAnonymousLogger().info("awaiting vnc: " + vncsocket);
 assert socketTester.apply(vncsocket) : server;
 HostAndPort sshsocket = HostAndPort.fromParts(server.getNics().get(0).getDhcp(), 22);
 Logger.getAnonymousLogger().info("awaiting ssh: " + sshsocket);
 assert socketTester.apply(sshsocket) : server;
 doConnectViaSsh(server, getSshCredentials(server));
}

代码示例来源:origin: org.jclouds.api/elasticstack

String vncIp = from.getVnc().getIp();
if (apiVersion.equals("2.0")) {
  builder.put("vnc", "auto");

代码示例来源:origin: com.amysta.jclouds.api/elasticstack

String vncIp = from.getVnc().getIp();
if (apiVersion.equals("2.0")) {
  builder.put("vnc", "auto");

代码示例来源:origin: io.cloudsoft.jclouds.api/elasticstack

String vncIp = from.getVnc().getIp();
if (apiVersion.equals("2.0")) {
  builder.put("vnc", "auto");

代码示例来源:origin: org.apache.jclouds.api/elasticstack

String vncIp = from.getVnc().getIp();
if (apiVersion.equals("2.0")) {
  builder.put("vnc", "auto");

代码示例来源:origin: apache/jclouds

String vncIp = from.getVnc().getIp();
if (apiVersion.equals("2.0")) {
  builder.put("vnc", "auto");

代码示例来源:origin: jclouds/legacy-jclouds

protected void checkStartedServer() {
 System.out.println(new Gson().toJson(server));
 assertNotNull(server.getUuid());
 assertNotNull(server.getUser());
 assertEquals(server.getName(), prefix);
 assertEquals(server.isPersistent(), true);
 assertEquals(server.getDevices(), ImmutableMap.of("ide:0:0", new IDEDevice.Builder(0, 0).uuid(drive.getUuid())
      .build()));
 assertEquals(server.getBootDeviceIds(), ImmutableSet.of("ide:0:0"));
 assertEquals(server.getNics().get(0).getDhcp(), server.getVnc().getIp());
 assertEquals(server.getNics().get(0).getModel(), Model.E1000);
 assertEquals(server.getStatus(), ServerStatus.ACTIVE);
}

代码示例来源:origin: apache/jclouds

protected void checkStartedServer() {
 System.out.println(new Gson().toJson(server));
 assertNotNull(server.getUuid());
 assertNotNull(server.getUser());
 assertEquals(server.getName(), prefix);
 assertEquals(server.isPersistent(), true);
 assertEquals(server.getDevices(), ImmutableMap.of("ide:0:0", new IDEDevice.Builder(0, 0).uuid(drive.getUuid())
      .build()));
 assertEquals(server.getBootDeviceIds(), ImmutableSet.of("ide:0:0"));
 assertEquals(server.getNics().get(0).getDhcp(), server.getVnc().getIp());
 assertEquals(server.getNics().get(0).getModel(), Model.E1000);
 assertEquals(server.getStatus(), ServerStatus.ACTIVE);
}

代码示例来源:origin: apache/jclouds

protected void doConnectViaSsh(Server server, LoginCredentials creds) throws IOException {
 SshClient ssh = Guice.createInjector(new SshjSshClientModule()).getInstance(SshClient.Factory.class).create(
      HostAndPort.fromParts(server.getVnc().getIp(), 22), creds);
 try {
   ssh.connect();
   ExecResponse hello = ssh.exec("echo hello");
   assertEquals(hello.getOutput().trim(), "hello");
   System.err.println(ssh.exec("df -k").getOutput());
   System.err.println(ssh.exec("mount").getOutput());
   System.err.println(ssh.exec("uname -a").getOutput());
 } finally {
   if (ssh != null)
    ssh.disconnect();
 }
}

代码示例来源:origin: jclouds/legacy-jclouds

protected void doConnectViaSsh(Server server, LoginCredentials creds) throws IOException {
 SshClient ssh = Guice.createInjector(new SshjSshClientModule()).getInstance(SshClient.Factory.class).create(
      HostAndPort.fromParts(server.getVnc().getIp(), 22), creds);
 try {
   ssh.connect();
   ExecResponse hello = ssh.exec("echo hello");
   assertEquals(hello.getOutput().trim(), "hello");
   System.err.println(ssh.exec("df -k").getOutput());
   System.err.println(ssh.exec("mount").getOutput());
   System.err.println(ssh.exec("uname -a").getOutput());
 } finally {
   if (ssh != null)
    ssh.disconnect();
 }
}

相关文章