From 1007492961a1751fde31b5a90ba0a6c961e2c696 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Fri, 18 May 2018 08:13:31 -0500 Subject: [PATCH] Raplce UPS action --- EduNetworkBuilder/ActionClass.cs | 2 ++ EduNetworkBuilder/NetworkBuilder.cs | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/EduNetworkBuilder/ActionClass.cs b/EduNetworkBuilder/ActionClass.cs index 9d450be..c6617a4 100644 --- a/EduNetworkBuilder/ActionClass.cs +++ b/EduNetworkBuilder/ActionClass.cs @@ -263,6 +263,7 @@ namespace EduNetworkBuilder case NBAction.replace: break; case NBAction.replaceUPS: + myNet.RegisterUPSAdded(source.hostname); break; case NBAction.poweroff: source.PowerOff = true; @@ -270,6 +271,7 @@ namespace EduNetworkBuilder break; case NBAction.poweron: source.PowerOff = false; + //We might see about exploding the device here. break; } } diff --git a/EduNetworkBuilder/NetworkBuilder.cs b/EduNetworkBuilder/NetworkBuilder.cs index 67dc1c6..959035d 100644 --- a/EduNetworkBuilder/NetworkBuilder.cs +++ b/EduNetworkBuilder/NetworkBuilder.cs @@ -1214,11 +1214,12 @@ namespace EduNetworkBuilder { if (ItemClickedOn == null) return; //Changing a UPS makes sure the power is off when done. - ItemClickedOn.PowerOff = true; + //ItemClickedOn.PowerOff = true; + NB.DoActionPowerOff(ItemClickedOn.GetUniqueIdentifier); //Mark the replace test as "done" - myNetwork.RegisterDeviceReset(ItemClickedOn.hostname); //replacing something powers it off - - myNetwork.RegisterUPSAdded(ItemClickedOn.hostname); //Add the UPS. + //myNetwork.RegisterDeviceReset(ItemClickedOn.hostname); //replacing something powers it off + NB.DoActionReplaceDeviceUPS(ItemClickedOn.GetUniqueIdentifier); + //myNetwork.RegisterUPSAdded(ItemClickedOn.hostname); //Add the UPS. UpdateVisuals(); } }