Skip to content

QualysDomainProcessor

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

QualysDomainProcessor module

QualysDomainProcessor.createDomainSingle(target_api: QualysAPI, url: str)

Creates a single domain using the specified URL parameters

Parameters:

target_api:             An object of the class QualysAPI
url:                    A string containing the URL parameters required to perform the create operation

Returns

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

    the operation was successful

OR
None                    If the create operation was unsuccessful

QualysDomainProcessor.createDomains(target_api: QualysAPI, allurls: list)

Create the domains generated by getDomains()

Parameters:

target_api:             An object of the class QualysAPI
allurls:                A list of URLS, excluding the FQDN, generated by getDomains()

Returns:

True                    if all domains were successfully added
False                   if one of the domains was not successfully added.  Returns on the first occurence of

> an error

QualysDomainProcessor.editDomain(target_api: QualysAPI, url: str)

Edits an existing Domain using the specified URL parameters

Parameters:

target_api:             An object of the class QualysAPI
url:                    A string containing the URL parameters required to perform the edit operation

Returns

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

    the edit operation was successful

OR
None                    If the create operation was unsuccessful

QualysDomainProcessor.getDomains(source_api: QualysAPI)

Get a list of URLs, excluding the FQDN, with which Domains can be created in a subscription

Parameters:

source_api:         An object of the class QualysAPI

Returns:

allurls:            A list of strings containing the URLs, excluding the FQDN, which can be used to create

    the domains which exist in the source subscription

QualysDomainProcessor.getDomainsXML(source_api: QualysAPI)

Gets the full XML output for the list of Domains

Parameters:

source_api:             An object of the class QualysAPI

Returns:

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

QualysDomainProcessor.responseHandler(response: Element)

Handles an API response

Parameters:

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

Returns:

True                If the response was valid
False               If the response contains errors
Clone this wiki locally