cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [4/6] git commit: updated refs/heads/4.6 to f66e782
Date Sun, 06 Dec 2015 19:02:54 GMT
CLOUDSTACK-8964: Ovm3HypervisorGuru handle only srcData with HypervisorType is Ovm3


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a90b953d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a90b953d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a90b953d

Branch: refs/heads/4.6
Commit: a90b953dbcb80cba09e03f34f96a7a52c0521d4f
Parents: 69e031d
Author: Wei Zhou <w.zhou@tech.leaseweb.com>
Authored: Fri Dec 4 18:26:12 2015 +0100
Committer: Wei Zhou <w.zhou@tech.leaseweb.com>
Committed: Fri Dec 4 19:19:04 2015 +0100

----------------------------------------------------------------------
 .../hypervisor/ovm3/resources/Ovm3HypervisorGuru.java     | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a90b953d/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java
b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java
index 6ec7741..4d222bb 100755
--- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java
+++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java
@@ -96,18 +96,16 @@ public class Ovm3HypervisorGuru extends HypervisorGuruBase implements
Hypervisor
             DataTO srcData = cpyCommand.getSrcTO();
             DataTO destData = cpyCommand.getDestTO();
 
-            if (srcData.getObjectType() == DataObjectType.SNAPSHOT && destData.getObjectType()
== DataObjectType.TEMPLATE) {
+            if (HypervisorType.Ovm3.equals(srcData.getHypervisorType()) && srcData.getObjectType()
== DataObjectType.SNAPSHOT && destData.getObjectType() == DataObjectType.TEMPLATE)
{
                 LOGGER.debug("Snapshot to Template: " + cmd);
                 DataStoreTO srcStore = srcData.getDataStore();
                 DataStoreTO destStore = destData.getDataStore();
                 if (srcStore instanceof NfsTO && destStore instanceof NfsTO) {
                     HostVO host = hostDao.findById(hostId);
                     EndPoint ep = endPointSelector.selectHypervisorHost(new ZoneScope(host.getDataCenterId()));
-                    host = hostDao.findById(ep.getId());
-                    hostDao.loadDetails(host);
-                    // String snapshotHotFixVersion = host.getDetail(XenserverConfigs.XS620HotFix);
-                    // if (snapshotHotFixVersion != null && snapshotHotFixVersion.equalsIgnoreCase(XenserverConfigs.XSHotFix62ESP1004))
{
-                    return new Pair<Boolean, Long>(Boolean.TRUE,  Long.valueOf(ep.getId()));
+                    if (ep != null) {
+                        return new Pair<Boolean, Long>(Boolean.TRUE,  Long.valueOf(ep.getId()));
+                    }
                 }
             }
         }


Mime
View raw message