本文整理汇总了Python中DIRAC.Interfaces.API.DiracAdmin.DiracAdmin.uploadProxy方法的典型用法代码示例。如果您正苦于以下问题:Python DiracAdmin.uploadProxy方法的具体用法?Python DiracAdmin.uploadProxy怎么用?Python DiracAdmin.uploadProxy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIRAC.Interfaces.API.DiracAdmin.DiracAdmin
的用法示例。
在下文中一共展示了DiracAdmin.uploadProxy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: len
# 需要导入模块: from DIRAC.Interfaces.API.DiracAdmin import DiracAdmin [as 别名]
# 或者: from DIRAC.Interfaces.API.DiracAdmin.DiracAdmin import uploadProxy [as 别名]
"""
Upload a proxy to the Proxy Manager using delegation
"""
__RCSID__ = "8cece5c (2010-12-14 13:27:44 +0000) Ricardo Graciani <[email protected]>"
import DIRAC
from DIRAC.Core.Base import Script
Script.setUsageMessage( '\n'.join( [ __doc__.split( '\n' )[1],
'Usage:',
' %s [option|cfgfile] ... Group' % Script.scriptName,
'Arguments:',
' Group: Group name in the uploaded proxy' ] ) )
Script.parseCommandLine( ignoreErrors = True )
args = Script.getPositionalArgs()
if len( args ) != 1:
Script.showHelp()
from DIRAC.Interfaces.API.DiracAdmin import DiracAdmin
diracAdmin = DiracAdmin()
group = args[0]
result = diracAdmin.uploadProxy( group )
if result['OK']:
print 'Proxy uploaded for group %s' % ( group )
DIRAC.exit( 0 )
else:
print result['Message']
DIRAC.exit( 2 )