Package org.cloudfoundry.client.lib.domain

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


      // Create the application if it doesn't already exist
      if (!found) {

        printlnToConsole(appModule, Messages.CONSOLE_APP_CREATION);

        Staging staging = appModule.getDeploymentInfo().getStaging();
        List<String> uris = appModule.getDeploymentInfo().getUris() != null ? appModule.getDeploymentInfo()
            .getUris() : new ArrayList<String>(0);
        List<String> services = appModule.getDeploymentInfo().asServiceBindingList();

        if (staging == null) {
          // For v2, a non-null staging is required.
          staging = new Staging();
        }
        client.createApplication(appName, staging, appModule.getDeploymentInfo().getMemory(), uris, services);
      }
      super.pushApplication(client, appModule, warFile, applicationArchive, monitor);
    }
View Full Code Here


      readApplicationURL(application, workingCopy, appName, monitor);
      subMonitor.worked(1);

      String buildpackurl = getStringValue(application, BUILDPACK_PROP);
      if (buildpackurl != null) {
        Staging staging = new Staging(null, buildpackurl);
        workingCopy.setStaging(staging);
      }

      readEnvars(workingCopy, application);
      subMonitor.worked(1);
View Full Code Here

      for (EnvironmentVariable var : envvars) {
        varMap.put(var.getVariable(), var.getValue());
      }
    }

    Staging staging = deploymentInfo.getStaging();
    if (staging != null && staging.getBuildpackUrl() != null) {
      application.put(BUILDPACK_PROP, staging.getBuildpackUrl());
    }

    String archiveURL = deploymentInfo.getArchive();
    if (archiveURL != null) {
      application.put(PATH_PROP, archiveURL);
View Full Code Here

  public Staging getStaging() {
    if (appModule == null) {
      return null;
    }
    Staging staging = appModule.getDeploymentInfo() != null  ? appModule.getDeploymentInfo().getStaging() : null;
    if (staging == null) {
      CloudApplication cloudApp = appModule.getApplication();
      if (cloudApp != null) {
        staging = cloudApp.getStaging();
      }
View Full Code Here

    this.deploymentInfo = deploymentInfo;
  }

  public void setStartCommand(String startCommand) {
    Staging staging = deploymentInfo.getStaging();
    String buildpackUrl = staging != null ? staging.getBuildpackUrl() : null;
    staging = new Staging(startCommand, buildpackUrl);
    deploymentInfo.setStaging(staging);
  }
View Full Code Here

    staging = new Staging(startCommand, buildpackUrl);
    deploymentInfo.setStaging(staging);
  }

  public void setBuildpack(String buildpack) {
    Staging staging = deploymentInfo.getStaging();

    String existingStartCommand = staging != null ? staging.getCommand() : null;
    staging = new Staging(existingStartCommand, buildpack);
    deploymentInfo.setStaging(staging);
  }
View Full Code Here

          // 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

  public static void deployTunnelApp(CloudFoundryClient client) {
    ClassPathResource cpr = new ClassPathResource("caldecott_helper.zip");
    try {
      File temp = copyCaldecottZipFile(cpr);
      client.createApplication(TUNNEL_APP_NAME, new Staging("ruby19", "sinatra"), 64,
          Arrays.asList(getRandomUrl(client, TUNNEL_APP_NAME)),
          Arrays.asList(new String[] {}), false);
      client.uploadApplication(TUNNEL_APP_NAME, temp);
      client.updateApplicationEnv(TUNNEL_APP_NAME,
          Collections.singletonMap("CALDECOTT_AUTH", UUID.randomUUID().toString()));
View Full Code Here

  @Test
  public void createApplication() {
    String appName = namespacedAppName("travel_test-0");
    List<String> uris = Arrays.asList(computeAppUrl(appName));
    Staging staging =  new Staging();
    connectedClient.createApplication(appName, staging, DEFAULT_MEMORY, uris, null);
    CloudApplication app = connectedClient.getApplication(appName);
    assertNotNull(app);
    assertEquals(appName, app.getName());
View Full Code Here

    String appName = namespacedAppName("travel_test-tld");

    connectedClient.addDomain(TEST_DOMAIN);
    List<String> uris = Arrays.asList(TEST_DOMAIN);

    Staging staging =  new Staging();
    connectedClient.createApplication(appName, staging, DEFAULT_MEMORY, uris, null);
    CloudApplication app = connectedClient.getApplication(appName);
    assertNotNull(app);
    assertEquals(appName, app.getName());
View Full Code Here

TOP

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

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.