Examples of CrashesInfo


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

    connectedClient.startApplication(appName);

    boolean pass = getInstanceInfosWithTimeout(appName, 1, false);
    assertTrue("Couldn't get the right application state in 50 tries", pass);

    CrashesInfo crashes = connectedClient.getCrashes(appName);
    assertNotNull(crashes);
    assertTrue(!crashes.getCrashes().isEmpty());
    for (CrashInfo info : crashes.getCrashes()) {
      assertNotNull(info.getInstance());
      assertNotNull(info.getSince());
    }
  }
View Full Code Here

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

  }

  @Override
  public Map<String, String> getCrashLogs(String appName) {
    String urlPath = getFileUrlPath();
    CrashesInfo crashes = getCrashes(appName);
    if (crashes.getCrashes().isEmpty()) {
      return Collections.emptyMap();
    }
    TreeMap<Date, String> crashInstances = new TreeMap<Date, String>();
    for (CrashInfo crash : crashes.getCrashes()) {
      crashInstances.put(crash.getSince(), crash.getInstance());
    }
    String instance = crashInstances.get(crashInstances.lastKey());
    return doGetLogs(urlPath, appName, instance);
  }
View Full Code Here

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

    Map<String, Object> urlVars = new HashMap<String, Object>();
    urlVars.put("guid", appId);
    String resp = getRestTemplate().getForObject(getUrl("/v2/apps/{guid}/crashes"), String.class, urlVars);
    Map<String, Object> respMap = JsonUtil.convertJsonToMap("{ \"crashes\" : " + resp + " }");
    List<Map<String, Object>> attributes = (List<Map<String, Object>>) respMap.get("crashes");
    return new CrashesInfo(attributes);
  }
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.