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


Python SoftwareManagement.updateSoftware方法代码示例

本文整理汇总了Python中WMCore.RequestManager.RequestDB.Interface.Admin.SoftwareManagement.updateSoftware方法的典型用法代码示例。如果您正苦于以下问题:Python SoftwareManagement.updateSoftware方法的具体用法?Python SoftwareManagement.updateSoftware怎么用?Python SoftwareManagement.updateSoftware使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WMCore.RequestManager.RequestDB.Interface.Admin.SoftwareManagement的用法示例。


在下文中一共展示了SoftwareManagement.updateSoftware方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: testA_SoftwareManagement

# 需要导入模块: from WMCore.RequestManager.RequestDB.Interface.Admin import SoftwareManagement [as 别名]
# 或者: from WMCore.RequestManager.RequestDB.Interface.Admin.SoftwareManagement import updateSoftware [as 别名]
    def testA_SoftwareManagement(self):
        """
        _SoftwareManagement_

        Test the SoftwareManagement code
        """

        self.assertEqual(SoftwareManagement.listSoftware(), {})
        softwareVersions = ReqMgrWebTools.allScramArchsAndVersions()
        ReqMgrWebTools.updateScramArchsAndCMSSWVersions()
        result = SoftwareManagement.listSoftware()
        for scramArch in result.keys():
            self.assertEqual(set(result[scramArch]), set(softwareVersions[scramArch]))

        # Now for each scramArch insert a blank set
        # Because of the way that updateSoftware works, this interprets a blank list
        # as telling it that no softwareVersions are available.
        # It deletes every software version it is not handed, so it should give nothing out.
        for scramArch in result.keys():
            SoftwareManagement.updateSoftware(softwareNames = [], scramArch = scramArch)
        self.assertEqual(SoftwareManagement.listSoftware(), {})

        from WMCore.HTTPFrontEnd.RequestManager import Admin
        setattr(self.config, 'database', self.testInit.coreConfig.CoreDatabase)
        self.config.section_('templates')
        self.config.section_('html')
        admin = Admin.Admin(self.config)

        ReqMgrWebTools.updateScramArchsAndCMSSWVersions()
        self.assertTrue('slc5_amd64_gcc434' in admin.scramArchs())
        return
开发者ID:stuartw,项目名称:WMCore,代码行数:33,代码来源:Admin_t.py

示例2: updateScramArchsAndCMSSWVersions

# 需要导入模块: from WMCore.RequestManager.RequestDB.Interface.Admin import SoftwareManagement [as 别名]
# 或者: from WMCore.RequestManager.RequestDB.Interface.Admin.SoftwareManagement import updateSoftware [as 别名]
def updateScramArchsAndCMSSWVersions():
    """
    _updateScramArchsAndCMSSWVersions_

    Update both the scramArchs and their associated software versions to
    the current tag collector standard.
    """

    allArchsAndVersions = allScramArchsAndVersions()
    if allArchsAndVersions == {}:
        # The tag collector is probably down
        # NO valid CMSSW Versions is not a valid use case!
        # Do nothing.
        logging.error("Handed blank list of scramArchs/versions.  Ignoring for this cycle.")
        return
    for scramArch in allArchsAndVersions.keys():
        SoftwareAdmin.updateSoftware(scramArch=scramArch, softwareNames=allArchsAndVersions[scramArch])
开发者ID:jha2,项目名称:WMCore,代码行数:19,代码来源:ReqMgrWebTools.py

示例3: handleAddVersion

# 需要导入模块: from WMCore.RequestManager.RequestDB.Interface.Admin import SoftwareManagement [as 别名]
# 或者: from WMCore.RequestManager.RequestDB.Interface.Admin.SoftwareManagement import updateSoftware [as 别名]
 def handleAddVersion(self, version):
     """ Registers a version """
     WMCore.Lexicon.cmsswversion(version)
     SoftwareAdmin.updateSoftware(version)
     return "Added version %s" % version
开发者ID:AndrewLevin,项目名称:WMCore,代码行数:7,代码来源:Admin.py


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