cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject [3/6] git commit: CS-15080: VMware control network is CloudStack management network, correct the way to send down a correct traffic label to VMware resource
Date Thu, 07 Jun 2012 00:10:16 GMT
CS-15080: VMware control network is CloudStack management network, correct the way to send
down a correct traffic label to VMware resource

Reviewed-by: Anthony


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/8b6936bd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/8b6936bd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/8b6936bd

Branch: refs/heads/master
Commit: 8b6936bde6dc783ad7a31e227fa555e4e2984159
Parents: 874544f
Author: Kelven Yang <kelven@cloud.com>
Authored: Thu May 31 11:32:04 2012 -0700
Committer: Kelven Yang <kelven@cloud.com>
Committed: Wed Jun 6 16:57:27 2012 -0700

----------------------------------------------------------------------
 .../hypervisor/vmware/resource/VmwareResource.java |    1 -
 .../src/com/cloud/network/NetworkManagerImpl.java  |   10 +++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8b6936bd/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index f882046..f4771b8 100755
--- a/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -230,7 +230,6 @@ import com.vmware.vim25.VirtualMachineGuestOsIdentifier;
 import com.vmware.vim25.VirtualMachinePowerState;
 import com.vmware.vim25.VirtualMachineRuntimeInfo;
 import com.vmware.vim25.VirtualSCSISharing;
-import com.xensource.xenapi.VLAN;
 
 public class VmwareResource implements StoragePoolResource, ServerResource, VmwareHostService
{
     private static final Logger s_logger = Logger.getLogger(VmwareResource.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8b6936bd/server/src/com/cloud/network/NetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java
index a4121be..7c11f34 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -6060,12 +6060,16 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService,
Manag
     @Override
     public String getNetworkTag(HypervisorType hType, Network network) {
         // no network tag for control traffic type
-        if (network.getTrafficType() == TrafficType.Control) {
+    	TrafficType effectiveTrafficType = network.getTrafficType();
+    	if(hType == HypervisorType.VMware && effectiveTrafficType == TrafficType.Control)
+    		effectiveTrafficType = TrafficType.Management;
+    	
+        if (effectiveTrafficType == TrafficType.Control) {
             return null;
         }
 
         Long physicalNetworkId = null;
-        if (network.getTrafficType() != TrafficType.Guest) {
+        if (effectiveTrafficType != TrafficType.Guest) {
             physicalNetworkId = getNonGuestNetworkPhysicalNetworkId(network);
         } else {
             NetworkOffering offering = _configMgr.getNetworkOffering(network.getNetworkOfferingId());
@@ -6078,7 +6082,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService,
Manag
             return null;
         }
 
-        return _pNTrafficTypeDao.getNetworkTag(physicalNetworkId, network.getTrafficType(),
hType);
+        return _pNTrafficTypeDao.getNetworkTag(physicalNetworkId, effectiveTrafficType, hType);
     }
 
     protected Long getNonGuestNetworkPhysicalNetworkId(Network network) {


Mime
View raw message