We can state that a network card (switch port) has a problem. We cannot do anything about it yet.

This commit is contained in:
Tim Young 2018-03-24 08:29:09 -05:00
parent ade6ed04ce
commit 762ff62a32
4 changed files with 27 additions and 6 deletions

View File

@ -49,7 +49,7 @@ namespace EduNetworkBuilder
DHCPServerEnabled, SuccessfullyTraceroutes, DHCPServerEnabled, SuccessfullyTraceroutes,
LockAll, LockIP, LockRoute, LockNic, LockDHCP, LockGateway, LockLocation, LockAll, LockIP, LockRoute, LockNic, LockDHCP, LockGateway, LockLocation,
LockVLANsOnHost, LockNicVLAN, LockInterfaceVLAN, LockVLANNames, LockVLANsOnHost, LockNicVLAN, LockInterfaceVLAN, LockVLANNames,
DeviceIsFrozen, DeviceBlowsUpWithPower, DeviceNeedsUPS, DeviceIsFrozen, DeviceBlowsUpWithPower, DeviceNeedsUPS, DeviceNICSprays,
} }
public enum AnimationName { Spark1, Fire1, Smoke1, Explo1, Lightning1 } public enum AnimationName { Spark1, Fire1, Smoke1, Explo1, Lightning1 }
public enum ContextTest { ping, arp, traceroute } public enum ContextTest { ping, arp, traceroute }

View File

@ -222,6 +222,9 @@ namespace EduNetworkBuilder
case NetTestType.NeedsForbiddenVLAN: case NetTestType.NeedsForbiddenVLAN:
toreturn = NB.Translate("NT_TstDiscriptNeedsForbiddenVLAN"); toreturn = NB.Translate("NT_TstDiscriptNeedsForbiddenVLAN");
break; break;
case NetTestType.DeviceNICSprays:
toreturn = NB.Translate("NT_TstDeviceNICSprays") + ":";
break;
case NetTestType.ReadContextHelp: case NetTestType.ReadContextHelp:
toreturn = NB.Translate("_ReadContext"); toreturn = NB.Translate("_ReadContext");
break; break;
@ -321,6 +324,9 @@ namespace EduNetworkBuilder
case NetTestType.ReadContextHelp: case NetTestType.ReadContextHelp:
toreturn = NB.Translate("_ReadContext"); toreturn = NB.Translate("_ReadContext");
break; break;
case NetTestType.DeviceNICSprays:
toreturn = NB.Translate("NT_TstDeviceNICSprays") + ":";
break;
} }
break; break;
case NetTestVerbosity.none: case NetTestVerbosity.none:
@ -370,6 +376,8 @@ namespace EduNetworkBuilder
public bool ColorItemsIfNeeded(bool ChangeColor) public bool ColorItemsIfNeeded(bool ChangeColor)
{ {
bool WasDone = TaskWasDone; bool WasDone = TaskWasDone;
if (TheTest == NetTestType.DeviceNICSprays)
ChangeColor = false; //we do not show this
if(!TestComplete()) if(!TestComplete())
{ {
if(TheTest == NetTestType.ReadContextHelp && ChangeColor) if(TheTest == NetTestType.ReadContextHelp && ChangeColor)

View File

@ -253,12 +253,13 @@ namespace EduNetworkBuilder
{ {
//return all the dhcp ranges //return all the dhcp ranges
sItem = theNet.GetDeviceFromName(ToEdit.sHost); sItem = theNet.GetDeviceFromName(ToEdit.sHost);
foreach (NB_IPAddress ip in sItem.ListRoutes()) if(sItem != null)
{ foreach (NB_IPAddress ip in sItem.ListRoutes())
cbDest.Items.Add(ip.GetIPString); {
} cbDest.Items.Add(ip.GetIPString);
}
} }
else if (ToEdit.TheTest == NetTestType.LockNic) else if (ToEdit.TheTest == NetTestType.LockNic || ToEdit.TheTest == NetTestType.DeviceNICSprays)
{ {
//return all the dhcp ranges //return all the dhcp ranges
sItem = theNet.GetDeviceFromName(ToEdit.sHost); sItem = theNet.GetDeviceFromName(ToEdit.sHost);
@ -420,6 +421,14 @@ namespace EduNetworkBuilder
{ {
return true; return true;
} }
else if (ntt == NetTestType.DeviceNICSprays)
{
NetworkDevice tstDevice = theNet.GetDeviceFromName(cbSource.SelectedItem.ToString());
if (tstDevice == null) return false;
NetworkCard tstNIC = tstDevice.NicFromName(cbDest.Text);
if (tstNIC == null) return false;
return true;
}
else if (ntt == NetTestType.NeedsUntaggedVLAN || ntt == NetTestType.NeedsTaggedVLAN || else if (ntt == NetTestType.NeedsUntaggedVLAN || ntt == NetTestType.NeedsTaggedVLAN ||
ntt == NetTestType.NeedsForbiddenVLAN) ntt == NetTestType.NeedsForbiddenVLAN)
{ {

View File

@ -2113,4 +2113,8 @@
<value>Office Bldg Wireless</value> <value>Office Bldg Wireless</value>
<comment>NB_OfficeBldgWireless</comment> <comment>NB_OfficeBldgWireless</comment>
</data> </data>
<data name="NT_TstDeviceNICSprays" xml:space="preserve">
<value>Network Card sprays net when used</value>
<comment>NT_TstDeviceNICSprays = Network Card sprays net when used</comment>
</data>
</root> </root>