Package org.jclouds.openstack.nova.v2_0.domain.zonescoped

Examples of org.jclouds.openstack.nova.v2_0.domain.zonescoped.FlavorInZone.slashEncode()


                        .<Set<? extends Image>> ofInstance(images), Suppliers
                        .<Set<? extends Hardware>> ofInstance(hardwares), namingConvention);

      NodeMetadata convertedNodeMetadata = converter.apply(serverInZoneToConvert);

      assertEquals(serverInZoneToConvert.slashEncode(), convertedNodeMetadata.getId());
      assertEquals(serverToConvert.getId(), convertedNodeMetadata.getProviderId());

      assertEquals(convertedNodeMetadata.getLocation(), zone);

      URI expectedURI = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/37936628937291/servers/71752");
View Full Code Here


      logger.trace("<< server(%s)", server.getId());

      ServerInZone serverInZone = new ServerInZone(server, zoneId);
      if (!privateKey.isPresent() && lightweightServer.getAdminPass().isPresent())
         credentialsBuilder.password(lightweightServer.getAdminPass().get());
      return new NodeAndInitialCredentials<ServerInZone>(serverInZone, serverInZone.slashEncode(), credentialsBuilder
               .build());
   }

   @Override
   public Iterable<FlavorInZone> listHardwareProfiles() {
View Full Code Here

      logger.info(">> Registered new Image %s, waiting for it to become available.", newImageId);
     
      final AtomicReference<Image> image = Atomics.newReference(new ImageBuilder()
            .location(find(locations.get(), idEquals(targetImageZoneAndId.getZone())))
            .id(targetImageZoneAndId.slashEncode())
            .providerId(targetImageZoneAndId.getId())
            .description(cloneTemplate.getName())
            .operatingSystem(OperatingSystem.builder().description(cloneTemplate.getName()).build())
            .status(Image.Status.PENDING).build());
View Full Code Here

      logger.info(">> Registered new Image %s, waiting for it to become available.", newImageId);
     
      final AtomicReference<Image> image = Atomics.newReference(new ImageBuilder()
            .location(find(locations.get(), idEquals(targetImageZoneAndId.getZone())))
            .id(targetImageZoneAndId.slashEncode())
            .providerId(targetImageZoneAndId.getId())
            .description(cloneTemplate.getName())
            .operatingSystem(OperatingSystem.builder().description(cloneTemplate.getName()).build())
            .status(Image.Status.PENDING).build());
View Full Code Here

            .overrideLoginUser(Constants.ROOT)
            .overrideLoginPassword(Constants.PASSWORD)
            .blockOnComplete(true);

      ZoneAndId zoneAndId = ZoneAndId.fromZoneAndId(Constants.ZONE, volumeAttachment.getServerId());
      ExecResponse response = compute.runScriptOnNode(zoneAndId.slashEncode(), script, options);

      if (response.getExitStatus() == 0) {
         System.out.println("  Exit Status: " + response.getExitStatus());
      }
      else {
View Full Code Here

      logger.info(">> Registered new Image %s, waiting for it to become available.", newImageId);
     
      final AtomicReference<Image> image = Atomics.newReference(new ImageBuilder()
            .location(find(locations.get(), idEquals(targetImageZoneAndId.getZone())))
            .id(targetImageZoneAndId.slashEncode())
            .providerId(targetImageZoneAndId.getId())
            .description(cloneTemplate.getName())
            .operatingSystem(OperatingSystem.builder().description(cloneTemplate.getName()).build())
            .status(Image.Status.PENDING).build());
View Full Code Here

      ZoneAndId zoneAndId = ZoneAndId.fromZoneAndId(ZONE, "performance1-1");
      Template template = computeService.templateBuilder()
            .locationId(ZONE)
            .osDescriptionMatches(".*Ubuntu 12.04.*")
            .hardwareId(zoneAndId.slashEncode())
            .options(options)
            .build();

      // This method will continue to poll for the server status and won't return until this server is ACTIVE
      // If you want to know what's happening during the polling, enable logging.
View Full Code Here

      ZoneAndId zoneAndId = ZoneAndId.fromZoneAndId(ZONE, "performance1-1");
      Template template = computeService.templateBuilder()
            .locationId(ZONE)
            .osDescriptionMatches(".*Ubuntu 12.04.*")
            .hardwareId(zoneAndId.slashEncode())
            .build();

      // This method will continue to poll for the server status and won't return until this server is ACTIVE
      // If you want to know what's happening during the polling, enable logging.
      // See /jclouds-example/rackspace/src/main/java/org/jclouds/examples/rackspace/Logging.java
View Full Code Here

      ZoneAndId zoneAndId = ZoneAndId.fromZoneAndId(ZONE, "performance1-1");
      Template template = computeService.templateBuilder()
            .locationId(ZONE)
            .osDescriptionMatches(".*Ubuntu 12.04.*")
            .hardwareId(zoneAndId.slashEncode())
            .build();

      Set<? extends NodeMetadata> nodes = computeService.createNodesInGroup(NAME, 1, template);
      NodeMetadata nodeMetadata = nodes.iterator().next();
      String publicAddress = nodeMetadata.getPublicAddresses().iterator().next();
View Full Code Here

            .overrideLoginUser(ROOT)
            .overrideLoginPassword(PASSWORD)
            .blockOnComplete(true);

      ZoneAndId zoneAndId = ZoneAndId.fromZoneAndId(ZONE, volumeAttachment.getServerId());
      ExecResponse response = computeService.runScriptOnNode(zoneAndId.slashEncode(), script, options);

      if (response.getExitStatus() == 0) {
         System.out.format("  Exit Status: %s%n", response.getExitStatus());
      }
      else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.