cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [10/29] git commit: refs/heads/ui-plugins - CLOUDSTACK-1216: insert UUID when we create "admin" user in DB.
Date Mon, 11 Feb 2013 19:48:59 GMT
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/1cf85aa8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/1cf85aa8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/1cf85aa8

Branch: refs/heads/ui-plugins
Commit: 1cf85aa87aee205470590534f9e9f3996eb6df7c
Parents: a92968c
Author: Min Chen <min.chen@citrix.com>
Authored: Fri Feb 8 14:15:15 2013 -0800
Committer: Min Chen <min.chen@citrix.com>
Committed: Fri Feb 8 14:18:31 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/1cf85aa8/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",
"", ""));
     }
 


Mime
View raw message