mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
CLOUDSTACK-8964: Ovm3HypervisorGuru handle only srcData with HypervisorType is Ovm3
This commit is contained in:
parent
69e031d9be
commit
a90b953dbc
@ -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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user