Updated Branches: refs/heads/4.3 a0bfc9926 -> cb70ed155
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/cb70ed15 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cb70ed15 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cb70ed15 Branch: refs/heads/4.3 Commit: cb70ed1550c4cf659da92312a00d09496a32e1d6 Parents: a0bfc99 Author: Girish Shilamkar <gir...@clogeny.com> Authored: Tue Dec 3 15:59:42 2013 +0530 Committer: Girish Shilamkar <gir...@clogeny.com> Committed: Tue Dec 3 16:02:12 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/cb70ed15/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()])