Package org.jclouds.elasticstack.domain

Examples of org.jclouds.elasticstack.domain.VNC


   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));
   }
View Full Code Here


      builder.uuid(from.get("server"));
      if (from.containsKey("boot"))
         builder.bootDeviceIds(Splitter.on(' ').split(from.get("boot")));


      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"))));


      Map<String, String> metadata = Maps.newLinkedHashMap();
      for (Entry<String, String> entry : from.entrySet()) {
View Full Code Here

   public void testEmptyMapReturnsNull() {
      assertEquals(MAP_TO_DRIVE.apply(ImmutableMap.<String, String> of()), null);
   }

   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);
   }
View Full Code Here

                  .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",
View Full Code Here

                        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",
View Full Code Here

                  .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",
View Full Code Here

      builder.uuid(from.get("server"));
      if (from.containsKey("boot"))
         builder.bootDeviceIds(Splitter.on(' ').split(from.get("boot")));


      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"))));


      Map<String, String> metadata = Maps.newLinkedHashMap();
      for (Entry<String, String> entry : from.entrySet()) {
View Full Code Here

   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));
   }
View Full Code Here

   public void testEmptyMapReturnsNull() {
      assertEquals(MAP_TO_DRIVE.apply(ImmutableMap.<String, String> of()), null);
   }

   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);
   }
View Full Code Here

                  .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",
View Full Code Here

TOP

Related Classes of org.jclouds.elasticstack.domain.VNC

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.