From 136b7b1ab7d66f60be05a2ff95821c71fec3df13 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Thu, 17 May 2018 16:10:20 -0500 Subject: [PATCH] Add NB.DoActions functions for Replace, ReplaceUPS, and PowerOff --- EduNetworkBuilder/NB.cs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/EduNetworkBuilder/NB.cs b/EduNetworkBuilder/NB.cs index 8060fe1..e3523c7 100644 --- a/EduNetworkBuilder/NB.cs +++ b/EduNetworkBuilder/NB.cs @@ -1506,7 +1506,36 @@ namespace EduNetworkBuilder RegisterAction(AC); AC.DoAction(); + } + public static void DoActionReplaceDevice(int HostID) + { + ActionClass AC = new ActionClass(); + AC.Action = NBAction.replace; + AC.SourceID = HostID; + RegisterAction(AC); + + AC.DoAction(); + } + public static void DoActionReplaceDeviceUPS(int HostID) + { + ActionClass AC = new ActionClass(); + AC.Action = NBAction.replaceUPS; + AC.SourceID = HostID; + + RegisterAction(AC); + + AC.DoAction(); + } + public static void DoActionPowerOff(int HostID) + { + ActionClass AC = new ActionClass(); + AC.Action = NBAction.poweroff; + AC.SourceID = HostID; + + RegisterAction(AC); + + AC.DoAction(); } public static void DoActionDeleteComponent(int HostID) {