Beispiel #1
0
def Setup(tc):
    tc.RF = None
    naples_nodes = api.GetNaplesNodes()
    if len(naples_nodes) == 0:
        api.Logger.error("No naples node found, exiting...")
        return api.types.status.ERROR
    tc.test_node = naples_nodes[0]
    tc.node_name = tc.test_node.Name()

    cimc_info = tc.test_node.GetCimcInfo()
    if not cimc_info:
        api.Logger.error("CimcInfo is None, exiting")
        return api.types.status.ERROR
    vlan_base = api.Testbed_GetVlanBase()
    if not vlan_base:
        api.Logger.error("Base vlan not specified for the testbed")
        return api.types.status.ERROR
    vlan_count = api.Testbed_GetVlanCount()
    if vlan_count == 1:
        api.Logger.error("Native vlan cannot be used for this test")
        return api.types.status.ERROR
    tc.vlan = vlan_base + 1

    try:
        check_set_ncsi(cimc_info)
        tc.RF = get_redfish_obj(cimc_info, mode="ncsi")
    except:
        api.Logger.error(traceback.format_exc())
        return api.types.status.ERROR

    return api.types.status.SUCCESS
Beispiel #2
0
def Trigger(tc):
    try:
        # Create a Redfish client object
        tc.RF = get_redfish_obj(tc.cimc_info)
        tc.setting_details = get_nw_device_functions_settings_info(tc.RF)
    except:
        api.Logger.error(traceback.format_exc())
        return api.types.status.ERROR
    return api.types.status.SUCCESS
Beispiel #3
0
def Trigger(tc):
    try:
        # Create a Redfish client object
        tc.RF = get_redfish_obj(tc.cimc_info)
        tc.bootoptions_info = get_bootoptions_info(tc.RF)
    except:
        api.Logger.error(traceback.format_exc())
        return api.types.status.ERROR
    return api.types.status.SUCCESS
Beispiel #4
0
def Trigger(tc):
    try:
        # Create a Redfish client object
        tc.RF = get_redfish_obj(tc.cimc_info)
        tc.ethernet_interfaces_details = get_ethernet_interfaces_info(tc.RF)
    except:
        api.Logger.error(traceback.format_exc())
        return api.types.status.ERROR
    return api.types.status.SUCCESS
Beispiel #5
0
def Setup(tc):
    naples_nodes = api.GetNaplesNodes()
    if len(naples_nodes) == 0:
        api.Logger.error("No naples node found")
        return api.types.status.ERROR
    tc.test_node = naples_nodes[0]
    tc.node_name = tc.test_node.Name()

    cimc_info = tc.test_node.GetCimcInfo()
    if not cimc_info:
        api.Logger.error("CimcInfo is None, exiting")
        return api.types.status.ERROR

    tc.idrac_ip = cimc_info.GetIp()
    tc.idrac_ncsi_ip = cimc_info.GetNcsiIp()
    tc.cimc_info = cimc_info
    try:
        # Create a Redfish client object
        tc.RF = get_redfish_obj(tc.cimc_info)
    except:
        api.Logger.error(traceback.format_exc())
        return api.types.status.ERROR
    return api.types.status.SUCCESS
Beispiel #6
0
def Trigger(tc):
    max_pings = int(getattr(tc.args, "max_pings", 60))
    try:
        for _iter in range(tc.iterators.count):
            api.Logger.info("Iteration %d" % _iter)
            RF = get_redfish_obj(tc.cimc_info, mode="ncsi")
            ret = switch_ncsi_ports(RF)
            if ret == api.types.status.SUCCESS:
                time.sleep(10)
                ret = ping(tc.ilo_ncsi_ip, max_pings)
                if ret != api.types.status.SUCCESS:
                    api.Logger.error(
                        "Unable to ping ILO after NCSI channel switch")
                    return api.types.status.FAILURE
            else:
                api.Logger.error("Config failed for NCSI channel switch")
                return api.types.status.ERROR
            api.Logger.info("NCSI channel switch successful")
    except:
        api.Logger.error(traceback.format_exc())
        return api.types.status.FAILURE

    return api.types.status.SUCCESS
Beispiel #7
0
def Trigger(tc):
    try:
        # Get firmware version using penctl
        req1 = api.Trigger_CreateExecuteCommandsRequest()

        # Get VPD information
        req2 = api.Trigger_CreateExecuteCommandsRequest()

        for n in tc.naples_nodes:
            common.AddPenctlCommand(req1, n.Name(), "show firmware-version")

            api.Trigger_AddHostCommand(req2, n.Name(), "lspci -d 1dd8: -vv")

        tc.resp1 = api.Trigger(req1)

        tc.resp2 = api.Trigger(req2)

        # Create a Redfish client object
        tc.RF = get_redfish_obj(tc.cimc_info)
        tc.setting_details = get_nw_device_functions_settings_info(tc.RF)
    except:
        api.Logger.error(traceback.format_exc())
        return api.types.status.ERROR
    return api.types.status.SUCCESS