Skip to content

QualysVMScanScheduleProcessor

Ian Glennon edited this page Jun 7, 2023 · 1 revision

QualysVMScanScheduleProcessor module

QualysVMScanScheduleProcessor.convertScheduledScan(scan: Element, appliance_map: dict, setactive: bool = False, dist_group_map: dict | None = None)

Convert a Scheduled Scan from XML format into a URL/Payload format, excluding FQDN, to be used in an API call to recreate the scan schedule

Parameters:

scan:                   A document of type xml.etree.ElementTree.Element containing the scheduled scan data,

    represents a single scan schedule from the list obtained using getScheduleList

appliance_map:          A python dictionary containing map of old-to-new appliance data
setactive:              (Optional) If True, creates the new scan schedule in the Active state.

> If False, creates the new scan in the Inactive state
> Defaults to False

dist_group_map:         (Optional) A python dictionary containing a map of old-to-new distribution group IDs

Returns:

None                    If an error was encountered during conversion
OR
requeststr, payload:

> requeststr:         The URL, exluding FQDN, of an API call used to create the Schedule Scan
> payload:            A python dictionary containing the payload data used in the API call

QualysVMScanScheduleProcessor.createScheduledScan(target_api: QualysAPI, requeststr: str, payload: dict)

Create a scheduled scan from a URL and Payload generated by convertScheduledScan()

Parameters:

target_api:                 An object of the class QualysAPI
requeststr:                 A string containing the URL, excluding FQDN, to be used in the API call
payload:                    A python dictionary containing the payload to be use in the API call

Returns:

resp:                   A document of type xml.etree.ElementTree.Element containing the full API response

QualysVMScanScheduleProcessor.getScheduleList(source_api: QualysAPI, activeonly: bool = False)

Get a list of VM Scan Schedules

Parameters:

source_api:             An object of class QualysAPI
activeonly:             A boolean value to specify whether only active scan schedules should be obtained

Returns:

resp:                   A document of type xml.etree.ElementTree.Element containing the full API response
OR
None                    if an error was encountered in the API response

QualysVMScanScheduleProcessor.responseHandler(resp: ElementTree)

Clone this wiki locally