brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [2/2] git commit: Log yaml on REST createApp call
Date Tue, 24 Jun 2014 09:45:26 GMT
Log yaml on REST createApp call


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/7ef579c7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/7ef579c7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/7ef579c7

Branch: refs/heads/master
Commit: 7ef579c7b0a013a2d229f3aa570ef0a2e9b2a4aa
Parents: f3f2315
Author: Aled Sage <aled.sage@gmail.com>
Authored: Tue Jun 24 09:12:40 2014 +0100
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Tue Jun 24 10:09:18 2014 +0100

----------------------------------------------------------------------
 .../java/brooklyn/rest/resources/ApplicationResource.java | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/7ef579c7/usage/rest-server/src/main/java/brooklyn/rest/resources/ApplicationResource.java
----------------------------------------------------------------------
diff --git a/usage/rest-server/src/main/java/brooklyn/rest/resources/ApplicationResource.java
b/usage/rest-server/src/main/java/brooklyn/rest/resources/ApplicationResource.java
index 8877128..d517f44 100644
--- a/usage/rest-server/src/main/java/brooklyn/rest/resources/ApplicationResource.java
+++ b/usage/rest-server/src/main/java/brooklyn/rest/resources/ApplicationResource.java
@@ -4,14 +4,11 @@ import static com.google.common.base.Preconditions.checkNotNull;
 import static javax.ws.rs.core.Response.created;
 import static javax.ws.rs.core.Response.status;
 import static javax.ws.rs.core.Response.Status.ACCEPTED;
-
-import brooklyn.util.ResourceUtils;
 import io.brooklyn.camp.brooklyn.spi.creation.BrooklynAssemblyTemplateInstantiator;
 import io.brooklyn.camp.spi.Assembly;
 import io.brooklyn.camp.spi.AssemblyTemplate;
 import io.brooklyn.camp.spi.instantiate.AssemblyTemplateInstantiator;
 
-import java.io.IOException;
 import java.io.Reader;
 import java.io.StringReader;
 import java.net.URI;
@@ -25,7 +22,6 @@ import java.util.Map;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.ResponseBuilder;
-import javax.ws.rs.core.UriBuilder;
 import javax.ws.rs.core.UriInfo;
 
 import org.codehaus.jackson.JsonNode;
@@ -58,6 +54,7 @@ import brooklyn.rest.transform.EntityTransformer;
 import brooklyn.rest.transform.TaskTransformer;
 import brooklyn.rest.util.BrooklynRestResourceUtils;
 import brooklyn.rest.util.WebResourceUtils;
+import brooklyn.util.ResourceUtils;
 import brooklyn.util.collections.MutableList;
 import brooklyn.util.collections.MutableMap;
 import brooklyn.util.exceptions.Exceptions;
@@ -229,12 +226,11 @@ public class ApplicationResource extends AbstractBrooklynRestResource
implements
           uri = null;
       }
       if (uri != null) {
-          log.debug("Input to createFromYaml might be a URL: " + uri);
+          log.debug("Create app called with URI; retrieving contents: {}", uri);
           yaml = ResourceUtils.create(mgmt()).getResourceAsString(uri.toString());
-          log.debug("Continuing using the contents of the URL: {}", yaml);
       }
 
-      log.debug("Creating app from yaml");
+      log.debug("Creating app from yaml:\n{}", yaml);
       Reader input = new StringReader(yaml);
       AssemblyTemplate at = camp().pdp().registerDeploymentPlan(input);
       return launch(at);


Mime
View raw message