本文整理汇总了Python中builtins.object方法的典型用法代码示例。如果您正苦于以下问题:Python builtins.object方法的具体用法?Python builtins.object怎么用?Python builtins.object使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类builtins
的用法示例。
在下文中一共展示了builtins.object方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: CreateFromXML
# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import object [as 别名]
def CreateFromXML(xml_data):
details = VulnerabilityException()
details.id = int(get_attribute(xml_data, 'exception-id', details.id))
details.vulnerability_id = get_attribute(xml_data, 'vuln-id', details.vulnerability_id)
details.vulnerability_key = get_attribute(xml_data, 'vuln-key', details.vulnerability_key)
details.expiration_date = get_attribute(xml_data, 'expiration-date', details.expiration_date) # TODO: date object
details.submitter = get_attribute(xml_data, 'submitter', details.submitter)
details.submitter_comment = get_content_of(xml_data, 'submitter-comment', details.submitter_comment)
details.reviewer = get_attribute(xml_data, 'reviewer', details.reviewer)
details.reviewer_comment = get_content_of(xml_data, 'reviewer-comment', details.reviewer_comment)
details.status = get_attribute(xml_data, 'status', details.status)
details.reason = get_attribute(xml_data, 'reason', details.reason)
details.scope = get_attribute(xml_data, 'scope', details.scope)
details.asset_id = int(fix_null(get_attribute(xml_data, 'device-id', details.asset_id)))
details.asset_port = int(fix_null(get_attribute(xml_data, 'port-no', details.asset_port)))
return details
示例2: CreateFromXML
# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import object [as 别名]
def CreateFromXML(xml_data):
xml_event = get_element(xml_data, 'Event')
event = TicketEvent()
event.title = xml_event.text
event.author = get_attribute(xml_data, 'author', event.author)
event.created_on = get_attribute(xml_data, 'created-on', event.created_on) # TODO: datetime object!
event.state = get_attribute(xml_event, 'state', TicketState.UNKNOWN)
event.comment = get_content_of(xml_data, 'Comment', event.comment)
return event
示例3: __init__
# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import object [as 别名]
def __init__(self):
self.title = ''
self.author = ''
self.created_on = '' # TODO: datetime object!
self.state = TicketState.UNKNOWN
self.comment = ''
示例4: InitalizeFromXML
# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import object [as 别名]
def InitalizeFromXML(self, xml_data):
_TicketBase.InitalizeFromXML(self, xml_data)
self.id = int(get_attribute(xml_data, 'id', self.id))
self.author = get_attribute(xml_data, 'author', self.author)
self.created_on = get_attribute(xml_data, 'created-on', self.created_on) # TODO: datetime object!
self.state = get_attribute(xml_data, 'state', self.state)
示例5: __init__
# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import object [as 别名]
def __init__(self):
self.id = 0
self.vulnerability_id = ''
self.vulnerability_key = ''
self.expiration_date = '' # TODO: date object
self.submitter = ''
self.submitter_comment = ''
self.reviewer = ''
self.reviewer_comment = ''
self.status = ''
self.reason = ''
self.scope = ''
self.asset_id = 0
self.asset_port = 0
示例6: RequestSiteListing
# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import object [as 别名]
def RequestSiteListing(self):
"""
Return all sites (summary) for the Scan Engine.
This function will return a single SiteListingResponse XML object (API 1.1).
"""
return self.ExecuteBasicXML("SiteListingRequest")
示例7: RequestSiteConfig
# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import object [as 别名]
def RequestSiteConfig(self, site_id):
"""
Get the configuration of the specified site.
This function will return a single SiteConfigResponse XML object (API 1.1).
"""
return self.ExecuteBasicOnSite("SiteConfigRequest", site_id)
示例8: RequestSiteSave
# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import object [as 别名]
def RequestSiteSave(self, xml_site_configuration):
"""
Save the configuration of a site.
To create a new site, specify -1 as id.
This function will return a single SiteSaveResponse XML object (API 1.1).
"""
return self.ExecuteBasicWithElement("SiteSaveRequest", {}, xml_site_configuration)
示例9: RequestSiteDelete
# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import object [as 别名]
def RequestSiteDelete(self, site_id):
"""
Delete the specified site and all associated scan data.
A site cannot be deleted if an associated scan is running or paused.
This function will return a single SiteDeleteResponse XML object (API 1.1).
"""
return self.ExecuteBasicOnSite("SiteDeleteRequest", site_id)
示例10: RequestSiteScanHistory
# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import object [as 别名]
def RequestSiteScanHistory(self, site_id):
"""
Return the scan history (summaries) of a site.
This function will return a single SiteScanHistoryResponse XML object (API 1.1).
"""
return self.ExecuteBasicOnSite("SiteScanHistoryRequest", site_id)
#
# The following functions implement the Asset Management API:
# ==========================================================
示例11: RequestSiteDeviceListing
# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import object [as 别名]
def RequestSiteDeviceListing(self, site_id=None):
"""
Return all devices (assets) in a site.
If site_id is None then all devices (asset summaries) for the Scan Engine, grouped by site-id are returned.
This function will return a single SiteDeviceListingResponse XML object (API 1.1).
"""
return self.ExecuteBasicOnOptionalSite("SiteDeviceListingRequest", site_id)
示例12: RequestDeviceDelete
# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import object [as 别名]
def RequestDeviceDelete(self, device_id):
"""
Delete a device (asset).
This function will return a single DeviceDeleteResponse XML object (API 1.1).
"""
return self.ExecuteBasicOnDevice("DeviceDeleteRequest", device_id)
示例13: RequestAssetGroupListing
# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import object [as 别名]
def RequestAssetGroupListing(self):
"""
Return all asset groups the logged in user has access to.
This function will return a single AssetGroupListingResponse XML object (API 1.1).
"""
return self.ExecuteBasicXML("AssetGroupListingRequest")
示例14: RequestScanActivity
# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import object [as 别名]
def RequestScanActivity(self):
"""
Return the scan activities (scan summaries) across all Scan Engines managed by the Security Console.
This function will return a single ScanActivityResponse XML object (API 1.1).
"""
return self.ExecuteBasicXML("ScanActivityRequest")
示例15: RequestScanPause
# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import object [as 别名]
def RequestScanPause(self, scan_id):
"""
Pause a running scan.
This function will return a single ScanPauseResponse XML object (API 1.1).
"""
return self.ExecuteBasicOnScan("ScanPauseRequest", scan_id)