bug 6110: return precise message if VLAN is already created on another device. public and direct should use different VLAN.

This commit is contained in:
anthony 2010-09-09 13:39:42 -07:00
parent 599f05d0da
commit bcaaef5f60
1 changed files with 8 additions and 3 deletions

View File

@ -3690,9 +3690,14 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
if (vlanNetworkr.PIFs != null) {
for (PIF pif : vlanNetworkr.PIFs) {
PIF.Record pifr = pif.getRecord(conn);
if (pifr.device.equals(nPifr.device) && pifr.host.equals(nPifr.host)) {
pif.plug(conn);
return vlanNetwork;
if(pifr.host.equals(nPifr.host)) {
if (pifr.device.equals(nPifr.device) ) {
pif.plug(conn);
return vlanNetwork;
} else {
throw new CloudRuntimeException("Creating VLAN " + tag + " on " + nPifr.device + " failed due to this VLAN is already created on " + pifr.device);
}
}
}
}