You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@apache.org on 2013/12/03 11:32:36 UTC

git commit: updated refs/heads/4.2 to cf1eaad

Updated Branches:
  refs/heads/4.2 7f9463bb5 -> cf1eaad84


CLOUDSTACK-5337: Trimming account name (username) to 99 characters


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

Branch: refs/heads/4.2
Commit: cf1eaad846bc1fca2a2f966c6a4529d34b40cf56
Parents: 7f9463b
Author: Girish Shilamkar <gi...@clogeny.com>
Authored: Tue Dec 3 15:59:42 2013 +0530
Committer: Girish Shilamkar <gi...@clogeny.com>
Committed: Tue Dec 3 16:02:30 2013 +0530

----------------------------------------------------------------------
 tools/marvin/marvin/integration/lib/base.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cf1eaad8/tools/marvin/marvin/integration/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base.py b/tools/marvin/marvin/integration/lib/base.py
index b03c552..1beffb0 100755
--- a/tools/marvin/marvin/integration/lib/base.py
+++ b/tools/marvin/marvin/integration/lib/base.py
@@ -98,7 +98,10 @@ class Account:
         cmd.lastname = services["lastname"]
 
         cmd.password = services["password"]
-        cmd.username = "-".join([services["username"], random_gen(id=apiclient.id)])
+
+        username = "-".join([services["username"], random_gen(id=apiclient.id)])
+        #  Trim username to 99 characters to prevent failure
+        cmd.username = username[:99] if len(username) > 99 else username
 
         if "accountUUID" in services:
             cmd.accountid =  "-".join([services["accountUUID"],random_gen()])