bug 8710: Attaching resource domain account to a zone code

This commit is contained in:
nit 2011-04-12 18:22:26 +05:30
parent 463bb0fdec
commit 7d51bf41b6

View File

@ -792,10 +792,13 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
private Long getZoneIdForAccount(Account account) {
/*
*_dcDao.findZonesByDomainId(account.getDomainId());
*/
return 1L;
//Currently just for resource domain admin
List<DataCenterVO> dcList = _dcDao.findZonesByDomainId(account.getDomainId());
if(dcList != null && dcList.size()!=0)
return dcList.get(0).getId();
else
throw new CloudRuntimeException("Failed to find any private zone for Resource domain admin.");
}
private boolean doSetUserStatus(long userId, State state) {