CLOUDSTACK-6278 Baremetal Advanced Networking support
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bc2ec23d Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bc2ec23d Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bc2ec23d Branch: refs/heads/master Commit: bc2ec23d09e28b30a9cc3cb4a7d6f52c8e718fcf Parents: 8b89494 Author: Frank Zhang <[email protected]> Authored: Wed Sep 17 13:01:22 2014 -0700 Committer: Frank Zhang <[email protected]> Committed: Thu Sep 18 16:54:37 2014 -0700 ---------------------------------------------------------------------- .../com/cloud/deploy/DeploymentPlanningManagerImpl.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bc2ec23d/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java index 9eaef1e..146352e 100755 --- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java +++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java @@ -403,6 +403,15 @@ StateListener<State, VirtualMachine.Event, VirtualMachine> { s_logger.debug("The last host of this VM is UP and has enough capacity"); s_logger.debug("Now checking for suitable pools under zone: " + host.getDataCenterId() + ", pod: " + host.getPodId() + ", cluster: " + host.getClusterId()); + + Pod pod = _podDao.findById(host.getPodId()); + Cluster cluster = _clusterDao.findById(host.getClusterId()); + if (vm.getHypervisorType() == HypervisorType.BareMetal) { + DeployDestination dest = new DeployDestination(dc, pod, cluster, host, new HashMap<Volume, StoragePool>()); + s_logger.debug("Returning Deployment Destination: " + dest); + return dest; + } + // search for storage under the zone, pod, cluster // of // the last host. @@ -422,8 +431,6 @@ StateListener<State, VirtualMachine.Event, VirtualMachine> { suitableHosts, suitableVolumeStoragePools, avoids, getPlannerUsage(planner, vmProfile, plan, avoids), readyAndReusedVolumes); if (potentialResources != null) { - Pod pod = _podDao.findById(host.getPodId()); - Cluster cluster = _clusterDao.findById(host.getClusterId()); Map<Volume, StoragePool> storageVolMap = potentialResources.second(); // remove the reused vol<->pool from // destination, since we don't have to
