incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muralire...@apache.org
Subject [42/50] [abbrv] git commit: refs/heads/gslb-wip - CLOUDSTACK-1451 Pass randomly generated UUID instead of empty string when create internal account as a part of project creation. Otherwise entityexistsexception would happen when attempt to create more th
Date Mon, 18 Mar 2013 10:14:48 GMT
CLOUDSTACK-1451 Pass randomly generated UUID instead of empty string when create internal account
as a part of project creation. Otherwise entityexistsexception would happen when attempt to
create more than 1 project in the system


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

Branch: refs/heads/gslb-wip
Commit: 860ea5c0dd2583ee9704b61489ec7108d4f502f1
Parents: c129c4e
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Thu Mar 7 11:21:59 2013 -0800
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Fri Mar 8 14:57:54 2013 -0800

----------------------------------------------------------------------
 .../src/com/cloud/projects/ProjectManagerImpl.java |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/860ea5c0/server/src/com/cloud/projects/ProjectManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/projects/ProjectManagerImpl.java b/server/src/com/cloud/projects/ProjectManagerImpl.java
index 45a9a24..33feb5d 100755
--- a/server/src/com/cloud/projects/ProjectManagerImpl.java
+++ b/server/src/com/cloud/projects/ProjectManagerImpl.java
@@ -23,6 +23,7 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Random;
 import java.util.TimeZone;
+import java.util.UUID;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
@@ -204,7 +205,7 @@ public class ProjectManagerImpl extends ManagerBase implements ProjectManager
{
         StringBuilder acctNm = new StringBuilder("PrjAcct-");
         acctNm.append(name).append("-").append(owner.getDomainId());
 
-        Account projectAccount = _accountMgr.createAccount(acctNm.toString(), Account.ACCOUNT_TYPE_PROJECT,
domainId, null, null, "", 0);
+        Account projectAccount = _accountMgr.createAccount(acctNm.toString(), Account.ACCOUNT_TYPE_PROJECT,
domainId, null, null, UUID.randomUUID().toString(), 0);
 
         Project project = _projectDao.persist(new ProjectVO(name, displayText, owner.getDomainId(),
projectAccount.getId()));
 


Mime
View raw message