Exemplo n.º 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.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
Exemplo n.º 2
0
def Trigger(tc):
    for n in tc.Nodes:
        common.PrepareDhcpConfig("10.20.30.40")
        common.SetupRemoteDhcp(n)
        common.SetNaplesModeOOB_Dynamic(n)

    return api.types.status.SUCCESS
Exemplo n.º 3
0
def Trigger(tc):
    if len(tc.Nodes) > 0:
        n = tc.Nodes[0]
        common.SetupRemoteDhcp(n)
        common.SetNaplesModeInband_Static(n, "1.1.1.1,1.1.1.2", "1.1.1.3/24")

    return api.types.status.SUCCESS
Exemplo n.º 4
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
Exemplo n.º 5
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
Exemplo n.º 6
0
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)
            time.sleep(5)
            common.SetNaplesModeOOB_Dynamic(n)
            time.sleep(5)
            tc.controller_ip_agent.append(common.AgentGetControllers(n)[0])

    return api.types.status.SUCCESS
Exemplo n.º 7
0
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
Exemplo n.º 8
0
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
Exemplo n.º 9
0
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
Exemplo n.º 10
0
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
Exemplo n.º 11
0
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
Exemplo n.º 12
0
def Trigger(tc):
    for n in tc.Nodes:
        common.SetupRemoteDhcp(n)
        common.SetNaplesModeOOB_Static(n, "6.6.6.4,6.6.6.5.", "6.6.6.6/24")

    return api.types.status.SUCCESS