标签:ons cti linux number scope col login filters import
废话不多说,上代码:
# 基于Coverity的示例 from zeep import Client from zeep.wsse.username import UsernameToken config_url = ‘http://...:8080/ws/v9/configurationservice?wsdl‘ defect_url = ‘http://...:8080/ws/v9/defectservice?wsdl‘ user_token = UsernameToken(‘loginuser‘, ‘loginpasswd‘) config_client = Client(config_url, wsse=user_token) defect_client = Client(defect_url, wsse=user_token) config_factory = config_client.type_factory(‘ns0‘) defect_factory = defect_client.type_factory(‘ns0‘) projectId = config_factory.projectIdDataObj( name=‘xxxx-project-name‘ ) filterSpec = defect_factory.snapshotScopeDefectFilterSpecDataObj() pageSpec = defect_factory.pageSpecDataObj(pageSize=1, sortAscending=True, startIndex=0) snapshotScope = defect_factory.snapshotScopeSpecDataObj(showSelector=‘firstAfter(2019-05-01 12:12:12‘)) d = { ‘projectId‘: projectId, ‘filterSpec‘: filterSpec, ‘pageSpec‘: pageSpec, ‘snapshotScope‘: snapshotScope } res = defect_client.service.getMergedDefectesForSnapshotScope(**d) print(res.totalNumberOfRecords)
[TimLinux] Python3 Coverity zeep/SOAP 库使用示例
标签:ons cti linux number scope col login filters import
原文地址:https://www.cnblogs.com/timlinux/p/10914360.html