add gc job for backup task(sync/recovery)
fixes:
package org.zstack.tag;
+import org.zstack.core.db.Q;
import org.zstack.core.db.SimpleQuery;
import org.zstack.core.db.SimpleQuery.Op;
import org.zstack.header.tag.SystemTagInventory;
@@ -127,4 +128,9 @@ public class PatternedSystemTag extends SystemTag {
SystemTagVO vo = q.find();
return vo == null ? null : SystemTagInventory.valueOf(vo);
}
+
+ public List<SystemTagInventory> getTagInventories(String resourceUuid) {
+ return SystemTagInventory.valueOf(Q.New(SystemTagVO.class).eq(SystemTagVO_.resourceType, getResourceClass().getSimpleName()).
+ eq(SystemTagVO_.resourceUuid, resourceUuid).like(SystemTagVO_.tag, useTagFormat()).list());
+ }
}
