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

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

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

VNC.<init>介绍

暂无

代码示例

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

builder.vnc(new VNC(from.get("vnc:ip") == null ? "auto" : from.get("vnc:ip"), from.get("vnc:password"), from.containsKey("vnc:tls")
    && Boolean.valueOf(from.get("vnc:tls"))));

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

builder.vnc(new VNC(from.get("vnc:ip") == null ? "auto" : from.get("vnc:ip"), from.get("password"), from.containsKey("vnc:tls")
    && Boolean.valueOf(from.get("vnc:tls"))));

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

builder.vnc(new VNC(from.get("vnc:ip") == null ? "auto" : from.get("vnc:ip"), from.get("password"), from.containsKey("vnc:tls")
    && Boolean.valueOf(from.get("vnc:tls"))));

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

builder.vnc(new VNC(from.get("vnc:ip") == null ? "auto" : from.get("vnc:ip"), from.get("password"), from.containsKey("vnc:tls")
    && Boolean.valueOf(from.get("vnc:tls"))));

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

builder.vnc(new VNC(from.get("vnc:ip") == null ? "auto" : from.get("vnc:ip"), from.get("vnc:password"), from.containsKey("vnc:tls")
    && Boolean.valueOf(from.get("vnc:tls"))));

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

/**
  * Helper to create a small persistent server
  * 
  * @param name
  *           what to name the server
  * @param driveUuuid
  *           id of the boot drive
  * @param vncPassword
  *           password for vnc
  * @return a builder for a persistent 1Ghz 512m server with DHCP enabled network.
  */
  public static Server.Builder small(String name, String driveUuuid, String vncPassword) {
   return new Server.Builder().name(name).cpu(1000).mem(512).persistent(true)
      .devices(ImmutableMap.of("ide:0:0", new IDEDevice.Builder(0, 0).uuid(driveUuuid).build()))
      .bootDeviceIds(ImmutableSet.of("ide:0:0"))
      .nics(ImmutableSet.of(new NIC.Builder().model(Model.E1000).dhcp("auto").build()))
      .vnc(new VNC(null, vncPassword, false));
  }
}

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

/**
  * Helper to create a small persistent server
  * 
  * @param name
  *           what to name the server
  * @param driveUuuid
  *           id of the boot drive
  * @param vncPassword
  *           password for vnc
  * @return a builder for a persistent 1Ghz 512m server with DHCP enabled network.
  */
  public static Server.Builder small(String name, String driveUuuid, String vncPassword) {
   return new Server.Builder().name(name).cpu(1000).mem(512).persistent(true)
      .devices(ImmutableMap.of("ide:0:0", new IDEDevice.Builder(0, 0).uuid(driveUuuid).build()))
      .bootDeviceIds(ImmutableSet.of("ide:0:0"))
      .nics(ImmutableSet.of(new NIC.Builder().model(Model.E1000).dhcp("auto").build()))
      .vnc(new VNC(null, vncPassword, false));
  }
}

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

/**
  * Helper to create a small persistent server
  * 
  * @param name
  *           what to name the server
  * @param driveUuuid
  *           id of the boot drive
  * @param vncPassword
  *           password for vnc
  * @return a builder for a persistent 1Ghz 512m server with DHCP enabled network.
  */
  public static Server.Builder small(String name, String driveUuuid, String vncPassword) {
   return new Server.Builder().name(name).cpu(1000).mem(512).persistent(true)
      .devices(ImmutableMap.of("ide:0:0", new IDEDevice.Builder(0, 0).uuid(driveUuuid).build()))
      .bootDeviceIds(ImmutableSet.of("ide:0:0"))
      .nics(ImmutableSet.of(new NIC.Builder().model(Model.E1000).dhcp("auto").build()))
      .vnc(new VNC(null, vncPassword, false));
  }
}

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

public void testBasics() {
 assertEquals(
    SERVER_TO_MAP.apply(new Server.Builder()
       .name("TestServer")
       .cpu(2000)
       .mem(1024)
       .devices(
          ImmutableMap.of("ide:0:0",
             new IDEDevice.Builder(0, 0).uuid("08c92dd5-70a0-4f51-83d2-835919d254df").build()))
       .bootDeviceIds(ImmutableSet.of("ide:0:0")).nics(ImmutableSet.of(new NIC.Builder().model(Model.E1000).
       build())).vnc(new VNC(null, "XXXXXXXX", false)).build()),
    ImmutableMap
       .builder()
       .putAll(ImmutableMap.of("name", "TestServer", "cpu", "2000", "smp", "auto", "mem", "1024"))
       .putAll(
          ImmutableMap.of("persistent", "false", "boot", "ide:0:0", "ide:0:0",
             "08c92dd5-70a0-4f51-83d2-835919d254df"))
       .putAll(
          ImmutableMap.of("ide:0:0:media", "disk", "nic:0:model", "e1000", "vnc:ip", "auto",
             "vnc:password", "XXXXXXXX")).build());
}

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

public void testBasicsV2() {
 assertEquals(
    SERVER_TO_MAP_V2.apply(new Server.Builder()
       .name("TestServer")
       .cpu(2000)
       .mem(1024)
       .devices(
          ImmutableMap.of("ide:0:0",
             new IDEDevice.Builder(0, 0).uuid("08c92dd5-70a0-4f51-83d2-835919d254df").build()))
       .bootDeviceIds(ImmutableSet.of("ide:0:0")).nics(ImmutableSet.of(new NIC.Builder().model(Model.E1000).
       build())).vnc(new VNC(null, "XXXXXXXX", false)).build()),
    ImmutableMap
       .builder()
       .putAll(ImmutableMap.of("name", "TestServer", "cpu", "2000", "smp", "auto", "mem", "1024"))
       .putAll(
          ImmutableMap.of("persistent", "false", "boot", "ide:0:0", "ide:0:0",
             "08c92dd5-70a0-4f51-83d2-835919d254df"))
       .putAll(
          ImmutableMap.of("ide:0:0:media", "disk", "nic:0:model", "e1000", "vnc", "auto",
             "vnc:password", "XXXXXXXX")).build());
}

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

/**
  * Helper to create a small persistent server
  * 
  * @param name
  *           what to name the server
  * @param driveUuuid
  *           id of the boot drive
  * @param vncPassword
  *           password for vnc
  * @return a builder for a persistent 1Ghz 512m server with DHCP enabled network.
  */
  public static Server.Builder small(String name, String driveUuuid, String vncPassword) {
   return new Server.Builder().name(name).cpu(1000).mem(512).persistent(true)
      .devices(ImmutableMap.of("ide:0:0", new IDEDevice.Builder(0, 0).uuid(driveUuuid).build()))
      .bootDeviceIds(ImmutableSet.of("ide:0:0"))
      .nics(ImmutableSet.of(new NIC.Builder().model(Model.E1000).dhcp("auto").build()))
      .vnc(new VNC(null, vncPassword, false));
  }
}

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

/**
  * Helper to create a small persistent server
  * 
  * @param name
  *           what to name the server
  * @param driveUuuid
  *           id of the boot drive
  * @param vncPassword
  *           password for vnc
  * @return a builder for a persistent 1Ghz 512m server with DHCP enabled network.
  */
  public static Server.Builder small(String name, String driveUuuid, String vncPassword) {
   return new Server.Builder().name(name).cpu(1000).mem(512).persistent(true)
      .devices(ImmutableMap.of("ide:0:0", new IDEDevice.Builder(0, 0).uuid(driveUuuid).build()))
      .bootDeviceIds(ImmutableSet.of("ide:0:0"))
      .nics(ImmutableSet.of(new NIC.Builder().model(Model.E1000).dhcp("auto").build()))
      .vnc(new VNC(null, vncPassword, false));
  }
}

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

/**
  * Helper to create a small persistent server
  * 
  * @param name
  *           what to name the server
  * @param driveUuuid
  *           id of the boot drive
  * @param vncPassword
  *           password for vnc
  * @return a builder for a persistent 1Ghz 512m server with DHCP enabled network.
  */
  public static Server.Builder small(String name, String driveUuuid, String vncPassword) {
   return new Server.Builder().name(name).cpu(1000).mem(512).persistent(true)
      .devices(ImmutableMap.of("ide:0:0", new IDEDevice.Builder(0, 0).uuid(driveUuuid).build()))
      .bootDeviceIds(ImmutableSet.of("ide:0:0"))
      .nics(ImmutableSet.of(new NIC.Builder().model(Model.E1000).dhcp("auto").build()))
      .vnc(new VNC(null, vncPassword, false));
  }
}

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

public void testWeDontSetMac() {
 assertEquals(
    SERVER_TO_MAP.apply(new Server.Builder()
       .name("TestServer")
       .cpu(2000)
       .mem(1024)
       .devices(
          ImmutableMap.of("ide:0:0",
             new IDEDevice.Builder(0, 0).uuid("08c92dd5-70a0-4f51-83d2-835919d254df").build()))
       .bootDeviceIds(ImmutableSet.of("ide:0:0"))
       .nics(ImmutableSet.of(new NIC.Builder().mac("foo").model(Model.E1000).
       build())).vnc(new VNC(null, "XXXXXXXX", false)).build()),
    ImmutableMap
       .builder()
       .putAll(ImmutableMap.of("name", "TestServer", "cpu", "2000", "smp", "auto", "mem", "1024"))
       .putAll(
          ImmutableMap.of("persistent", "false", "boot", "ide:0:0", "ide:0:0",
             "08c92dd5-70a0-4f51-83d2-835919d254df"))
       .putAll(
          ImmutableMap.of("ide:0:0:media", "disk", "nic:0:model", "e1000", "vnc:ip", "auto",
             "vnc:password", "XXXXXXXX")).build());
}

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

public void testBasics() {
 assertEquals(
    SERVER_TO_MAP.apply(new Server.Builder()
       .name("TestServer")
       .cpu(2000)
       .mem(1024)
       .devices(
          ImmutableMap.of("ide:0:0",
             new IDEDevice.Builder(0, 0).uuid("08c92dd5-70a0-4f51-83d2-835919d254df").build()))
       .bootDeviceIds(ImmutableSet.of("ide:0:0")).nics(ImmutableSet.of(new NIC.Builder().model(Model.E1000).
       build())).vnc(new VNC(null, "XXXXXXXX", false)).build()),
    ImmutableMap
       .builder()
       .putAll(ImmutableMap.of("name", "TestServer", "cpu", "2000", "smp", "auto", "mem", "1024"))
       .putAll(
          ImmutableMap.of("persistent", "false", "boot", "ide:0:0", "ide:0:0",
             "08c92dd5-70a0-4f51-83d2-835919d254df"))
       .putAll(
          ImmutableMap.of("ide:0:0:media", "disk", "nic:0:model", "e1000", "vnc:ip", "auto",
             "password", "XXXXXXXX")).build());
}

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

public void testBasicsV2() {
 assertEquals(
    SERVER_TO_MAP_V2.apply(new Server.Builder()
       .name("TestServer")
       .cpu(2000)
       .mem(1024)
       .devices(
          ImmutableMap.of("ide:0:0",
             new IDEDevice.Builder(0, 0).uuid("08c92dd5-70a0-4f51-83d2-835919d254df").build()))
       .bootDeviceIds(ImmutableSet.of("ide:0:0")).nics(ImmutableSet.of(new NIC.Builder().model(Model.E1000).
       build())).vnc(new VNC(null, "XXXXXXXX", false)).build()),
    ImmutableMap
       .builder()
       .putAll(ImmutableMap.of("name", "TestServer", "cpu", "2000", "smp", "auto", "mem", "1024"))
       .putAll(
          ImmutableMap.of("persistent", "false", "boot", "ide:0:0", "ide:0:0",
             "08c92dd5-70a0-4f51-83d2-835919d254df"))
       .putAll(
          ImmutableMap.of("ide:0:0:media", "disk", "nic:0:model", "e1000", "vnc", "auto",
             "password", "XXXXXXXX")).build());
}

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

public void testWeDontSetMac() {
 assertEquals(
    SERVER_TO_MAP.apply(new Server.Builder()
       .name("TestServer")
       .cpu(2000)
       .mem(1024)
       .devices(
          ImmutableMap.of("ide:0:0",
             new IDEDevice.Builder(0, 0).uuid("08c92dd5-70a0-4f51-83d2-835919d254df").build()))
       .bootDeviceIds(ImmutableSet.of("ide:0:0"))
       .nics(ImmutableSet.of(new NIC.Builder().mac("foo").model(Model.E1000).
       build())).vnc(new VNC(null, "XXXXXXXX", false)).build()),
    ImmutableMap
       .builder()
       .putAll(ImmutableMap.of("name", "TestServer", "cpu", "2000", "smp", "auto", "mem", "1024"))
       .putAll(
          ImmutableMap.of("persistent", "false", "boot", "ide:0:0", "ide:0:0",
             "08c92dd5-70a0-4f51-83d2-835919d254df"))
       .putAll(
          ImmutableMap.of("ide:0:0:media", "disk", "nic:0:model", "e1000", "vnc:ip", "auto",
             "password", "XXXXXXXX")).build());
}

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

public void testBasics() {
 ServerInfo expects = new ServerInfo.Builder().name("foo").uuid("hello").vnc(new VNC("auto", null, false))
    .cpu(1000).mem(2048).metrics(new ServerMetrics.Builder().build()).build();
 assertEquals(MAP_TO_DRIVE.apply(ImmutableMap.of("name", "foo", "server", "hello", "vnc:ip", "auto", "cpu",
    "1000", "mem", "2048")), expects);
}

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

public void testBasics() {
 ServerInfo expects = new ServerInfo.Builder().name("foo").uuid("hello").vnc(new VNC("auto", null, false))
    .cpu(1000).mem(2048).metrics(new ServerMetrics.Builder().build()).build();
 assertEquals(MAP_TO_DRIVE.apply(ImmutableMap.of("name", "foo", "server", "hello", "vnc:ip", "auto", "cpu",
    "1000", "mem", "2048")), expects);
}

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

private static Server serverFor(Map<String, Device> devices, Iterable<String> deviceIds) {
   return new Server.Builder().name("test").vnc(new VNC(null, null, false)).devices(devices)
      .bootDeviceIds(deviceIds).build();
  }
}

相关文章

微信公众号

最新文章

更多