Skip to content

Commit bc2ec23

Browse files
author
Frank Zhang
committed
CLOUDSTACK-6278
Baremetal Advanced Networking support
1 parent 8b89494 commit bc2ec23

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,15 @@ public DeployDestination planDeployment(VirtualMachineProfile vmProfile, Deploym
403403
s_logger.debug("The last host of this VM is UP and has enough capacity");
404404
s_logger.debug("Now checking for suitable pools under zone: " + host.getDataCenterId()
405405
+ ", pod: " + host.getPodId() + ", cluster: " + host.getClusterId());
406+
407+
Pod pod = _podDao.findById(host.getPodId());
408+
Cluster cluster = _clusterDao.findById(host.getClusterId());
409+
if (vm.getHypervisorType() == HypervisorType.BareMetal) {
410+
DeployDestination dest = new DeployDestination(dc, pod, cluster, host, new HashMap<Volume, StoragePool>());
411+
s_logger.debug("Returning Deployment Destination: " + dest);
412+
return dest;
413+
}
414+
406415
// search for storage under the zone, pod, cluster
407416
// of
408417
// the last host.
@@ -422,8 +431,6 @@ public DeployDestination planDeployment(VirtualMachineProfile vmProfile, Deploym
422431
suitableHosts, suitableVolumeStoragePools, avoids,
423432
getPlannerUsage(planner, vmProfile, plan, avoids), readyAndReusedVolumes);
424433
if (potentialResources != null) {
425-
Pod pod = _podDao.findById(host.getPodId());
426-
Cluster cluster = _clusterDao.findById(host.getClusterId());
427434
Map<Volume, StoragePool> storageVolMap = potentialResources.second();
428435
// remove the reused vol<->pool from
429436
// destination, since we don't have to

0 commit comments

Comments
 (0)