Examples of credentials()


Examples of org.jclouds.ContextBuilder.credentials()

         this.api = org.jclouds.rest.RestApiMetadata.class.cast(am).getApi();
      } else {
         throw new UnsupportedOperationException("unsupported base type: " + am);
      }
      // isolate tests from eachother, as default credentialStore is static
      return builder.credentials(identity, credential).modules(
               ImmutableSet.of(new ExpectModule(fn), new NullLoggingModule(), new CredentialStoreModule(new CopyInputStreamInputSupplierMap(
                     new ConcurrentHashMap<String, InputSupplier<InputStream>>())), module)).overrides(props)
               .buildInjector();
   }
  
View Full Code Here

Examples of org.jclouds.ContextBuilder.credentials()

  public static void main(String[] args) {
    // Configure/Authenticate the Dyn Java Messaging client instance
    ProviderMetadata meta = Providers.withId("dyn-messaging");
    ContextBuilder ctx = ContextBuilder.newBuilder(meta);

    ctx.credentials(/* intentionally blank -> */"", "yourapikey");
    DynMessagingApi dyn = ctx.buildApi(DynMessagingApi.class);

    SendMailApi send = dyn.getSendMailApi();
    System.out.println("send : "
        + send.sendMessage("fromperson@example.org",
View Full Code Here

Examples of org.jclouds.ContextBuilder.credentials()

      ContextBuilder builder = pm != null ? ContextBuilder.newBuilder(pm) : ContextBuilder.newBuilder(ApiMetadata.class
            .cast(checkNotNull(createApiMetadata(),
                  "either createApiMetadata or createProviderMetadata must be overridden")));

      return builder.credentials(identity, credential)
            .modules(ImmutableSet.of(new MockModule(), new NullLoggingModule(), createModule()))
            .overrides(setupProperties()).buildInjector();
   }

   /**
 
View Full Code Here

Examples of org.jclouds.ContextBuilder.credentials()

         this.api = HttpApiMetadata.class.cast(am).getApi();
      } else {
         throw new UnsupportedOperationException("unsupported base type: " + am);
      }
      // isolate tests from eachother, as default credentialStore is static
      return builder.credentials(identity, credential)
               .modules(ImmutableSet.of(new ExpectModule(fn), new NullLoggingModule(), new CredentialStoreModule(new ConcurrentHashMap<String, ByteSource>()), module))
               .overrides(props)
               .buildInjector();
   }
  
View Full Code Here

Examples of org.jclouds.compute.domain.NodeMetadataBuilder.credentials()

            builder.operatingSystem(image.getOperatingSystem());
            String user = image.getDefaultCredentials().getUser();
            credentialsBuilder.identity(user);
         }

         builder.credentials(credentialsBuilder.build());

         if (from.getServer() instanceof VServerWithVNICs) {

            VServerWithVNICs server = (VServerWithVNICs) from.getServer();
            builder.location(parseLocation(server));
View Full Code Here

Examples of org.jclouds.compute.domain.NodeMetadataBuilder.credentials()

         }
      } catch (Exception ex) {
         // None?
      }
      // builder.privateAddresses(ImmutableSet.<String> of(from.privateAddress));
      builder.credentials(LoginCredentials.fromCredentials(credentialStore.get(from.getUuid() + "")));
      return builder.build();
   }
}
View Full Code Here

Examples of org.jclouds.compute.domain.NodeMetadataBuilder.credentials()

   private NodeMetadata buildPartialNodeMetadata(IMachine clone, String guestOsUser, String guestOsPassword) {
      NodeMetadataBuilder nodeMetadataBuilder = new NodeMetadataBuilder();
      nodeMetadataBuilder.id(clone.getName());
      nodeMetadataBuilder.status(VirtualBoxComputeServiceContextModule.toPortableNodeStatus.get(clone.getState()));
      nodeMetadataBuilder.publicAddresses(ImmutableSet.of(networkUtils.getValidHostOnlyIpFromVm(clone.getName())));
      nodeMetadataBuilder.credentials(LoginCredentials.builder()
                                                      .user(guestOsUser)
                                                      .password(guestOsPassword)
                                                      .authenticateSudo(true).build());
      return nodeMetadataBuilder.build();
   }
View Full Code Here

Examples of org.jclouds.compute.domain.NodeMetadataBuilder.credentials()

               .version(version).is64Bit(guestOSType.getIs64Bit()).build();
      nodeMetadataBuilder.operatingSystem(os);

      String guestOsUser = vm.getExtraData(GUEST_OS_USER);
      String guestOsPassword = vm.getExtraData(GUEST_OS_PASSWORD);
      nodeMetadataBuilder.credentials(LoginCredentials.builder()
                                                      .user(guestOsUser)
                                                      .password(guestOsPassword)
                                                      .authenticateSudo(true).build());
      return nodeMetadataBuilder.build();
   }
View Full Code Here

Examples of org.jclouds.compute.domain.NodeMetadataBuilder.credentials()

         if (from.getSudoPassword() != null){
            credBuilder.password(from.getSudoPassword());
            credBuilder.authenticateSudo(true);
         }
         LoginCredentials creds = credBuilder.build();
         builder.credentials(creds);
         credentialStore.put("node#" + from.getId(), creds);
      }

      return builder.build();
   }
View Full Code Here

Examples of org.jclouds.compute.domain.NodeMetadataBuilder.credentials()

      builder.imageId(template.getImage().getId());
      builder.operatingSystem(template.getImage().getOperatingSystem());
      builder.status(Status.PENDING);
      builder.publicAddresses(ImmutableSet.<String> of(publicIpPrefix + id));
      builder.privateAddresses(ImmutableSet.<String> of(privateIpPrefix + id));
      builder.credentials(LoginCredentials.builder().user("root").password(passwordPrefix + id).build());
      NodeMetadata node = builder.build();
      nodes.put(node.getId(), node);
      setStateOnNodeAfterDelay(Status.RUNNING, node, 100);
      return new NodeWithInitialCredentials(node);
   }
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.