Merge pull request #838 from bvbharatk/CLOUDSTACK-8857

CLOUDSTACK-8857 listProjects doesn't return tags vmstopped or vmrunning when their value is zero listProjects doesn't return tags vmstopped or vmrunning when their value is zero
added the the appropriate tags to response.

tested this manually by creating projects, launching vms from project accounts and then listing the projects.

* pr/838:
  CLOUDSTACK-8857 listProjects doesn't return tags vmstopped or vmrunning when their value is zero

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
This commit is contained in:
Rajani Karuturi 2017-02-23 12:08:47 +05:30
commit cd68e99148
1 changed files with 2 additions and 2 deletions

View File

@ -162,8 +162,8 @@ public class AccountJoinDaoImpl extends GenericDaoBase<AccountJoinVO, Long> impl
response.setTemplateAvailable(templateAvail);
// Get stopped and running VMs
response.setVmStopped(account.getVmStopped());
response.setVmRunning(account.getVmRunning());
response.setVmStopped(account.getVmStopped()!=null ? account.getVmStopped() : 0);
response.setVmRunning(account.getVmRunning()!=null ? account.getVmRunning() : 0);
//get resource limits for networks
long networkLimit = ApiDBUtils.findCorrectResourceLimit(account.getNetworkLimit(), account.getId(), ResourceType.network);