示例#1
0
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.SetNaplesModeInband_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")
            tc.naples_status_after.append(common.PenctlGetTransitionPhaseStatus(n))
            api.Logger.info("Controller IPs after reboot")
            tc.controller_ip_penctl_after.append(common.PenctlGetControllersStatus(n)[0])

    return api.types.status.SUCCESS
示例#2
0
def Trigger(tc):
    if len(tc.Nodes) > 0:
        n = tc.Nodes[0]
        common.PrepareDhcpConfig("10.20.30.40")
        common.SetupRemoteDhcp(n)
        common.SetNaplesModeInband_Dynamic(n)

    return api.types.status.SUCCESS
示例#3
0
def Trigger(tc):
    if len(tc.Nodes) > 0:
        n = tc.Nodes[0]

        for i in range(0, 10):
            common.SetNaplesModeInband_Dynamic(n)

    return api.types.status.SUCCESS
示例#4
0
def Trigger(tc):
    if len(tc.Nodes) > 0:
        n = tc.Nodes[0]
        common.SetNaplesModeInband_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
示例#5
0
def Trigger(tc):
    if len(tc.Nodes) > 0:
        n = tc.Nodes[0]
        common.PrepareDhcpConfigNoControllers()
        common.SetupRemoteDhcp(n)
        time.sleep(10)
        common.SetNaplesModeInband_Dynamic(n)
        tc.naples_status_after.append(common.PenctlGetTransitionPhaseStatus(n))
        tc.controller_ip_penctl_after.append(
            common.PenctlGetControllersStatus(n))

    return api.types.status.SUCCESS
示例#6
0
def Trigger(tc):
    if len(tc.Nodes) > 0:
        n = tc.Nodes[0]

        for i in range(0, 3):
            common.SetNaplesModeOOB_Static(n, "1.1.1.1", "2.2.2.2/24")
            common.SetNaplesModeOOB_Dynamic(n)
            common.SetNaplesModeInband_Static(n, "1.1.1.1", "2.2.2.2/24")
            common.SetNaplesModeHost(n)
            common.SetNaplesModeInband_Dynamic(n)

    return api.types.status.SUCCESS
示例#7
0
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
示例#8
0
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
示例#9
0
def Trigger(tc):
    if len(tc.Nodes) > 0:
        n = tc.Nodes[0]
        common.ResetNMDState(n)
        common.RebootHost(n)
        common.PrepareDhcpConfig(tc.venice_ips[0])
        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))
        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