Package org.jclouds.cloudstack

Examples of org.jclouds.cloudstack.CloudStackApiMetadata


         Properties overrides = new Properties();
         overrides.put(Constants.PROPERTY_TRUST_ALL_CERTS, "true");
         overrides.put(Constants.PROPERTY_RELAX_HOSTNAME, "true");
         overrides.put("jclouds.cloudstack.credential-type", "passwordCredentials");
        
         context =  ContextBuilder.newBuilder(new CloudStackApiMetadata())
               .endpoint(checkNotNull(endpoint, "endpoint").toASCIIString())
               .credentials(String.format("%s/%s", checkNotNull(domain, "domain"), checkNotNull(username, "username")), password)
               .overrides(overrides).build(CloudStackContext.class);

         CloudStackClient client = context.unwrap(CloudStackApiMetadata.CONTEXT_TOKEN).getApi();
View Full Code Here


      return new CloudStackRestClientModuleExtension();
   }

   @Override
   protected ProviderMetadata createProviderMetadata() {
      return  AnonymousProviderMetadata.forApiWithEndpoint(new CloudStackApiMetadata(),
            "http://localhost:8080/client/api");
   }
View Full Code Here

    }

    protected RestContext<CloudStackClient, CloudStackAsyncClient> newCloudStackContext(Provider provider) {
        Properties overrides = new Properties();
        overrides.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true");
        return ContextBuilder.newBuilder(new CloudStackApiMetadata())
            .endpoint(provider.getEndpoint().get())
            .modules(ImmutableSet.of(new SLF4JLoggingModule()))
            .credentials(provider.getAccessKey(), provider.getSecretKey())
            .overrides(overrides)
            .build(CloudStackApiMetadata.CONTEXT_TOKEN);
View Full Code Here

     */
    RestContext<CloudStackClient, CloudStackAsyncClient> newCloudStackClient(Provider provider) {
        checkArgument(provider.getEndpoint().isPresent(), "please specify an endpoint for this provider");
        Properties overrides = new Properties();
        overrides.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true");
        return ContextBuilder.newBuilder(new CloudStackApiMetadata())
            .endpoint(provider.getEndpoint().get())
            .modules(ImmutableSet.<Module>of(new SLF4JLoggingModule()))
            .credentials(provider.getAccessKey(), provider.getSecretKey())
            .overrides(overrides)
            .build(CloudStackApiMetadata.CONTEXT_TOKEN);
View Full Code Here

*/
@Test(groups = "unit", testName = "NinefoldComputeProviderTest")
public class NinefoldComputeProviderTest extends BaseProviderMetadataTest {

   public NinefoldComputeProviderTest() {
      super(new NinefoldComputeProviderMetadata(), new CloudStackApiMetadata());
   }
View Full Code Here

         BaseProviderMetadata.Builder {

      protected Builder() {
         id("ninefold-compute")
         .name("Ninefold Compute")
         .apiMetadata(new CloudStackApiMetadata().toBuilder().version("2.2.12").build())
         .homepage(URI.create("http://ninefold.com/virtual-servers/"))
         .console(URI.create("https://ninefold.com/portal/portal/login"))
         .iso3166Codes("AU-NSW")
         .endpoint("https://api.ninefold.com/compute/v1.0/")
         .defaultProperties(NinefoldComputeProviderMetadata.defaultProperties());
View Full Code Here

         Properties overrides = new Properties();
         overrides.put(Constants.PROPERTY_TRUST_ALL_CERTS, "true");
         overrides.put(Constants.PROPERTY_RELAX_HOSTNAME, "true");
         overrides.put("jclouds.cloudstack.credential-type", "passwordCredentials");
        
         context =  ContextBuilder.newBuilder(new CloudStackApiMetadata())
               .endpoint(checkNotNull(endpoint, "endpoint").toASCIIString())
               .credentials(String.format("%s/%s", checkNotNull(domain, "domain"), checkNotNull(username, "username")), password)
               .overrides(overrides).build(CloudStackContext.class);

         CloudStackApi client = context.getApi();
View Full Code Here

      return new CloudStackHttpApiModuleExtension();
   }

   @Override
   protected ProviderMetadata createProviderMetadata() {
      return  AnonymousProviderMetadata.forApiWithEndpoint(new CloudStackApiMetadata(),
            "http://localhost:8080/client/api");
   }
View Full Code Here

      provider = "cloudstack";
   }
  
   @Override
   protected ApiMetadata createApiMetadata() {
      return new CloudStackApiMetadata();
   }
View Full Code Here

*/
@Test(groups = "unit", testName = "NinefoldComputeProviderTest")
public class NinefoldComputeProviderTest extends BaseProviderMetadataTest {

   public NinefoldComputeProviderTest() {
      super(new NinefoldComputeProviderMetadata(), new CloudStackApiMetadata());
   }
View Full Code Here

TOP

Related Classes of org.jclouds.cloudstack.CloudStackApiMetadata

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.