@SuppressWarnings({ "rawtypes" }) @Test(dependsOnMethods = "testDeployApplication") public void testLocatedLocation() { log.info("starting testLocatedLocations"); testListApplications(); LocationInternal l = (LocationInternal) getManagementContext().getApplications().iterator().next().getLocations().iterator().next(); if (l.config().getLocalRaw(LocationConfigKeys.LATITUDE).isAbsent()) { log.info("Supplying fake locations for localhost because could not be autodetected"); ((AbstractLocation) l).setHostGeoInfo(new HostGeoInfo("localhost", "localhost", 50, 0)); } Map result = client().resource("/v1/locations/usage/LocatedLocations") .get(Map.class); log.info("LOCATIONS: " + result); Assert.assertEquals(result.size(), 1); Map details = (Map) result.values().iterator().next(); assertEquals(details.get("leafEntityCount"), 2); }
@Override public ApplicationSummary get(String application) { return ApplicationTransformer.summaryFromApplication(brooklyn().getApplication(application)); }
ApplicationResource extends AbstractBrooklynRestResource implements ApplicationApi { @Override public ApplicationSummary get(String application) { return ApplicationTransformer.summaryFromApplication(brooklyn().getApplication(application)); } }
ApplicationResource extends AbstractBrooklynRestResource implements ApplicationApi { @Override public ApplicationSummary get(String application) { return ApplicationTransformer.summaryFromApplication(brooklyn().getApplication(application)); }  }
ApplicationResource extends AbstractBrooklynRestResource implements ApplicationApi { @Override public ApplicationSummary get(String application) { return ApplicationTransformer.summaryFromApplication(brooklyn().getApplication(application)); }  @Deprecated @Override JsonNode applicationTree(); @Override JsonNode fetch(String entityIds); @Override List<ApplicationSummary> list(String typeRegex); @Override ApplicationSummary get(String application); Response create(ApplicationSpec applicationSpec); @Override Response createFromYaml(String yaml); @Override Response createPoly(byte[] inputToAutodetectType); @Override Response createFromForm(String contents); @Override Response delete(String application); @Override List<EntitySummary> getDescendants(String application, String typeRegex); @Override Map<String, Object> getDescendantsSensor(String application, String sensor, String typeRegex); static Map<String, Object> getSensorMap(String sensor, Iterable<Entity> descs); }
ApplicationResource extends AbstractBrooklynRestResource implements ApplicationApi { @Override public ApplicationSummary get(String application) { return ApplicationTransformer.summaryFromApplication(brooklyn().getApplication(application)); }  @Deprecated @Override JsonNode applicationTree(); @Override JsonNode fetch(String entityIds); @Override List<ApplicationSummary> list(String typeRegex); @Override ApplicationSummary get(String application); Response create(ApplicationSpec applicationSpec); @Override Response createFromYaml(String yaml); @Override Response createPoly(byte[] inputToAutodetectType); @Override Response createFromForm(String contents); @Override Response delete(String application); @Override List<EntitySummary> getDescendants(String application, String typeRegex); @Override Map<String, Object> getDescendantsSensor(String application, String sensor, String typeRegex); static Map<String, Object> getSensorMap(String sensor, Iterable<Entity> descs);  }