本文整理汇总了Python中DIRAC.ResourceStatusSystem.Utilities.Utils.assignOrRaise方法的典型用法代码示例。如果您正苦于以下问题:Python Utils.assignOrRaise方法的具体用法?Python Utils.assignOrRaise怎么用?Python Utils.assignOrRaise使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIRAC.ResourceStatusSystem.Utilities.Utils
的用法示例。
在下文中一共展示了Utils.assignOrRaise方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from DIRAC.ResourceStatusSystem.Utilities import Utils [as 别名]
# 或者: from DIRAC.ResourceStatusSystem.Utilities.Utils import assignOrRaise [as 别名]
def __init__( self, VOExtension, granularity = None, name = None, status = None, formerStatus = None,
reason = None, siteType = None, serviceType = None, resourceType = None,
tokenOwner = None, useNewRes = False ):
self.VOExtension = VOExtension
try:
self.__granularity = Utils.assignOrRaise( granularity, ValidRes, InvalidRes, self, self.__init__ )
except NameError:
pass
self.__name = name
self.__status = Utils.assignOrRaise( status, ValidStatus, InvalidStatus, self, self.__init__ )
self.__formerStatus = Utils.assignOrRaise( formerStatus, ValidStatus, InvalidStatus, self, self.__init__ )
self.__reason = reason
self.__siteType = Utils.assignOrRaise( siteType, ValidSiteType, InvalidSiteType, self, self.__init__ )
self.__serviceType = Utils.assignOrRaise( serviceType, ValidServiceType, InvalidServiceType, self, self.__init__ )
self.__resourceType = Utils.assignOrRaise( resourceType, ValidResourceType, InvalidResourceType, self, self.__init__ )
self.__realBan = False
if tokenOwner is not None:
if tokenOwner == 'RS_SVC':
self.__realBan = True
self.useNewRes = useNewRes