From 963db4448221ad6cc5b00fe1fc067c3e1e9d0733 Mon Sep 17 00:00:00 2001 From: Frank Date: Fri, 6 May 2011 15:49:07 -0700 Subject: [PATCH] Bug 9768 - BAREMETAL: teplates not showing up in ui after being added resolved: fixed --- server/src/com/cloud/api/ApiDBUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/com/cloud/api/ApiDBUtils.java b/server/src/com/cloud/api/ApiDBUtils.java index f757ca5078b..87ff3ed0cfc 100755 --- a/server/src/com/cloud/api/ApiDBUtils.java +++ b/server/src/com/cloud/api/ApiDBUtils.java @@ -426,7 +426,7 @@ public class ApiDBUtils { public static VMTemplateHostVO findTemplateHostRef(long templateId, long zoneId) { VMTemplateVO vmTemplate = findTemplateById(templateId); if (vmTemplate.getHypervisorType() == HypervisorType.BareMetal) { - return _templateHostDao.findByHostTemplate(zoneId, templateId); + return _templateHostDao.listByTemplateId(templateId).get(0); } else { HostVO secondaryStorageHost = _storageMgr.getSecondaryStorageHost(zoneId); if (secondaryStorageHost == null) { @@ -482,7 +482,7 @@ public class ApiDBUtils { if (zoneId != null) { VMTemplateVO vmTemplate = findTemplateById(templateId); if (vmTemplate.getHypervisorType() == HypervisorType.BareMetal) { - return _templateHostDao.listByHostTemplate(zoneId, templateId); + return _templateHostDao.listByTemplateId(templateId); } else { HostVO secondaryStorageHost = _storageMgr.getSecondaryStorageHost(zoneId); if (secondaryStorageHost == null) {