pyzkiln_core/zcmds/iplinfo.py
def iplinfo(sysparm=None):
    '''
    iplinfo function:
    Take the input and return a dictionary based on the input. The Current
    supported inputs are none or a sysparm to be queried
    '''
    if sysparm is None:
        cmdData = opercmd.execute("DISPLAY IPLINFO").to_dict()
    else:
        cmdData = opercmd.execute(f"DISPLAY IPLINFO,{sysparm}").to_dict()

    if cmdData["rc"] > 0:
        print(f"Data not Retrieved. Return code is: {cmdData['rc']}")
        return cmdData

    cmdresponse = cmdData['stdout_response']
    if "IEE254I" in cmdresponse:
        cmdlist = cmdresponse.split("\n")
        time = date = release = license = used = indata = ondata = ""
        archlvl = mltshr = ieasym = ieasys = iodfcurr = iodforigin = ""
        iplorigin = iplcurr = iplvol = ""
        for line in cmdlist:
            if "SYSTEM IPLED" in line:
                time = line[line.find("AT")+3:line.find("AT")+11]
                date = line[line.find("ON")+3:]

            if "RELEASE" in line:
                release = line[line.find("RELEASE")+8:
                               line.find("LICENSE")-1].strip()
                license = line[line.find("=")+2:]

            if "USED" in line:
                used = line[line.find("USED")+5:line.find("IN")-1].strip()
                indata = line[line.find("IN")+3:line.find("ON")-1].strip()
                ondata = line[line.find("ON")+3:].strip()

            if "ARCHLVL" in line:
                archlvl = line[line.find("ARCHLVL =")+10:
                               line.find("MTL")].strip()
                mltshr = line[line.find("MTLSHARE =")+12:].strip()

            if "IEASYM" in line:
                ieasym = line[line.find("(")+1:line.find(")")-1]

            if "IEASYS" in line:
                ieasys = line[line.find("("):]

            if "IODF" in line:
                iodforigin = line[line.find("ORIGINAL(")+9:line.find(")")-1]
                iodfcurr = line[line.find("CURRENT(")+9:line.find(")",
                                line.find(")")+1)]

            if "IPL DEVICE" in line:
                iplorigin = line[line.find("ORIGINAL(")+10:line.find(")")-1]
                iplcurr = line[line.find("CURRENT(")+9:line.find(")",
                               line.find(")")+1)]
                iplvol = line[line.find("VOLUME(")+8:line.rfind(")")-1]

        return_dictionary = {"IPL Time": time, "IPL Date": date,
                             "Release": release, "License": license,
                             "Member Used": used, "Dataset": indata,
                             "Device": ondata, "Arch Level": archlvl,
                             "MLT Share": mltshr, "IEASYM List": ieasym,
                             "IEASYS List": ieasys,
                             "Original IODF": iodforigin,
                             "Current IODF": iodfcurr,
                             "Original IPL Device": iplorigin,
                             "Current IPL Device": iplcurr,
                             "IPL Volume": iplvol}

    if "IEE255I" in cmdresponse:
        parm = cmdresponse[cmdresponse.find("'")+1:cmdresponse.rfind("'")]
        state = cmdresponse[cmdresponse.rfind(":")+1:].strip()
        return_dictionary = {"Parameter": parm, "State": state}

    return return_dictionary

    iplinfo function:
    Take the input and return a dictionary based on the input. The Current
    supported inputs are none or a sysparm to be queried
    
iplinfo function:
Take the input and return a dictionary based on the input. The Current
supported inputs are none or a sysparm to be queried
iplinfo function : Take the input and return a dictionary based on the input . The Current supported inputs are none or a sysparm to be queried
def iplinfo(sysparm=None):
    if sysparm is None:
        cmdData = opercmd.execute("DISPLAY IPLINFO").to_dict()
    else:
        cmdData = opercmd.execute(f"DISPLAY IPLINFO,{sysparm}").to_dict()
    if cmdData["rc"] > 0:
        print(f"Data not Retrieved. Return code is: {cmdData['rc']}")
        return cmdData
    cmdresponse = cmdData['stdout_response']
    if "IEE254I" in cmdresponse:
        cmdlist = cmdresponse.split("\n")
        time = date = release = license = used = indata = ondata = ""
        archlvl = mltshr = ieasym = ieasys = iodfcurr = iodforigin = ""
        iplorigin = iplcurr = iplvol = ""
        for line in cmdlist:
            if "SYSTEM IPLED" in line:
                time = line[line.find("AT")+3:line.find("AT")+11]
                date = line[line.find("ON")+3:]
            if "RELEASE" in line:
                release = line[line.find("RELEASE")+8:
                               line.find("LICENSE")-1].strip()
                license = line[line.find("=")+2:]
            if "USED" in line:
                used = line[line.find("USED")+5:line.find("IN")-1].strip()
                indata = line[line.find("IN")+3:line.find("ON")-1].strip()
                ondata = line[line.find("ON")+3:].strip()
            if "ARCHLVL" in line:
                archlvl = line[line.find("ARCHLVL =")+10:
                               line.find("MTL")].strip()
                mltshr = line[line.find("MTLSHARE =")+12:].strip()
            if "IEASYM" in line:
                ieasym = line[line.find("(")+1:line.find(")")-1]
            if "IEASYS" in line:
                ieasys = line[line.find("("):]
            if "IODF" in line:
                iodforigin = line[line.find("ORIGINAL(")+9:line.find(")")-1]
                iodfcurr = line[line.find("CURRENT(")+9:line.find(")",
                                line.find(")")+1)]
            if "IPL DEVICE" in line:
                iplorigin = line[line.find("ORIGINAL(")+10:line.find(")")-1]
                iplcurr = line[line.find("CURRENT(")+9:line.find(")",
                               line.find(")")+1)]
                iplvol = line[line.find("VOLUME(")+8:line.rfind(")")-1]
        return_dictionary = {"IPL Time": time, "IPL Date": date,
                             "Release": release, "License": license,
                             "Member Used": used, "Dataset": indata,
                             "Device": ondata, "Arch Level": archlvl,
                             "MLT Share": mltshr, "IEASYM List": ieasym,
                             "IEASYS List": ieasys,
                             "Original IODF": iodforigin,
                             "Current IODF": iodfcurr,
                             "Original IPL Device": iplorigin,
                             "Current IPL Device": iplcurr,
                             "IPL Volume": iplvol}
    if "IEE255I" in cmdresponse:
        parm = cmdresponse[cmdresponse.find("'")+1:cmdresponse.rfind("'")]
        state = cmdresponse[cmdresponse.rfind(":")+1:].strip()
        return_dictionary = {"Parameter": parm, "State": state}
    return return_dictionary
def iplinfo ( sysparm = None ) : if sysparm is None : cmdData = opercmd . execute ( "DISPLAY IPLINFO" ) . to_dict ( ) else : cmdData = opercmd . execute ( f"DISPLAY IPLINFO,{sysparm}" ) . to_dict ( ) if cmdData [ "rc" ] > 0 : print ( f"Data not Retrieved. Return code is: {cmdData['rc']}" ) return cmdData cmdresponse = cmdData [ 'stdout_response' ] if "IEE254I" in cmdresponse : cmdlist = cmdresponse . split ( "\n" ) time = date = release = license = used = indata = ondata = "" archlvl = mltshr = ieasym = ieasys = iodfcurr = iodforigin = "" iplorigin = iplcurr = iplvol = "" for line in cmdlist : if "SYSTEM IPLED" in line : time = line [ line . find ( "AT" ) + 3 : line . find ( "AT" ) + 11 ] date = line [ line . find ( "ON" ) + 3 : ] if "RELEASE" in line : release = line [ line . find ( "RELEASE" ) + 8 : line . find ( "LICENSE" ) - 1 ] . strip ( ) license = line [ line . find ( "=" ) + 2 : ] if "USED" in line : used = line [ line . find ( "USED" ) + 5 : line . find ( "IN" ) - 1 ] . strip ( ) indata = line [ line . find ( "IN" ) + 3 : line . find ( "ON" ) - 1 ] . strip ( ) ondata = line [ line . find ( "ON" ) + 3 : ] . strip ( ) if "ARCHLVL" in line : archlvl = line [ line . find ( "ARCHLVL =" ) + 10 : line . find ( "MTL" ) ] . strip ( ) mltshr = line [ line . find ( "MTLSHARE =" ) + 12 : ] . strip ( ) if "IEASYM" in line : ieasym = line [ line . find ( "(" ) + 1 : line . find ( ")" ) - 1 ] if "IEASYS" in line : ieasys = line [ line . find ( "(" ) : ] if "IODF" in line : iodforigin = line [ line . find ( "ORIGINAL(" ) + 9 : line . find ( ")" ) - 1 ] iodfcurr = line [ line . find ( "CURRENT(" ) + 9 : line . find ( ")" , line . find ( ")" ) + 1 ) ] if "IPL DEVICE" in line : iplorigin = line [ line . find ( "ORIGINAL(" ) + 10 : line . find ( ")" ) - 1 ] iplcurr = line [ line . find ( "CURRENT(" ) + 9 : line . find ( ")" , line . find ( ")" ) + 1 ) ] iplvol = line [ line . find ( "VOLUME(" ) + 8 : line . rfind ( ")" ) - 1 ] return_dictionary = { "IPL Time" : time , "IPL Date" : date , "Release" : release , "License" : license , "Member Used" : used , "Dataset" : indata , "Device" : ondata , "Arch Level" : archlvl , "MLT Share" : mltshr , "IEASYM List" : ieasym , "IEASYS List" : ieasys , "Original IODF" : iodforigin , "Current IODF" : iodfcurr , "Original IPL Device" : iplorigin , "Current IPL Device" : iplcurr , "IPL Volume" : iplvol } if "IEE255I" in cmdresponse : parm = cmdresponse [ cmdresponse . find ( "'" ) + 1 : cmdresponse . rfind ( "'" ) ] state = cmdresponse [ cmdresponse . rfind ( ":" ) + 1 : ] . strip ( ) return_dictionary = { "Parameter" : parm , "State" : state } return return_dictionary
iplinfo function:
Take the input and return a dictionary based on the input.
iplinfo function : Take the input and return a dictionary based on the input .
'''
    iplinfo function:
    Take the input and return a dictionary based on the input. The Current
    supported inputs are none or a sysparm to be queried
    '''
sysparm