Package org.jclouds.compute

Examples of org.jclouds.compute.ComputeServiceContext.unwrap()


      log.fatal("Cannot delete the volume [id]: "+volumeId+" of the [region] : "+region
          +" of Iaas : "+iaasInfo);
      return;
    }
   
    RestContext<NovaApi, NovaAsyncApi> nova = context.unwrap();
    VolumeApi api = nova.getApi().getVolumeExtensionForZone(region).get();
        if (api.delete(volumeId)) {
          log.info("Deletion of Volume [id]: "+volumeId+" was successful. [region] : " + region
            + " of Iaas : " + iaasInfo);
        }
View Full Code Here


   @Test
   public void testUnwrapIsCorrectType() {
      ComputeServiceContext context = ContextBuilder.newBuilder("servermanager").build(ComputeServiceContext.class);

      assertEquals(context.unwrap().getClass(), ContextImpl.class);

      context.close();
   }
}
View Full Code Here

      ComputeServiceContext context = ContextBuilder.newBuilder("rackspace-cloudservers-us")
            .credentials(identity, credential)
            .overrides(overrides)
            .buildView(ComputeServiceContext.class);
      computeService = context.getComputeService();
      nova = context.unwrap();

      Template template = computeService.templateBuilder().smallest().build();
      NodeMetadata nodeMetadata = computeService.createNodesInGroup("jclouds-reverse-dns-test", 1, template).iterator().next();
      serverId = nodeMetadata.getId();
      serverURI = nodeMetadata.getUri();
View Full Code Here

      ComputeServiceContext context = ContextBuilder.newBuilder(provider)
            .credentials(username, apiKey)
            .modules(modules)
            .buildView(ComputeServiceContext.class);
      compute = context.getComputeService();
      nova = context.unwrap();
      volumeAttachmentApi = nova.getApi().getVolumeAttachmentExtensionForZone(Constants.ZONE).get();
      serverApi = nova.getApi().getServerApiForZone(Constants.ZONE);

      provider = "rackspace-cloudblockstorage-us";
View Full Code Here

      ComputeServiceContext context = ContextBuilder.newBuilder(provider)
            .credentials(username, apiKey)
            .modules(modules) // don't forget to add the modules to your context!
            .buildView(ComputeServiceContext.class);
      compute = context.getComputeService();
      nova = context.unwrap();

      // Calling getConfiguredZones() talks to the cloud which gets logged
      zones = nova.getApi().getConfiguredZones();
      System.out.println("Zones: " + zones);
   }
View Full Code Here

      ComputeServiceContext context = ContextBuilder.newBuilder(provider)
            .credentials(username, credential)
            .overrides(overrides)
            .buildView(ComputeServiceContext.class);
      compute = context.getComputeService();
      nova = context.unwrap();
   }

   /**
    * Calling getConfiguredZones() causes jclouds to authenticate. If authentication doesn't work, the call to
    * getConfiguredZones() will result in an org.jclouds.rest.AuthorizationException
View Full Code Here

      ComputeServiceContext context = ContextBuilder.newBuilder(provider)
            .credentials(username, apiKey)
            .buildView(ComputeServiceContext.class);
      compute = context.getComputeService();
      nova = context.unwrap();
      serverApi = nova.getApi().getServerApiForZone(Constants.ZONE);
   }

   /**
    * @return The Server created in the CreateServer example
View Full Code Here

            .credentials(username, apiKey)
            .modules(modules)
            .overrides(overrides)
            .buildView(ComputeServiceContext.class);
      compute = context.getComputeService();
      nova = context.unwrap();
      volumeAttachmentApi = nova.getApi().getVolumeAttachmentExtensionForZone(Constants.ZONE).get();

      provider = "rackspace-cloudblockstorage-us";

      cinder = ContextBuilder.newBuilder(provider)
View Full Code Here

      ComputeServiceContext context = ContextBuilder.newBuilder(provider)
            .credentials(username, apiKey)
            .buildView(ComputeServiceContext.class);
      compute = context.getComputeService();
      nova = context.unwrap();
      volumeAttachmentApi = nova.getApi().getVolumeAttachmentExtensionForZone(Constants.ZONE).get();
      serverApi = nova.getApi().getServerApiForZone(Constants.ZONE);
   }

   /**
 
View Full Code Here

   @Test
   public void testUnwrapIsCorrectType() {
      ComputeServiceContext context = ContextBuilder.newBuilder("servermanager").build(ComputeServiceContext.class);

      assertEquals(context.unwrap().getClass(), ContextImpl.class);

      context.close();
   }
}
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.