當前位置: 首頁>>代碼示例>>Python>>正文


Python builtins.object方法代碼示例

本文整理匯總了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 
開發者ID:rapid7,項目名稱:nexpose-client-python,代碼行數:18,代碼來源:nexpose_vulnerabilityexception.py

示例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 
開發者ID:rapid7,項目名稱:nexpose-client-python,代碼行數:11,代碼來源:nexpose_ticket.py

示例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 = '' 
開發者ID:rapid7,項目名稱:nexpose-client-python,代碼行數:8,代碼來源:nexpose_ticket.py

示例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) 
開發者ID:rapid7,項目名稱:nexpose-client-python,代碼行數:8,代碼來源:nexpose_ticket.py

示例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 
開發者ID:rapid7,項目名稱:nexpose-client-python,代碼行數:16,代碼來源:nexpose_vulnerabilityexception.py

示例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") 
開發者ID:rapid7,項目名稱:nexpose-client-python,代碼行數:8,代碼來源:nexpose.py

示例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) 
開發者ID:rapid7,項目名稱:nexpose-client-python,代碼行數:8,代碼來源:nexpose.py

示例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) 
開發者ID:rapid7,項目名稱:nexpose-client-python,代碼行數:9,代碼來源:nexpose.py

示例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) 
開發者ID:rapid7,項目名稱:nexpose-client-python,代碼行數:9,代碼來源:nexpose.py

示例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:
    # ========================================================== 
開發者ID:rapid7,項目名稱:nexpose-client-python,代碼行數:12,代碼來源:nexpose.py

示例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) 
開發者ID:rapid7,項目名稱:nexpose-client-python,代碼行數:9,代碼來源:nexpose.py

示例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) 
開發者ID:rapid7,項目名稱:nexpose-client-python,代碼行數:8,代碼來源:nexpose.py

示例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") 
開發者ID:rapid7,項目名稱:nexpose-client-python,代碼行數:8,代碼來源:nexpose.py

示例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") 
開發者ID:rapid7,項目名稱:nexpose-client-python,代碼行數:8,代碼來源:nexpose.py

示例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) 
開發者ID:rapid7,項目名稱:nexpose-client-python,代碼行數:8,代碼來源:nexpose.py


注:本文中的builtins.object方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。