Github user sjcorbett commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/156#discussion_r17304413
--- Diff: usage/rest-api/src/main/java/brooklyn/rest/api/EntityApi.java ---
@@ -70,11 +70,49 @@ public EntitySummary get(
@GET
@ApiOperation(value = "Fetch details about a specific application
entity's children",
responseClass = "brooklyn.rest.domain.EntitySummary")
- @Path("/{entity}/entities")
+ @Path("/{entity}/children")
public List<EntitySummary> getChildren(
@PathParam("application") final String application,
@PathParam("entity") final String entity
- ) ;
+ );
+
+ /** @deprecated since 0.7.0 use /children */
+ @Deprecated
+ @Path("/{entity}/entities")
+ public List<EntitySummary> getChildrenOld(
+ @PathParam("application") final String application,
+ @PathParam("entity") final String entity
+ );
+
+ @POST
+ @ApiOperation(value = "Add a child or children to this entity given a
YAML spec",
+ responseClass = "brooklyn.rest.domain.TaskSummary")
+ @Consumes({"application/x-yaml",
+ // see http://stackoverflow.com/questions/332129/yaml-mime-type
+ "text/yaml", "text/x-yaml", "application/yaml",
MediaType.APPLICATION_JSON})
+ @Path("/{entity}/children")
+ public Response addChildren(
+ @PathParam("application") final String application,
+ @PathParam("entity") final String entity,
+
+ @ApiParam(
+ name = "start",
+ value = "Whether to automatically start this child; if omitted,
true for Startable entities")
+ @QueryParam("start") final Boolean start,
+
+ @ApiParam(name = "timeout", value = "Delay before server should
respond with incomplete activity task, rather than completed task: " +
+ "'never' means block until complete; " +
+ "'0' means return task immediately; " +
+ "and e.g. '20ms' (the default) will wait 20ms for copmleted task
information to be available",
--- End diff --
`copmleted`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---