bug CS-14218: Fixed nic hot plug failure when untagged network is created on tagged vlan

status CS-14218: resolved fixed
reviewed-by: Abhi
This commit is contained in:
Kishan Kavala 2012-09-18 14:21:30 +05:30
parent 27cb53537f
commit 5258f37b93
1 changed files with 5 additions and 5 deletions

View File

@ -1172,12 +1172,12 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
if (nic.getBrName().equalsIgnoreCase(_linkLocalBridgeName)) {
vlanAllocatedToVM.put("LinkLocal", nicPos);
} else {
String vlanId = getVlanIdFromBridge(nic.getBrName());
if (vlanId != null) {
vlanAllocatedToVM.put(vlanId, nicPos);
if (nic.getBrName().equalsIgnoreCase(_publicBridgeName) || nic.getBrName().equalsIgnoreCase(_privBridgeName) || nic.getBrName().equalsIgnoreCase(_guestBridgeName)) {
vlanAllocatedToVM.put(Vlan.UNTAGGED, nicPos);
} else {
vlanAllocatedToVM.put(Vlan.UNTAGGED, nicPos);
}
String vlanId = getVlanIdFromBridge(nic.getBrName());
vlanAllocatedToVM.put(vlanId, nicPos);
}
}
nicPos++;
}