Updated Branches: refs/heads/master d2bf5c9d5 -> c39bc04be
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/c39bc04b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c39bc04b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c39bc04b Branch: refs/heads/master Commit: c39bc04be6f310cc684dec9923fdcefe95ac53d0 Parents: d2bf5c9 Author: Girish Shilamkar <[email protected]> Authored: Tue Dec 3 15:59:42 2013 +0530 Committer: Girish Shilamkar <[email protected]> Committed: Tue Dec 3 15:59:42 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/c39bc04b/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 bce1327..86f962a 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()])
