本文整理汇总了Python中WMCore.RequestManager.RequestDB.Interface.Admin.SoftwareManagement.removeSoftware方法的典型用法代码示例。如果您正苦于以下问题:Python SoftwareManagement.removeSoftware方法的具体用法?Python SoftwareManagement.removeSoftware怎么用?Python SoftwareManagement.removeSoftware使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WMCore.RequestManager.RequestDB.Interface.Admin.SoftwareManagement
的用法示例。
在下文中一共展示了SoftwareManagement.removeSoftware方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testH_RemoveSoftwareVersion
# 需要导入模块: from WMCore.RequestManager.RequestDB.Interface.Admin import SoftwareManagement [as 别名]
# 或者: from WMCore.RequestManager.RequestDB.Interface.Admin.SoftwareManagement import removeSoftware [as 别名]
def testH_RemoveSoftwareVersion(self):
"""
_RemoveSoftwareVersion_
Remove the software version after submitting the request. See what that does.
"""
myThread = threading.currentThread()
userName = "Taizong"
groupName = "Li"
teamName = "Tang"
CMSSWVersion = "CMSSW_3_5_8"
scramArch = "slc5_ia32_gcc434"
schema = self.setupSchema(
userName=userName, groupName=groupName, teamName=teamName, CMSSWVersion=CMSSWVersion, scramArch=scramArch
)
result = self.jsonSender.put("request/testRequest", schema)
self.assertEqual(result[1], 200)
requestName = result[0]["RequestName"]
req = self.jsonSender.get("request/%s" % requestName)[0]
self.assertEqual(req["SoftwareVersions"], [CMSSWVersion])
# Delete software versions and make sure they're gone from the DB
SoftwareManagement.removeSoftware(softwareName=CMSSWVersion, scramArch=scramArch)
versions = myThread.dbi.processData("SELECT * FROM reqmgr_software")[0].fetchall()
self.assertEqual(versions, [])
assocs = myThread.dbi.processData("SELECT * FROM reqmgr_software_dependency")[0].fetchall()
self.assertEqual(assocs, [])
req = self.jsonSender.get("request/%s" % requestName)[0]
self.assertEqual(req["SoftwareVersions"], [CMSSWVersion])
return
示例2: deleteVersion
# 需要导入模块: from WMCore.RequestManager.RequestDB.Interface.Admin import SoftwareManagement [as 别名]
# 或者: from WMCore.RequestManager.RequestDB.Interface.Admin.SoftwareManagement import removeSoftware [as 别名]
def deleteVersion(self, version, scramArch):
""" Un-register this software version with ReqMgr """
SoftwareAdmin.removeSoftware(version, scramArch)