mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge branch '4.16'
This commit is contained in:
commit
67002b67ec
@ -567,20 +567,18 @@ public class NetworkHelperImpl implements NetworkHelper {
|
|||||||
protected List<HypervisorType> getHypervisors(final RouterDeploymentDefinition routerDeploymentDefinition) throws InsufficientServerCapacityException {
|
protected List<HypervisorType> getHypervisors(final RouterDeploymentDefinition routerDeploymentDefinition) throws InsufficientServerCapacityException {
|
||||||
final DeployDestination dest = routerDeploymentDefinition.getDest();
|
final DeployDestination dest = routerDeploymentDefinition.getDest();
|
||||||
List<HypervisorType> hypervisors = new ArrayList<HypervisorType>();
|
List<HypervisorType> hypervisors = new ArrayList<HypervisorType>();
|
||||||
|
final HypervisorType defaults = _resourceMgr.getDefaultHypervisor(dest.getDataCenter().getId());
|
||||||
|
if (defaults != HypervisorType.None) {
|
||||||
|
hypervisors.add(defaults);
|
||||||
|
}
|
||||||
if (dest.getCluster() != null) {
|
if (dest.getCluster() != null) {
|
||||||
if (dest.getCluster().getHypervisorType() == HypervisorType.Ovm) {
|
if (dest.getCluster().getHypervisorType() == HypervisorType.Ovm) {
|
||||||
hypervisors.add(getClusterToStartDomainRouterForOvm(dest.getCluster().getPodId()));
|
hypervisors.add(getClusterToStartDomainRouterForOvm(dest.getCluster().getPodId()));
|
||||||
} else {
|
} else {
|
||||||
hypervisors.add(dest.getCluster().getHypervisorType());
|
hypervisors.add(dest.getCluster().getHypervisorType());
|
||||||
}
|
}
|
||||||
} else {
|
} else if (defaults == HypervisorType.None) {
|
||||||
final HypervisorType defaults = _resourceMgr.getDefaultHypervisor(dest.getDataCenter().getId());
|
hypervisors = _resourceMgr.getSupportedHypervisorTypes(dest.getDataCenter().getId(), true, routerDeploymentDefinition.getPlan().getPodId());
|
||||||
if (defaults != HypervisorType.None) {
|
|
||||||
hypervisors.add(defaults);
|
|
||||||
} else {
|
|
||||||
// if there is no default hypervisor, get it from the cluster
|
|
||||||
hypervisors = _resourceMgr.getSupportedHypervisorTypes(dest.getDataCenter().getId(), true, routerDeploymentDefinition.getPlan().getPodId());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
filterSupportedHypervisors(hypervisors);
|
filterSupportedHypervisors(hypervisors);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user