Package org.jclouds

Examples of org.jclouds.ContextBuilder.endpoint()


        if (apiMetadata != null) {
            builder = ContextBuilder.newBuilder(apiMetadata).overrides(chefConfig);
        }

        if (!Strings.isNullOrEmpty(endpoint)) {
            builder = builder.endpoint(endpoint);
        }

        builder = builder.name(name).modules(ImmutableSet.<Module>of(new SLF4JLoggingModule()));
        builder = builder.name(name).credentials(clientName, clientCredential).overrides(chefConfig);
View Full Code Here


        ContextBuilder contextBuilder = ContextBuilder.newBuilder(profile.getProvider());

        if (profile.getProvider().equals(PROVIDER_FILESYSTEM)) {
          // use endpoint as fs basedir, see: http://code.google.com/p/jclouds/issues/detail?id=776
          properties.setProperty(FilesystemConstants.PROPERTY_BASEDIR, profile.getEndpoint());
          contextBuilder.endpoint(profile.getEndpoint());
          //properties.setProperty(PROPERTY_CREDENTIAL, "dummy");
        } else if (BLOBSTORE_PROVIDERS.contains(profile.getProvider())) {
          if (profile.getEndpoint() != null) {
            contextBuilder.endpoint(profile.getEndpoint());
          }
View Full Code Here

          properties.setProperty(FilesystemConstants.PROPERTY_BASEDIR, profile.getEndpoint());
          contextBuilder.endpoint(profile.getEndpoint());
          //properties.setProperty(PROPERTY_CREDENTIAL, "dummy");
        } else if (BLOBSTORE_PROVIDERS.contains(profile.getProvider())) {
          if (profile.getEndpoint() != null) {
            contextBuilder.endpoint(profile.getEndpoint());
          }
          if (profile.getApiversion() != null) {
            contextBuilder.apiVersion(profile.getApiversion());
          }
          if (profile.getIdentity() != null && profile.getCredential() != null) {
View Full Code Here

                     .newBuilder(providerOrApiValue)
                     .credentials(identityValue, credentialValue)
                     .modules(ImmutableSet.<Module> of(new SshjSshClientModule(), new Log4JLoggingModule(),
                              new PropertiesCredentialStore()));
            if (!Strings.isNullOrEmpty(endpointValue)) {
               builder = builder.endpoint(endpointValue);
            }
            computeService = builder.build(ComputeServiceContext.class).getComputeService();
         } catch (Exception ex) {
            throw new RuntimeException("Failed to create service:" + ex.getMessage());
         }
View Full Code Here

         try {
            ContextBuilder builder = ContextBuilder.newBuilder(providerOrApiValue)
                     .credentials(identityValue, credentialValue)
                     .modules(ImmutableSet.<Module> of(new Log4JLoggingModule()));
            if (!Strings.isNullOrEmpty(endpointValue)) {
               builder = builder.endpoint(endpointValue);
            }
            BlobStoreContext context = builder.build(BlobStoreContext.class);
            blobStore = context.getBlobStore();
         } catch (Exception ex) {
            throw new RuntimeException("Failed to create service: " + ex.getMessage(), ex);
View Full Code Here

                } else if (apiMetadata != null) {
                    builder = ContextBuilder.newBuilder(apiMetadata);
                }

                if (!Strings.isNullOrEmpty(endpoint)) {
                    builder = builder.endpoint(endpoint);
                }

                builder = builder.name(id).modules(ImmutableSet.<Module>of(new Log4JLoggingModule(), new SshjSshClientModule(), new ManagementLifecycle(BaseManagementContext.INSTANCE)));

                if (credentialStore != null) {
View Full Code Here

                } else {
                    return;
                }

                if (!Strings.isNullOrEmpty(endpoint)) {
                    builder = builder.endpoint(endpoint);
                }
                context = builder.name(id).credentials(identity, credential)
                        .modules(ImmutableSet.<Module>of(new Log4JLoggingModule(), new ManagementLifecycle(BaseManagementContext.INSTANCE)))
                        .overrides(props)
                        .build(BlobStoreContext.class);
View Full Code Here

        if (apiMetadata != null) {
            builder = ContextBuilder.newBuilder(apiMetadata).overrides(chefConfig);
        }

        if (!Strings.isNullOrEmpty(endpoint)) {
            builder = builder.endpoint(endpoint);
        }

        builder = builder.name(name).modules(ImmutableSet.<Module>of(new SLF4JLoggingModule()));
        builder = builder.name(name).credentials(clientName, clientCredential).overrides(chefConfig);
View Full Code Here

                     .newBuilder(providerOrApiValue)
                     .credentials(identityValue, credentialValue)
                     .modules(ImmutableSet.<Module> of(new SshjSshClientModule(), new Log4JLoggingModule(),
                              new PropertiesCredentialStore()));
            if (!Strings.isNullOrEmpty(endpointValue)) {
               builder = builder.endpoint(endpointValue);
            }
            computeService = builder.build(ComputeServiceContext.class).getComputeService();
         } catch (Exception ex) {
            throw new RuntimeException("Failed to create service:" + ex.getMessage());
         }
View Full Code Here

         try {
            ContextBuilder builder = ContextBuilder.newBuilder(providerOrApiValue)
                     .credentials(identityValue, credentialValue)
                     .modules(ImmutableSet.<Module> of(new Log4JLoggingModule()));
            if (!Strings.isNullOrEmpty(endpointValue)) {
               builder = builder.endpoint(endpointValue);
            }
            BlobStoreContext context = builder.build(BlobStoreContext.class);
            blobStore = context.getBlobStore();
         } catch (Exception ex) {
            throw new RuntimeException("Failed to create service: " + ex.getMessage(), ex);
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.