Examples of unwrapApi()


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

      ComputeServiceContext context = ContextBuilder.newBuilder(provider)
            .credentials(username, apiKey)
            .modules(modules)
            .buildView(ComputeServiceContext.class);
      computeService = context.getComputeService();
      novaApi = context.unwrapApi(NovaApi.class);
      serverApi = novaApi.getServerApiForZone(ZONE);
      volumeAttachmentApi = novaApi.getVolumeAttachmentExtensionForZone(ZONE).get();

      cinderApi = ContextBuilder.newBuilder(PROVIDER)
            .credentials(username, apiKey)
View Full Code Here

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

         SshClient client = context.utils().sshForNode().apply(node);
         client.connect();
         ExecResponse hello = client.exec("mount");
         logger.debug(hello.getOutput().trim());

         VirtualGuest virtualGuest = context.unwrapApi(SoftLayerApi.class).getVirtualGuestApi()
                 .getVirtualGuest(Long.parseLong(node.getId()));
         for (VirtualGuestBlockDevice blockDevice : virtualGuest.getVirtualGuestBlockDevices()) {
            logger.debug(blockDevice.toString());
         }
View Full Code Here

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

         assertFalse(InetAddresses2.isPrivateIPAddress(ip));
         HostAndPort socket = HostAndPort.fromParts(ip, 22);
         assertTrue(socketTester.apply(socket), String.format("failed to open socket %s on node %s", socket, node));

         // check that there is an elastic ip correlating to it
         EC2Api ec2 = context.unwrapApi(EC2Api.class);
         Set<PublicIpInstanceIdPair> ipidpairs =
               ec2.getElasticIPAddressApi().get().describeAddressesInRegion(region, publicIps.toArray(new String[0]));
         assertEquals(ipidpairs.size(), 1, String.format("there should only be one address pair (%s)",
               Iterables.toString(ipidpairs)));
View Full Code Here

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

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

      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
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.