Esempio n. 1
0
def get_fcpresent():
    slot = get_wedge_slot()
    mon_slot = 0
    FC_CARD_BASE = 100

    # FC101 top (101,102)
    # FC201 bottom (201,202)
    if ((slot == 101) or (slot == 102)):
        mon_slot = slot + FC_CARD_BASE

    if ((slot == 201) or (slot == 202)):
        mon_slot = slot - FC_CARD_BASE

    if (mon_slot):
        if is_mon_fc_present() == None:
            status = 'Not Applicable'  # gpio read failed
        elif is_mon_fc_present():
            status = "Present"
        else:
            status = "Removed"
    else:
        status = 'Not Applicable'  # If this was a LC

    result = {
        "Information": {
            "Slotid": slot,
            "Monitored Slotid": mon_slot,
            "Status": status,
            "Description": "Slotid indicates monitored slotid's status"
        },
        "Actions": [],
        "Resources": [],
    }
    return result
Esempio n. 2
0
def get_fcpresent():
    slot = get_wedge_slot()
    mon_slot = 0
    FC_CARD_BASE = 100

    # FC101 top (101,102)
    # FC201 bottom (201,202)
    if ((slot == 101) or (slot == 102)):
        mon_slot = slot + FC_CARD_BASE

    if ((slot == 201) or (slot == 202)):
        mon_slot = slot - FC_CARD_BASE

    if ( mon_slot ):
        if is_mon_fc_present() == None:
            status = 'Not Applicable' # gpio read failed
        elif is_mon_fc_present():
            status = "Present"
        else:
            status = "Removed"
    else:
        status = 'Not Applicable' # If this was a LC

    result = {
                "Information": {
                    "Slotid": slot,
                    "Monitored Slotid": mon_slot,
                    "Status": status,
                    "Description" : "Slotid indicates monitored slotid's status"
                },
                "Actions": [],
                "Resources": [],
             }
    return result;
Esempio n. 3
0
def get_slotid():
    slot = get_wedge_slot()
    return {'slotid': slot}
Esempio n. 4
0
def get_slotid():
    slot = get_wedge_slot()
    return { 'slotid' : slot }
Esempio n. 5
0
def get_slotid():
    slot = get_wedge_slot()
    return {"slotid": slot}