diff --git a/server/src/com/cloud/api/commands/ListTemplatesCmd.java b/server/src/com/cloud/api/commands/ListTemplatesCmd.java index ccb33ea9dcd..65fe5c875a3 100644 --- a/server/src/com/cloud/api/commands/ListTemplatesCmd.java +++ b/server/src/com/cloud/api/commands/ListTemplatesCmd.java @@ -33,6 +33,7 @@ import com.cloud.async.AsyncJobVO; import com.cloud.dc.DataCenterVO; import com.cloud.host.HostVO; import com.cloud.storage.GuestOS; +import com.cloud.storage.Storage; import com.cloud.storage.VMTemplateHostVO; import com.cloud.storage.VMTemplateStorageResourceAssoc.Status; import com.cloud.storage.VMTemplateVO; @@ -152,9 +153,7 @@ public class ListTemplatesCmd extends BaseListCmd { List templateResponses = new ArrayList(); for (VMTemplateVO template : templates) { - // Since we've added multiple domR templates and with different DB ids, I'm changing - // this to filter out any templates with names that start with system for now. - if (!showDomr && template.getName().startsWith("SystemVM")) { + if (!showDomr && template.getTemplateType() == Storage.TemplateType.SYSTEM) { continue; }