本文整理汇总了Python中DIRAC.ResourceStatusSystem.Utilities.Utils.getTypedList方法的典型用法代码示例。如果您正苦于以下问题:Python Utils.getTypedList方法的具体用法?Python Utils.getTypedList怎么用?Python Utils.getTypedList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIRAC.ResourceStatusSystem.Utilities.Utils
的用法示例。
在下文中一共展示了Utils.getTypedList方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getValidStatusTypes
# 需要导入模块: from DIRAC.ResourceStatusSystem.Utilities import Utils [as 别名]
# 或者: from DIRAC.ResourceStatusSystem.Utilities.Utils import getTypedList [as 别名]
def getValidStatusTypes():
'''
Returns from the OperationsHelper: RSSConfiguration/GeneralConfig/Resources
'''
DEFAULTS = {
'Site' : { 'StatusType' : "''" },
'Service' : { 'StatusType' : "''" },
'Resource' : { 'StatusType' : "''" },
'StorageElement': { 'StatusType' : [ 'Read', 'Write', 'Remove', 'Check' ] }
}
opHelper = Operations()
sections = opHelper.getSections( 'RSSConfiguration/GeneralConfig/Resources' )
if not sections[ 'OK' ]:
return DEFAULTS
result = {}
for section in sections[ 'Value' ]:
res = opHelper.getValue( 'RSSConfiguration/GeneralConfig/Resources/%s/StatusType' % section )
if res is None:
if DEFAULTS.has_key( section ):
result[ section ] = { 'StatusType' : DEFAULTS[ section ] }
else:
result[ section ] = { 'StatusType' : None }
else:
result[ section ] = { 'StatusType' : Utils.getTypedList( res ) }
return result
示例2: getValidServiceTypes
# 需要导入模块: from DIRAC.ResourceStatusSystem.Utilities import Utils [as 别名]
# 或者: from DIRAC.ResourceStatusSystem.Utilities.Utils import getTypedList [as 别名]
def getValidServiceTypes():
'''
Returns from the OperationsHelper: RSSConfiguration/GeneralConfig/ServiceType
'''
DEFAULTS = [ 'Computing', 'Storage', 'VO-BOX', 'VOMS', 'CondDB' ]
result = Operations().getValue( 'RSSConfiguration/GeneralConfig/ServiceType' )
if result is not None:
return Utils.getTypedList( result )
return DEFAULTS
示例3: getValidSiteTypes
# 需要导入模块: from DIRAC.ResourceStatusSystem.Utilities import Utils [as 别名]
# 或者: from DIRAC.ResourceStatusSystem.Utilities.Utils import getTypedList [as 别名]
def getValidSiteTypes():
'''
Returns from the OperationsHelper: RSSConfiguration/GeneralConfig/SiteType
'''
DEFAULTS = [ 'T1', 'T2', 'T3', 'T4' ]
result = Operations().getValue( 'RSSConfiguration/GeneralConfig/SiteType' )
if result is not None:
return Utils.getTypedList( result )
return DEFAULTS
示例4: getValidPolicyResult
# 需要导入模块: from DIRAC.ResourceStatusSystem.Utilities import Utils [as 别名]
# 或者: from DIRAC.ResourceStatusSystem.Utilities.Utils import getTypedList [as 别名]
def getValidPolicyResult():
'''
Returns from the OperationsHelper: RSSConfiguration/GeneralConfig/PolicyResult
'''
DEFAULTS = [ 'Error', 'Unknown', 'Banned', 'Probing', 'Bad', 'Active' ]
result = Operations().getValue( 'RSSConfiguration/GeneralConfig/PolicyResult' )
if result is not None:
return Utils.getTypedList( result )
return DEFAULTS
示例5: getValidStatus
# 需要导入模块: from DIRAC.ResourceStatusSystem.Utilities import Utils [as 别名]
# 或者: from DIRAC.ResourceStatusSystem.Utilities.Utils import getTypedList [as 别名]
def getValidStatus():
'''
Returns from the OperationsHelper: RSSConfiguration/GeneralConfig/Status
'''
DEFAULTS = [ 'Active', 'Bad', 'Probing', 'Banned' ]
result = Operations().getValue( 'RSSConfiguration/GeneralConfig/Status' )
if result is not None:
return Utils.getTypedList( result )
return DEFAULTS
示例6: getValidPolicyTypes
# 需要导入模块: from DIRAC.ResourceStatusSystem.Utilities import Utils [as 别名]
# 或者: from DIRAC.ResourceStatusSystem.Utilities.Utils import getTypedList [as 别名]
def getValidPolicyTypes():
'''
Returns from the OperationsHelper: RSSConfiguration/GeneralConfig/PolicyTypes
'''
DEFAULTS = [ 'Resource_PolType', 'Alarm_PolType', 'Collective_PolType', 'RealBan_PolType' ]
result = Operations().getValue( 'RSSConfiguration/GeneralConfig/PolicyTypes' )
if result is not None:
return Utils.getTypedList( result )
return DEFAULTS
示例7: getValidResourceTypes
# 需要导入模块: from DIRAC.ResourceStatusSystem.Utilities import Utils [as 别名]
# 或者: from DIRAC.ResourceStatusSystem.Utilities.Utils import getTypedList [as 别名]
def getValidResourceTypes():
'''
Returns from the OperationsHelper: RSSConfiguration/GeneralConfig/ResourceType
'''
DEFAULTS = [ 'CE', 'CREAMCE', 'SE', 'LFC_C', 'LFC_L', 'FTS', 'VOMS' ]
result = Operations().getValue( 'RSSConfiguration/GeneralConfig/ResourceType' )
if result is not None:
return Utils.getTypedList( result )
return DEFAULTS
示例8: getValidElements
# 需要导入模块: from DIRAC.ResourceStatusSystem.Utilities import Utils [as 别名]
# 或者: from DIRAC.ResourceStatusSystem.Utilities.Utils import getTypedList [as 别名]
def getValidElements():
'''
Returns from the OperationsHelper: RSSConfiguration/GeneralConfig/Granularity
'''
DEFAULTS = [ 'Site', 'Service', 'Resource', 'StorageElement' ]
result = Operations().getValue( 'RSSConfiguration/GeneralConfig/Granularity' )
if result is not None:
return Utils.getTypedList( result )
return DEFAULTS