cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From frankzh...@apache.org
Subject [2/2] git commit: updated refs/heads/master to 7a555b3
Date Wed, 10 Sep 2014 21:39:38 GMT
    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/e06fa18e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e06fa18e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e06fa18e

Branch: refs/heads/master
Commit: e06fa18ed2ee2ee6a417e089cf5ac6bde11d0079
Parents: 90287cc
Author: Frank Zhang <frank.zhang@citrix.com>
Authored: Wed Sep 10 13:58:43 2014 -0700
Committer: Frank Zhang <frank.zhang@citrix.com>
Committed: Wed Sep 10 14:43:41 2014 -0700

----------------------------------------------------------------------
 .../cloud/baremetal/networkservice/BaremetalPxeElement.java | 9 ++++++++-
 .../network/router/VirtualNetworkApplianceManagerImpl.java  | 4 ++++
 2 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e06fa18e/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java
b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java
index 9b835bf..5d20d31 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java
@@ -21,7 +21,6 @@ package com.cloud.baremetal.networkservice;
 import com.cloud.baremetal.database.BaremetalPxeVO;
 import com.cloud.baremetal.manager.BaremetalVlanManager;
 import com.cloud.dc.DataCenter;
-import com.cloud.dc.DataCenterVO;
 import com.cloud.dc.Pod;
 import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.deploy.DeployDestination;
@@ -140,9 +139,11 @@ public class BaremetalPxeElement extends AdapterBase implements NetworkElement
{
             }
         }
 
+        /*
         if (dest.getDataCenter().getNetworkType() == DataCenter.NetworkType.Advanced){
             prepareVlan(network, dest);
         }
+        */
 
         return true;
     }
@@ -154,10 +155,16 @@ public class BaremetalPxeElement extends AdapterBase implements NetworkElement
{
     @Override
     public boolean release(Network network, NicProfile nic, VirtualMachineProfile vm, ReservationContext
context) throws ConcurrentOperationException,
         ResourceUnavailableException {
+        if (vm.getType() != Type.User || vm.getHypervisorType() != HypervisorType.BareMetal)
{
+            return false;
+        }
+
+        /*
         DataCenterVO dc = zoneDao.findById(vm.getVirtualMachine().getDataCenterId());
         if (dc.getNetworkType() == DataCenter.NetworkType.Advanced) {
             releaseVlan(network, vm);
         }
+        */
         return true;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e06fa18e/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
index 7b8f7fa..0248412 100755
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -1761,6 +1761,7 @@ VirtualMachineGuru, Listener, Configurable, StateListener<State,
VirtualMachine.
                     templateName = RouterTemplateLxc.valueIn(dest.getDataCenter().getId());
                     break;
                 case BareMetal:
+                    /*
                     String peerHvType = _configDao.getValue(Config.BaremetalPeerHypervisorType.key());
                     if (peerHvType == null) {
                         throw new CloudRuntimeException(String.format("To use baremetal in
advanced networking, you must set %s to type of hypervisor(e.g XenServer)" +
@@ -1777,6 +1778,9 @@ VirtualMachineGuru, Listener, Configurable, StateListener<State,
VirtualMachine.
                     } else {
                         throw new CloudRuntimeException(String.format("Baremetal only supports
peer hypervisor(XenServer/KVM/VMWare) right now, you specified %s", peerHvType));
                     }
+                    */
+                    hType = HypervisorType.VMware;
+                    templateName = RouterTemplateVmware.valueIn(dest.getDataCenter().getId());
                     break;
                 default:
                     break;


Mime
View raw message