Set Softlayer max name length to a tested 55chars

More than this causes different types of error.

Revert "fix JcloudsMachineNamer"
This reverts commit 0adda6374c3450c06e7c2a663e8e953941d6afe0.


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

Branch: refs/heads/master
Commit: 3f612ef08b10bfc0ce798110634f4fa38a5c1201
Parents: 8c5dc9d
Author: Duncan Grant <[email protected]>
Authored: Mon Feb 2 09:51:12 2015 +0000
Committer: Duncan Grant <[email protected]>
Committed: Tue Feb 3 11:25:17 2015 +0000

----------------------------------------------------------------------
 .../location/jclouds/JcloudsMachineNamer.java         | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/3f612ef0/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsMachineNamer.java
----------------------------------------------------------------------
diff --git 
a/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsMachineNamer.java
 
b/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsMachineNamer.java
index 5d531f5..c3f7b28 100644
--- 
a/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsMachineNamer.java
+++ 
b/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsMachineNamer.java
@@ -26,20 +26,22 @@ public class JcloudsMachineNamer extends CloudMachineNamer {
     public JcloudsMachineNamer(ConfigBag setup) {
         super(setup);
     }
-    
+
     /** returns the max length of a VM name for the cloud specified in setup;
      * this value is typically decremented by 9 to make room for jclouds 
labels */
     public Integer getCustomMaxNameLength() {
         // otherwise, for some known clouds which only allow a short name, use 
that length
-        if ("vcloud".equals( setup.peek(JcloudsLocationConfig.CLOUD_PROVIDER) 
)) 
+        if ("vcloud".equals( setup.peek(JcloudsLocationConfig.CLOUD_PROVIDER) 
))
             return 24;
-        if ("abiquo".equals( setup.peek(JcloudsLocationConfig.CLOUD_PROVIDER) 
)) 
+        if ("abiquo".equals( setup.peek(JcloudsLocationConfig.CLOUD_PROVIDER) 
))
             return 39;
         if ("google-compute-engine".equals( 
setup.peek(JcloudsLocationConfig.CLOUD_PROVIDER) ))
             return 39;
+        if ("softlayer".equals( 
setup.peek(JcloudsLocationConfig.CLOUD_PROVIDER) ))
+            return 55;
         // TODO other cloud max length rules
-        
-        return null;  
+
+        return null;
     }
-    
+
 }

Reply via email to