brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [1/6] incubator-brooklyn git commit: LocationResource indentation
Date Mon, 24 Aug 2015 08:53:49 GMT
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master 0b723a09f -> 6fe9fc762


LocationResource indentation


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

Branch: refs/heads/master
Commit: d6f2f38754c3a63df1b5584b9cd87e7dde65468f
Parents: 2a3603b
Author: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Authored: Tue Aug 18 18:04:12 2015 +0100
Committer: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Committed: Fri Aug 21 10:16:42 2015 +0100

----------------------------------------------------------------------
 .../rest/resources/LocationResource.java        | 25 ++++++++++----------
 1 file changed, 13 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/d6f2f387/usage/rest-server/src/main/java/org/apache/brooklyn/rest/resources/LocationResource.java
----------------------------------------------------------------------
diff --git a/usage/rest-server/src/main/java/org/apache/brooklyn/rest/resources/LocationResource.java
b/usage/rest-server/src/main/java/org/apache/brooklyn/rest/resources/LocationResource.java
index 275dbe9..c6bf9e7 100644
--- a/usage/rest-server/src/main/java/org/apache/brooklyn/rest/resources/LocationResource.java
+++ b/usage/rest-server/src/main/java/org/apache/brooklyn/rest/resources/LocationResource.java
@@ -153,18 +153,19 @@ public class LocationResource extends AbstractBrooklynRestResource implements
Lo
                 "",
                 "brooklyn.locations:",
                 "- type: "+locationSpec.getSpec());
-          if (locationSpec.getConfig().size() > 0) {
-              yaml.add("  brooklyn.config:");
-              for (Map.Entry<String, ?> entry : locationSpec.getConfig().entrySet())
{
-                  yaml.add("    "+entry.getKey()+": "+entry.getValue());
-              }
-          }
-
-          brooklyn().getCatalog().addItems(Joiner.on("\n").join(yaml.build()));
-          LocationDefinition l = brooklyn().getLocationRegistry().getDefinedLocationByName(name);
-          return Response.created(URI.create(name))
-                  .entity(LocationTransformer.newInstance(mgmt(), l, LocationDetailLevel.LOCAL_EXCLUDING_SECRET))
-                  .build();
+        if (locationSpec.getConfig().size() > 0) {
+            yaml.add("  brooklyn.config:");
+            for (Map.Entry<String, ?> entry : locationSpec.getConfig().entrySet())
{
+                yaml.add("    " + entry.getKey() + ": " + entry.getValue());
+            }
+        }
+
+        String locationBlueprint = Joiner.on("\n").join(yaml.build());
+        brooklyn().getCatalog().addItems(locationBlueprint);
+        LocationDefinition l = brooklyn().getLocationRegistry().getDefinedLocationByName(name);
+        return Response.created(URI.create(name))
+                .entity(LocationTransformer.newInstance(mgmt(), l, LocationDetailLevel.LOCAL_EXCLUDING_SECRET))
+                .build();
     }
 
     @Override


Mime
View raw message