当前位置: 首页>>代码示例>>Python>>正文


Python SoftwareManagement.removeSoftware方法代码示例

本文整理汇总了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
开发者ID:stuartw,项目名称:WMCore,代码行数:36,代码来源:ReqMgr_t.py

示例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)
开发者ID:AndrewLevin,项目名称:WMCore,代码行数:5,代码来源:ReqMgrRESTModel.py


注:本文中的WMCore.RequestManager.RequestDB.Interface.Admin.SoftwareManagement.removeSoftware方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。