Package org.cloudfoundry.client.lib

Examples of org.cloudfoundry.client.lib.CloudFoundryOperations


    assertTrue(found);

    // Now create a separate external standalone client (external to the WST
    // CF Server instance) to delete the app
    URL url = new URL(getTestFixture().getUrl());
    CloudFoundryOperations client = CloudFoundryPlugin.getCloudFoundryClientFactory().getCloudFoundryOperations(
        new CloudCredentials(getTestFixture().getCredentials().userEmail,
            getTestFixture().getCredentials().password), url, false);
    client.login();
    client.deleteApplication(appName);

    // Now check if the app is indeed deleted through the server behaviour
    // delegate
    serverBehavior.refreshModules(new NullProgressMonitor());
    applications = serverBehavior.getApplications(new NullProgressMonitor());
View Full Code Here


        + appModules.size(), appModules.isEmpty());

    // Now create an external client to independently check that the
    // application remains deployed and in started mode
    URL url = new URL(getTestFixture().getUrl());
    CloudFoundryOperations client = CloudFoundryPlugin.getCloudFoundryClientFactory().getCloudFoundryOperations(
        new CloudCredentials(getTestFixture().getCredentials().userEmail,
            getTestFixture().getCredentials().password), url, false);
    client.login();
    List<CloudApplication> deployedApplications = client.getApplications();
    assertTrue("Expected one cloud application for " + appPrefix + " but got: " + deployedApplications.size(),
        deployedApplications.size() == 1);
    assertEquals(expectedAppName, deployedApplications.get(0).getName());
    assertTrue(deployedApplications.get(0).getState() == AppState.STARTED);
View Full Code Here

      }

    }

    private void clearTestDomainAndRoutes() throws CoreException {
      CloudFoundryOperations client = createStandaloneClient();
      client.login();
      String domain = getDomain();
      if (domain != null) {
        List<CloudRoute> routes = client.getRoutes(domain);
        for (CloudRoute route : routes) {
          client.deleteRoute(route.getHost(), route.getDomain().getName());
        }
      }
    }
View Full Code Here

      @Override
      protected void handleProxyChange() {

        // Create app. Should fail
        CloudFoundryOperations client = null;
        try {
          List<String> uris = new ArrayList<String>();
          uris.add("test-proxy-upload.cloudfoundry.com");

          // Do a direct client test with the proxy settings
          client = CloudFoundryPlugin.getCloudFoundryClientFactory().getCloudFoundryOperations(
              new CloudCredentials(serverBehavior.getCloudFoundryServer().getUsername(), serverBehavior
                  .getCloudFoundryServer().getPassword()),
              new URL(serverBehavior.getCloudFoundryServer().getUrl()), false);
          client.createApplication("test", new Staging(), 128, uris, new ArrayList<String>());
          fail("Expected ResourceAccessException due to invalid proxy configuration");
        }
        catch (Exception e) {
          assertTrue("Expected ResourceAccessException, got: " + e, e instanceof ResourceAccessException);
          assertEquals("invalid.proxy.test", e.getCause().getMessage());
View Full Code Here

TOP

Related Classes of org.cloudfoundry.client.lib.CloudFoundryOperations

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.