From 5b3be85e99ef1ffa7bfb9ba70719f75d8ef25458 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Wed, 14 Feb 2018 12:29:54 +0000 Subject: [PATCH] Add test for device blows up with power. Still needs lots of pieces before it is done. --- EduNetworkBuilder/NB.cs | 2 +- EduNetworkBuilder/Network.cs | 12 ++++++++++++ EduNetworkBuilder/NetworkBuilder.cs | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/EduNetworkBuilder/NB.cs b/EduNetworkBuilder/NB.cs index ef15c19..b899817 100644 --- a/EduNetworkBuilder/NB.cs +++ b/EduNetworkBuilder/NB.cs @@ -48,7 +48,7 @@ namespace EduNetworkBuilder DHCPServerEnabled, SuccessfullyTraceroutes, LockAll, LockIP, LockRoute, LockNic, LockDHCP, LockGateway, LockVLANsOnHost, LockNicVLAN, LockInterfaceVLAN, LockVLANNames, - DeviceIsFrozen, + DeviceIsFrozen, DeviceBlowsUpWithPower, DeviceNeedsUPS, } public enum ContextTest { ping, arp, traceroute } public enum NetTestVerbosity { none, basic, hints, full } diff --git a/EduNetworkBuilder/Network.cs b/EduNetworkBuilder/Network.cs index 786911b..bde929d 100644 --- a/EduNetworkBuilder/Network.cs +++ b/EduNetworkBuilder/Network.cs @@ -1700,6 +1700,18 @@ namespace EduNetworkBuilder } } + + public void RegisterDeviceReplaced(string source) + { + foreach (NetTest one in NetTests) + { + if (one.sHost == source && one.TheTest == NetTestType.DeviceBlowsUpWithPower) + { + one.SetDone(); + } + } + } + /**************************************** * Do On All Devices * **************************************/ diff --git a/EduNetworkBuilder/NetworkBuilder.cs b/EduNetworkBuilder/NetworkBuilder.cs index 743cb71..f674d07 100644 --- a/EduNetworkBuilder/NetworkBuilder.cs +++ b/EduNetworkBuilder/NetworkBuilder.cs @@ -962,6 +962,7 @@ namespace EduNetworkBuilder { if (ItemClickedOn == null) return; ItemClickedOn.ClearIPs(); //reset the device + ItemClickedOn.IsBurned = false; //If it had been burned before, it is no longer burned //Mark the replace test as "done" //myNetwork.RegisterDeviceReplaced(ItemClickedOn.hostname); UpdateVisuals();