incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject [12/50] [abbrv] git commit: refs/heads/javelin - temp changes
Date Fri, 01 Feb 2013 19:38:11 GMT
temp changes


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

Branch: refs/heads/javelin
Commit: f365426b99b5e395b6ffe3fc19b81ec5a63afa43
Parents: c40aac0
Author: Kishan Kavala <kishan@cloud.com>
Authored: Thu Nov 8 23:37:30 2012 +0530
Committer: Kishan Kavala <kishan@cloud.com>
Committed: Thu Nov 8 23:37:30 2012 +0530

----------------------------------------------------------------------
 server/src/com/cloud/region/RegionManagerImpl.java |    5 +++--
 server/src/com/cloud/user/AccountManagerImpl.java  |    4 ++++
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f365426b/server/src/com/cloud/region/RegionManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/region/RegionManagerImpl.java b/server/src/com/cloud/region/RegionManagerImpl.java
index 0311780..3797ea1 100755
--- a/server/src/com/cloud/region/RegionManagerImpl.java
+++ b/server/src/com/cloud/region/RegionManagerImpl.java
@@ -289,6 +289,7 @@ public class RegionManagerImpl implements RegionManager, RegionService,
Manager{
 
 	@Override
 	public boolean removeRegion(int id) {
+		//Remove complete row, instead of soft delete
 		RegionVO region = _regionDao.findById(id);
 		if(region != null){
 			return _regionDao.remove(id);
@@ -469,10 +470,10 @@ public class RegionManagerImpl implements RegionManager, RegionService,
Manager{
 			//First delete in the Region where account is created
 			Region region = _regionDao.findById(regionId);
 			if (RegionsApiUtil.makeAPICall(region, command, params)) {
-				s_logger.debug("Successfully deleted user :"+userUUID+" in Region: "+region.getId());
+				s_logger.debug("Successfully deleted user :"+userUUID+" in source Region: "+region.getId());
 				return true;
 			} else {
-				s_logger.error("Error while deleting user :"+userUUID+" in Region: "+region.getId());
+				s_logger.error("Error while deleting user :"+userUUID+" in source Region: "+region.getId());
 				return false;
 			}
 		}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f365426b/server/src/com/cloud/user/AccountManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/user/AccountManagerImpl.java b/server/src/com/cloud/user/AccountManagerImpl.java
index 7d36d54..b72a8ac 100755
--- a/server/src/com/cloud/user/AccountManagerImpl.java
+++ b/server/src/com/cloud/user/AccountManagerImpl.java
@@ -1937,6 +1937,7 @@ public class AccountManagerImpl implements AccountManager, AccountService,
Manag
 
     @Override @DB
     public String[] createApiKeyAndSecretKey(RegisterCmd cmd) {
+    	//Send keys to other Regions
         Long userId = cmd.getId();
 
         if (getUserIncludingRemoved(userId) == null) {
@@ -2381,6 +2382,9 @@ public class AccountManagerImpl implements AccountManager, AccountService,
Manag
 	@Override
 	public User findUser(String username, Long domainId) {
 		UserAccount userAccount = _userAccountDao.getUserAccount(username, domainId);
+		if(userAccount == null){
+			throw new InvalidParameterValueException("Unable to find user account by name: "+username);
+		}
 		User user = _userDao.findById(userAccount.getId());
 		if(user == null){
 			throw new InvalidParameterValueException("Unable to find user by name: "+username);


Mime
View raw message