bug 6243: adding a check to return an error in case we have a null domain id for a non null account

status 6243: resolved fixed
This commit is contained in:
abhishek 2010-09-21 15:48:26 -07:00
parent f89e11bb21
commit 122b0d1aeb

View File

@ -118,6 +118,10 @@ public class ListVMsCmd extends BaseCmd {
domainId = account.getDomainId();
}
if(account!=null && domainId==null){
throw new ServerApiException(BaseCmd.ACCOUNT_ERROR, "Please specify the domain id for this account:"+account.getId());
}
Long[] accountIds = null;
if (accountId != null) {
accountIds = new Long[1];