You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mc...@apache.org on 2013/02/08 23:16:36 UTC
[1/2] git commit: refs/heads/4.1 - CLOUDSTACK-1216: insert UUID when
we create "admin" user in DB.
CLOUDSTACK-1216: insert UUID when we create "admin" user in DB.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/94fc6485
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/94fc6485
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/94fc6485
Branch: refs/heads/4.1
Commit: 94fc648525c5f923ab1bfd93f0f84e80f634dd03
Parents: cfffa38
Author: Min Chen <mi...@citrix.com>
Authored: Fri Feb 8 14:15:15 2013 -0800
Committer: Min Chen <mi...@citrix.com>
Committed: Fri Feb 8 14:15:15 2013 -0800
----------------------------------------------------------------------
.../com/cloud/server/ConfigurationServerImpl.java | 16 +++++++-------
1 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/94fc6485/server/src/com/cloud/server/ConfigurationServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java
index 5fa4c60..6bf7f95 100755
--- a/server/src/com/cloud/server/ConfigurationServerImpl.java
+++ b/server/src/com/cloud/server/ConfigurationServerImpl.java
@@ -123,7 +123,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
@Inject private NetworkOfferingDao _networkOfferingDao;
@Inject private DataCenterDao _dataCenterDao;
@Inject private NetworkDao _networkDao;
- @Inject private VlanDao _vlanDao;
+ @Inject private VlanDao _vlanDao;
private String _domainSuffix;
@Inject private DomainDao _domainDao;
@Inject private AccountDao _accountDao;
@@ -135,11 +135,11 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
public ConfigurationServerImpl() {
setRunLevel(ComponentLifecycle.RUN_LEVEL_FRAMEWORK_BOOTSTRAP);
}
-
+
@Override
public boolean configure(String name, Map<String, Object> params)
throws ConfigurationException {
-
+
try {
persistDefaultValues();
} catch (InternalErrorException e) {
@@ -235,7 +235,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
createDefaultNetworks();
createDefaultRegion();
-
+
// Create userIpAddress ranges
// Update existing vlans with networkId
@@ -374,8 +374,8 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
}
// now insert the user
- insertSql = "INSERT INTO `cloud`.`user` (id, username, password, account_id, firstname, lastname, created, state, region_id) " +
- "VALUES (" + id + ",'" + username + "', RAND(), 2, '" + firstname + "','" + lastname + "',now(), 'disabled', '1')";
+ insertSql = "INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname, lastname, created, state, region_id) " +
+ "VALUES (" + id + ", UUID(), '" + username + "', RAND(), 2, '" + firstname + "','" + lastname + "',now(), 'disabled', '1')";
txn = Transaction.currentTxn();
try {
@@ -1271,9 +1271,9 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
return svcProviders;
}
-
+
private void createDefaultRegion(){
- //Get Region name and URL from db.properties
+ //Get Region name and URL from db.properties
_regionDao.persist(new RegionVO(_regionDao.getRegionId(), "Local", "http://localhost:8080/client/api", "", ""));
}