brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #782: Adds `PUT /applications/{appid}`
Date Tue, 01 Aug 2017 14:16:29 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/782#discussion_r130619493
  
    --- Diff: rest/rest-api/src/main/java/org/apache/brooklyn/rest/api/ApplicationApi.java
---
    @@ -110,15 +112,32 @@ public Response createFromYaml(
                         required = true)
                 String yaml);
     
    +    @Beta
    +    @PUT
    +    @Path("/{application}")
    +    @Consumes({"application/x-yaml",
    +            // see http://stackoverflow.com/questions/332129/yaml-mime-type
    +            "text/yaml", "text/x-yaml", "application/yaml"})
    +    @ApiOperation(
    +            value = "[BETA] Create and start a new application from YAML, with the given
id",
    +            response = org.apache.brooklyn.rest.domain.TaskSummary.class
    +    )
    +    @ApiResponses(value = {
    +            @ApiResponse(code = 404, message = "Undefined entity or location"),
    +            @ApiResponse(code = 409, message = "Application already registered")
    --- End diff --
    
    @m4rkmckenna weird - my test `ApplicationResourceTest.testDeploymentFailsOnDuplicateAppId`
asserts that it gives back a 409. I'll investigate further (building Brooklyn, and testing
via the REST api directly).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message