Integrations/Panorama/Panorama.py
def panorama_content_update_install_status_command():
    """
    Check jobID of content update install status
    """
    if DEVICE_GROUP:
        raise Exception('Content download status is only supported on Firewall (not Panorama).')
    target = str(demisto.args()['target']) if 'target' in demisto.args() else None
    job_id = demisto.args()['job_id']
    result = panorama_content_update_install_status(target, job_id)

    content_install_status = {
        'JobID': result['response']['result']['job']['id']
    }
    if result['response']['result']['job']['status'] == 'FIN':
        if result['response']['result']['job']['result'] == 'OK':
            content_install_status['Status'] = 'Completed'
        else:
            # result['response']['job']['result'] == 'FAIL'
            content_install_status['Status'] = 'Failed'
        content_install_status['Details'] = result['response']['result']['job']

    if result['response']['result']['job']['status'] == 'PEND':
        content_install_status['Status'] = 'Pending'

    entry_context = {"Panorama.Content.Install(val.JobID == obj.JobID)": content_install_status}
    human_readable = tableToMarkdown('Content install status:', content_install_status,
                                     ['JobID', 'Status', 'Details'], removeNull=True)
    demisto.results({
        'Type': entryTypes['note'],
        'ContentsFormat': formats['json'],
        'Contents': result,
        'ReadableContentsFormat': formats['markdown'],
        'HumanReadable': human_readable,
        'EntryContext': entry_context
    })

    Check jobID of content update install status
    
Check jobID of content update install status
Check jobID of content update install status
def panorama_content_update_install_status_command():
    if DEVICE_GROUP:
        raise Exception('Content download status is only supported on Firewall (not Panorama).')
    target = str(demisto.args()['target']) if 'target' in demisto.args() else None
    job_id = demisto.args()['job_id']
    result = panorama_content_update_install_status(target, job_id)
    content_install_status = {
        'JobID': result['response']['result']['job']['id']
    }
    if result['response']['result']['job']['status'] == 'FIN':
        if result['response']['result']['job']['result'] == 'OK':
            content_install_status['Status'] = 'Completed'
        else:
            content_install_status['Status'] = 'Failed'
        content_install_status['Details'] = result['response']['result']['job']
    if result['response']['result']['job']['status'] == 'PEND':
        content_install_status['Status'] = 'Pending'
    entry_context = {"Panorama.Content.Install(val.JobID == obj.JobID)": content_install_status}
    human_readable = tableToMarkdown('Content install status:', content_install_status,
                                     ['JobID', 'Status', 'Details'], removeNull=True)
    demisto.results({
        'Type': entryTypes['note'],
        'ContentsFormat': formats['json'],
        'Contents': result,
        'ReadableContentsFormat': formats['markdown'],
        'HumanReadable': human_readable,
        'EntryContext': entry_context
    })
def panorama_content_update_install_status_command ( ) : if DEVICE_GROUP : raise Exception ( 'Content download status is only supported on Firewall (not Panorama).' ) target = str ( demisto . args ( ) [ 'target' ] ) if 'target' in demisto . args ( ) else None job_id = demisto . args ( ) [ 'job_id' ] result = panorama_content_update_install_status ( target , job_id ) content_install_status = { 'JobID' : result [ 'response' ] [ 'result' ] [ 'job' ] [ 'id' ] } if result [ 'response' ] [ 'result' ] [ 'job' ] [ 'status' ] == 'FIN' : if result [ 'response' ] [ 'result' ] [ 'job' ] [ 'result' ] == 'OK' : content_install_status [ 'Status' ] = 'Completed' else : content_install_status [ 'Status' ] = 'Failed' content_install_status [ 'Details' ] = result [ 'response' ] [ 'result' ] [ 'job' ] if result [ 'response' ] [ 'result' ] [ 'job' ] [ 'status' ] == 'PEND' : content_install_status [ 'Status' ] = 'Pending' entry_context = { "Panorama.Content.Install(val.JobID == obj.JobID)" : content_install_status } human_readable = tableToMarkdown ( 'Content install status:' , content_install_status , [ 'JobID' , 'Status' , 'Details' ] , removeNull = True ) demisto . results ( { 'Type' : entryTypes [ 'note' ] , 'ContentsFormat' : formats [ 'json' ] , 'Contents' : result , 'ReadableContentsFormat' : formats [ 'markdown' ] , 'HumanReadable' : human_readable , 'EntryContext' : entry_context } )
Check jobID of content update install status
Check jobID of content update install status
"""
    Check jobID of content update install status
    """ # result['response']['job']['result'] == 'FAIL'