Examples of CloudStack


Examples of org.cloudfoundry.client.lib.domain.CloudStack

  @Test
  public void getStacks() throws Exception {
    List<CloudStack> stacks = connectedClient.getStacks();
    assert(stacks.size() >= 1);

    CloudStack stack = null;
    for (CloudStack s : stacks) {
      if (DEFAULT_STACK_NAME.equals(s.getName())) {
        stack = s;
      }
    }
    assertNotNull(stack);
    assertNotNull(stack.getMeta().getGuid());
    assertEquals(DEFAULT_STACK_NAME, stack.getName());
    assertNotNull(stack.getDescription());
  }
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudStack

    assertNotNull(stack.getDescription());
  }

  @Test
  public void getStack() throws Exception {
    CloudStack stack = connectedClient.getStack(DEFAULT_STACK_NAME);
    assertNotNull(stack);
    assertNotNull(stack.getMeta().getGuid());
    assertEquals(DEFAULT_STACK_NAME, stack.getName());
    assertNotNull(stack.getDescription());
  }
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudStack

      app.setRunningInstances(runningInstancesAttribute);
    }
    String command = getEntityAttribute(resource, "command", String.class);
    String buildpack = getEntityAttribute(resource, "buildpack", String.class);
    Map<String, Object> stackResource = getEmbeddedResource(resource, "stack");
    CloudStack stack = mapStackResource(stackResource);
    Integer healthCheckTimeout = getEntityAttribute(resource, "health_check_timeout", Integer.class);
    Staging staging = new Staging(command, buildpack, stack.getName(), healthCheckTimeout);
    app.setStaging(staging);

    Map envMap = getEntityAttribute(resource, "environment_json", Map.class);
    if (envMap.size() > 0) {
      app.setEnv(envMap);
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudStack

      getEntityAttribute(resource, "broker_url", String.class),
      getEntityAttribute(resource, "auth_username", String.class));
  }

  private CloudStack mapStackResource(Map<String, Object> resource) {
    return new CloudStack(getMeta(resource),
        getNameOfResource(resource),
        getEntityAttribute(resource, "description", String.class));
  }
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.