Skip to content

Commit 566238b

Browse files
subhash yedugundlayadvr
authored andcommitted
CLOUDSTACK-8908: After copying the template charging for that template is stopped (#2308)
When a template is copied back to zone after it is deleted. deleted field gets reset to null. delete field is added to Search on template zone mapping table to take care of the existing mapping.
1 parent 47419df commit 566238b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

engine/schema/src/com/cloud/usage/dao/UsageStorageDaoImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public UsageStorageDaoImpl() {
6666
IdZoneSearch.and("id", IdZoneSearch.entity().getId(), SearchCriteria.Op.EQ);
6767
IdZoneSearch.and("type", IdZoneSearch.entity().getStorageType(), SearchCriteria.Op.EQ);
6868
IdZoneSearch.and("dcId", IdZoneSearch.entity().getZoneId(), SearchCriteria.Op.EQ);
69+
IdZoneSearch.and("deleted", IdZoneSearch.entity().getDeleted(), SearchCriteria.Op.NULL);
6970
IdZoneSearch.done();
7071
}
7172

@@ -85,6 +86,7 @@ public List<UsageStorageVO> listByIdAndZone(long accountId, long id, int type, l
8586
sc.setParameters("id", id);
8687
sc.setParameters("type", type);
8788
sc.setParameters("dcId", dcId);
89+
sc.setParameters("deleted", null);
8890
return listBy(sc, null);
8991
}
9092

0 commit comments

Comments
 (0)