Package org.jclouds.domain

Examples of org.jclouds.domain.Credentials


      ClusterSpec clusterSpec = entry.getValue().getClusterSpec();
      final StatementBuilder statementBuilder = entry.getValue().getStatementBuilder();
      ComputeServiceContext computeServiceContext = getCompute().apply(clusterSpec);
      final ComputeService computeService = computeServiceContext.getComputeService();
      Credentials credentials = new Credentials(clusterSpec.getIdentity(), clusterSpec.getCredential());
     
      if (numberAllocated == 0) {
        for (ComputeMetadata compute : computeService.listNodes()) {
          if (!(compute instanceof NodeMetadata)) {
            throw new IllegalArgumentException("Not an instance of NodeMetadata: " + compute);
View Full Code Here


  private Cluster cluster;
  private static final int NUMBER_OF_INSTANCES = 5;

  @Before
  public void setUp() {
    Credentials credentials = new Credentials("dummy", "dummy");
    Set<Cluster.Instance> instances = Sets.newHashSet();

    for(int i = 0; i < NUMBER_OF_INSTANCES; i++) {
      String ip = "127.0.0." + (i + 1);
      instances.add(new Cluster.Instance(credentials,
View Full Code Here

  }

  private Cluster createTestCluster(String[] ids, String[] roles) {
    checkArgument(ids.length == roles.length, "each ID should have a role");

    Credentials credentials = new Credentials("dummy", "dummy");
    Set<Cluster.Instance> instances = Sets.newHashSet();

    for(int i = 0; i < ids.length; i++) {
      String ip = "127.0.0." + (i + 1);
      instances.add(new Cluster.Instance(credentials,
View Full Code Here

  }

  private Cluster createTestCluster(String[] ids, String[] roles) {
    checkArgument(ids.length == roles.length, "each ID should have a role");

    Credentials credentials = new Credentials("dummy", "dummy");
    Set<Cluster.Instance> instances = Sets.newHashSet();

    for(int i = 0; i < ids.length; i++) {
      String ip = "127.0.0." + (i + 1);
      instances.add(new Cluster.Instance(credentials,
View Full Code Here

  public synchronized void testNotSetIsDefault() throws IOException {
    try {
      System.getProperties().remove("whirr.login-user");
      assertThat(
          strat.execute(null),
          equalTo(new Credentials("root", null)));
    } finally {
      System.getProperties().remove("whirr.login-user");
    }
  }
View Full Code Here

  public synchronized void testSetEmptyIsDefault() throws IOException {
    try {
      System.setProperty("whirr.login-user", "");
      assertThat(
          strat.execute(null),
          equalTo(new Credentials("root", null)));
    } finally {
      System.getProperties().remove("whirr.login-user");
    }
  }
View Full Code Here

  public synchronized void testSetUsername() throws IOException {
    try {
      System.setProperty("whirr.login-user", "ubuntu");
      assertThat(
          strat.execute(null),
          equalTo(new Credentials("ubuntu", null)));
    } finally {
      System.getProperties().remove("whirr.login-user");
    }
  }
View Full Code Here

  public synchronized void testSetUsernamePassword() throws IOException {
    try {
      System.setProperty("whirr.login-user", "ubuntu:pass");
      assertThat(
          strat.execute(null),
          equalTo(new Credentials("ubuntu", "pass")));
    } finally {
      System.getProperties().remove("whirr.login-user");
    }
  }
View Full Code Here

    spec = getTestClusterSpec();
    context =  ComputeCache.INSTANCE.apply(spec);

    /* create a dummy instance for testing */
    instances = Sets.newHashSet(new Cluster.Instance(
      new Credentials("dummy", "dummy"),
      Sets.newHashSet("dummy-role"),
      "50.0.0.1",
      "10.0.0.1",
      REGION + "/i-dummy",
      null
View Full Code Here

  }

  private Cluster createTestCluster(String[] ids, String[] roles) {
    checkArgument(ids.length == roles.length, "each ID should have a role");

    Credentials credentials = new Credentials("dummy", "dummy");
    Set<Cluster.Instance> instances = Sets.newLinkedHashSet();

    for(int i = 0; i < ids.length; i++) {
      String ip = "127.0.0." + (i + 1);
      instances.add(new Cluster.Instance(credentials,
View Full Code Here

TOP

Related Classes of org.jclouds.domain.Credentials

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.