Package org.cloudfoundry.client.lib.domain

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


  public void testConnectToNonSecureUrl() throws Exception {
    CloudFoundryOperations client = CloudFoundryPlugin.getCloudFoundryClientFactory().getCloudFoundryOperations(
        CloudFoundryTestFixture.CF_PIVOTAL_SERVER_URL_HTTP);

    CloudInfo cloudInfo = client.getCloudInfo();
    Assert.assertNotNull(cloudInfo);
  }
View Full Code Here


  }

  public void testConnectToSecureUrl() throws Exception {
    CloudFoundryOperations client = CloudFoundryPlugin.getCloudFoundryClientFactory().getCloudFoundryOperations(
        CloudFoundryTestFixture.CF_PIVOTAL_SERVER_URL_HTTPS);
    CloudInfo cloudInfo = client.getCloudInfo();
    Assert.assertNotNull(cloudInfo);

  }
View Full Code Here

    accessToken.setRefreshToken(refreshToken);
    when(client.login()).thenReturn(accessToken);

    HashMap<String, Object> info = new HashMap<String, Object>(1);
    info.put("version", "2");
    when(client.getCloudInfo()).thenReturn(new CloudInfo(info));

    Date date = new Date();
    CloudOrganization org = new CloudOrganization(new CloudEntity.Meta(UUID.randomUUID(), date, date), "my-org");
    CloudSpace space = new CloudSpace(new CloudEntity.Meta(UUID.randomUUID(), date, date), "my-space", org);
    List<CloudSpace> spaces = Arrays.asList(space);
View Full Code Here

  }

  @Override
  protected void doExecute() throws MojoExecutionException {
    final OAuth2AccessToken token = getClient().login();
    final CloudInfo cloudInfo = getClient().getCloudInfo();
    final CloudSpace space = getCurrentSpace();

    tokensFile.saveToken(getTarget(), token, cloudInfo, space);

    getLog().info("Authentication successful");
View Full Code Here

  }


  @Test
  public void infoAvailable() throws Exception {
    CloudInfo info = connectedClient.getCloudInfo();
    assertNotNull(info.getName());
    assertNotNull(info.getSupport());
    assertNotNull(info.getBuild());
  }
View Full Code Here

  //

  @Test
  public void infoAvailableWithoutLoggingIn() throws Exception {
    CloudFoundryClient infoClient = new CloudFoundryClient(new URL(CCNG_API_URL), httpProxyConfiguration, CCNG_API_SSL);
    CloudInfo info = infoClient.getCloudInfo();
    assertNotNull(info.getName());
    assertNotNull(info.getSupport());
    assertNotNull(info.getBuild());
    assertTrue(info.getUser() == null);
  }
View Full Code Here

    assertTrue(info.getUser() == null);
  }

  @Test
  public void infoForUserAvailable() throws Exception {
    CloudInfo info = connectedClient.getCloudInfo();

    assertNotNull(info.getName());
    assertNotNull(info.getSupport());
    assertNotNull(info.getBuild());
    assertNotNull(info.getSupport());
    assertNotNull(info.getSupport());

    assertEquals(CCNG_USER_EMAIL, info.getUser());
    assertNotNull(info.getLimits());
    // Just ensure that we got back some sensible values
    assertTrue(info.getLimits().getMaxApps() > 0 && info.getLimits().getMaxApps() < 1000);
    assertTrue(info.getLimits().getMaxServices() > 0 && info.getLimits().getMaxServices() < 1000);
    assertTrue(info.getLimits().getMaxTotalMemory() > 0 && info.getLimits().getMaxTotalMemory() < 100000);
    assertTrue(info.getLimits().getMaxUrisPerApp() > 0 && info.getLimits().getMaxUrisPerApp() < 100);
  }
View Full Code Here

*/
public class Target extends AbstractCloudFoundryMojo {

  @Override
  protected void doExecute() throws MojoExecutionException {
    final CloudInfo cloudInfo = getClient().getCloudInfo();
    getLog().info(UiUtils.renderCloudInfoFormattedAsString(cloudInfo, getTarget().toString(), getOrg(), getSpace()));
  }
View Full Code Here

      debug = CloudUtil.parse(Boolean.class, infoMap.get("allow_debug"));
    }

    String loggregatorEndpoint = CloudUtil.parse(String.class, infoV2Map.get("logging_endpoint"));

    return new CloudInfo(name, support, authorizationEndpoint, build, version, (String)userMap.get("user_name"),
        description, limits, usage, debug, loggregatorEndpoint);
  }
View Full Code Here

TOP

Related Classes of org.cloudfoundry.client.lib.domain.CloudInfo

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.