mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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
This commit is contained in:
parent
874544fd64
commit
8b6936bde6
@ -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);
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user