Package org.jclouds.elasticstack.domain

Examples of org.jclouds.elasticstack.domain.Server


      }
      logger.debug("<< imaged (%s)", drive);

      template.getOptions().userMetadata(ComputeServiceConstants.NODE_GROUP_KEY, tag);

      Server toCreate = small(name, drive.getUuid(), defaultVncPassword).mem(template.getHardware().getRam())
               .cpu((int) (template.getHardware().getProcessors().get(0).getSpeed()))
               .tags(template.getOptions().getTags()).userMetadata(template.getOptions().getUserMetadata()).build();

      ServerInfo from = client.createServer(toCreate);
View Full Code Here


      }
      logger.debug("<< imaged (%s)", drive);

      template.getOptions().userMetadata(ComputeServiceConstants.NODE_GROUP_KEY, tag);

      Server toCreate = small(name, drive.getUuid(), defaultVncPassword).mem(template.getHardware().getRam())
               .cpu((int) (template.getHardware().getProcessors().get(0).getSpeed()))
               .tags(template.getOptions().getTags()).userMetadata(template.getOptions().getUserMetadata()).build();

      ServerInfo from = client.createServer(toCreate);
View Full Code Here

   @Test(dependsOnMethods = "testSetDriveData")
   public void testCreateAndStartServer() throws Exception {
      Logger.getAnonymousLogger().info("preparing drive");
      prepareDrive();

      Server serverRequest = Servers.small(prefix, drive.getUuid(), vncPassword).build();

      Logger.getAnonymousLogger().info("starting server");
      server = client.createServer(serverRequest);
      client.startServer(server.getUuid());
      server = client.getServerInfo(server.getUuid());
      checkStartedServer();

      Server newInfo = client.getServerInfo(server.getUuid());
      checkServerMatchesGet(newInfo);

   }
View Full Code Here

   private GetImageIdFromServer function = new GetImageIdFromServer(knownDrives);

   public void testImageIdExists() {
      Map<String, Device> devices = deviceMapFor(UUID.randomUUID().toString());
      Server server = serverFor(devices, devices.keySet());
      assertEquals(function.apply(server), "foo");
   }
View Full Code Here

      assertEquals(function.apply(server), "foo");
   }

   public void testImageIdExistsAndUsesTheFirstDevice() {
      Map<String, Device> devices = deviceMapFor(UUID.randomUUID().toString(), UNKNOWN_DRIVE_UUID);
      Server server = serverFor(devices, devices.keySet());
      assertEquals(function.apply(server), "foo");
   }
View Full Code Here

      assertEquals(function.apply(server), "foo");
   }

   public void testImageIdIsNullWhenNoBootableDevices() {
      Map<String, Device> devices = deviceMapFor(UUID.randomUUID().toString());
      Server server = serverFor(devices, ImmutableSet.<String> of());
      assertNull(function.apply(server));
   }
View Full Code Here

      assertNull(function.apply(server));
   }

   public void testImageIdIsNullWhenNoDeviceWithGivenId() {
      Map<String, Device> devices = deviceMapFor(UUID.randomUUID().toString());
      Server server = serverFor(ImmutableMap.<String, Device> of(), devices.keySet());
      assertNull(function.apply(server));
   }
View Full Code Here

      this.listOfMapsToListOfKeyValuesDelimitedByBlankLines = listOfMapsToListOfKeyValuesDelimitedByBlankLines;
   }
   @Override
   public <R extends HttpRequest> R bindToRequest(R request, Object payload) {
      checkArgument(payload instanceof Server, "this binder is only valid for Server!");
      Server create = Server.class.cast(payload);
      Map<String, String> map = createServerRequestToMap.apply(create);
      request.setPayload(listOfMapsToListOfKeyValuesDelimitedByBlankLines.apply(ImmutableSet.of(map)));
      request.getPayload().getContentMetadata().setContentType(MediaType.TEXT_PLAIN);
      return request;
   }
View Full Code Here

TOP

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

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.