From 2251751177b6cb66a7e7682ada9ac83ee06a55e2 Mon Sep 17 00:00:00 2001 From: Anshul Gangwar Date: Wed, 28 Oct 2015 14:45:52 +0530 Subject: [PATCH] CLOUDSTACK-9025 : [Xenserver] Sending template creation from snapshot command to Hypervisor if hypervisor version is not 6.1.0 and 6.2.0 without XSHotFix62ESP1004. --- .../xenserver/src/com/cloud/hypervisor/XenServerGuru.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/XenServerGuru.java b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/XenServerGuru.java index 9567f313492f..32f69429f1f3 100644 --- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/XenServerGuru.java +++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/XenServerGuru.java @@ -193,9 +193,13 @@ public Pair getCommandHostDelegation(long hostId, Command cmd) { EndPoint ep = endPointSelector.selectHypervisorHost(new ZoneScope(host.getDataCenterId())); host = hostDao.findById(ep.getId()); hostDao.loadDetails(host); + String hypervisorVersion = host.getHypervisorVersion(); String snapshotHotFixVersion = host.getDetail(XenserverConfigs.XS620HotFix); - if (snapshotHotFixVersion != null && snapshotHotFixVersion.equalsIgnoreCase(XenserverConfigs.XSHotFix62ESP1004)) { - return new Pair(Boolean.TRUE, new Long(ep.getId())); + if(hypervisorVersion != null && !hypervisorVersion.equalsIgnoreCase("6.1.0") ) { + if (!(hypervisorVersion.equalsIgnoreCase("6.2.0") && + !(snapshotHotFixVersion != null && snapshotHotFixVersion.equalsIgnoreCase(XenserverConfigs.XSHotFix62ESP1004)))) { + return new Pair(Boolean.TRUE, new Long(ep.getId())); + } } } }