def Trigger(tc): if len(tc.Nodes) > 0 : n = tc.Nodes[0] for i in range(0, len(tc.venice_ips)): common.PrepareDhcpConfig(tc.venice_ips[i]) common.SetupRemoteDhcp(n) common.ResetNMDState(n) common.RebootHost(n) common.SetNaplesModeOOB_Dynamic(n) time.sleep(10) api.Logger.info("NAPLES STATUS before reboot") tc.naples_status_before.append(common.PenctlGetTransitionPhaseStatus(n)) api.Logger.info("Controller IPs before reboot") tc.controller_ip_penctl_before.append(common.PenctlGetControllersStatus(n)[0]) common.RebootHost(n) api.Logger.info("NAPLES STATUS after reboot check every 5 seconds for 1 minute.") for j in range(0, 12): tc.naples_status_after.append(common.PenctlGetTransitionPhaseStatus(n)) tc.controller_ip_penctl_after.append(common.PenctlGetControllersStatus(n)[0]) time.sleep(5) return api.types.status.SUCCESS
def Trigger(tc): if len(tc.Nodes) > 0: n = tc.Nodes[0] for i in range(0, len(tc.venice_ips)): common.ResetNMDState(n) common.RebootHost(n) common.PrepareDhcpConfig(tc.venice_ips[i]) common.SetupRemoteDhcp(n) time.sleep(10) common.SetNaplesModeInband_Dynamic(n) tc.naples_status_before.append(common.PenctlGetTransitionPhaseStatus(n)) tc.controller_ip_penctl_before.append(common.PenctlGetControllersStatus(n)[0]) common.StopRemoteDhcp(n) common.RebootHost(n) tc.naples_status_after.append(common.PenctlGetTransitionPhaseStatus(n)) tc.controller_ip_penctl_after.append(common.PenctlGetControllersStatus(n)[0]) return api.types.status.SUCCESS
def Trigger(tc): for n in tc.Nodes: common.PrepareDhcpConfigNoControllers() common.SetupRemoteDhcp(n) time.sleep(10) common.SetNaplesModeOOB_Dynamic(n) tc.naples_status_after.append(common.PenctlGetTransitionPhaseStatus(n)) tc.controller_ip_penctl_after.append( common.PenctlGetControllersStatus(n)) return api.types.status.SUCCESS
def Trigger(tc): for n in tc.Nodes: common.ResetNMDState(n) common.RebootHost(n) common.PrepareDhcpConfig(tc.venice_ips[0]) common.SetupRemoteDhcp(n) time.sleep(10) common.SetNaplesModeOOB_Dynamic(n) tc.naples_status_before.append(common.PenctlGetTransitionPhaseStatus(n)) tc.controller_ip_penctl_before.append(common.PenctlGetControllersStatus(n)) common.PrepareDhcpConfig(tc.venice_ips[1]) common.SetupRemoteDhcp(n) common.RebootHost(n) tc.naples_status_after.append(common.PenctlGetTransitionPhaseStatus(n)) tc.controller_ip_penctl_after.append(common.PenctlGetControllersStatus(n)) return api.types.status.SUCCESS
def Trigger(tc): for n in tc.Nodes: common.SetNaplesModeOOB_Dynamic(n) for i in range(0, len(tc.venice_ips)): common.PrepareDhcpConfig(tc.venice_ips[i]) common.SetupRemoteDhcp(n) api.Logger.info("Waiting for lease renewal duration.") time.sleep(45) tc.controller_ip_penctl.append( common.PenctlGetControllersStatus(n)[0]) return api.types.status.SUCCESS
def Trigger(tc): if len(tc.Nodes) > 0 : n = tc.Nodes[0] common.SetNaplesModeInband_Dynamic(n) api.Logger.info("NAPLES STATUS before reboot") tc.naples_status_before.append(common.PenctlGetTransitionPhaseStatus(n)) api.Logger.info("Controller IPs before reboot") tc.controller_ip_penctl_before.append(common.PenctlGetControllersStatus(n)[0]) api.Logger.info("NAPLES STATUS after reboot check every 5 seconds for 1 minute.") for j in range(0, 5): tc.naples_status_after.append(common.PenctlGetTransitionPhaseStatus(n)) tc.controller_ip_penctl_after.append(common.PenctlGetControllersStatus(n)[0]) time.sleep(5) api.Logger.info("Going for Reboot.") common.RebootHost(n) tc.after_reboot_status = common.PenctlGetTransitionPhaseStatus(n) return api.types.status.SUCCESS
def Trigger(tc): for n in tc.Nodes: for i in range(0, len(tc.venice_ips)): common.PrepareDhcpConfig(tc.venice_ips[i]) common.SetupRemoteDhcp(n) common.SetNaplesModeOOB_Dynamic(n) api.Logger.info( "DHCP Server updated. Waiting 5 seconds for DHCP handshake between Naples and DHCP Server." ) time.sleep(5) tc.controller_ip_penctl.append( common.PenctlGetControllersStatus(n)[0]) return api.types.status.SUCCESS
def Trigger(tc): if len(tc.Nodes) > 0: n = tc.Nodes[0] common.PrepareDhcpConfig(tc.venice_ips[0]) common.SetupRemoteDhcp(n) common.SetNaplesModeInband_Dynamic(n) api.Logger.info( "DHCP Server updated. Waiting 5 seconds for DHCP handshake between Naples and DHCP Server." ) time.sleep(5) common.PrepareDhcpConfig(tc.venice_ips[1]) common.SetupRemoteDhcp(n) common.RebootHost(n) tc.controller_ip_penctl.append(common.PenctlGetControllersStatus(n)[0]) return api.types.status.SUCCESS