本文整理匯總了Python中rucio.client.Client.add_value方法的典型用法代碼示例。如果您正苦於以下問題:Python Client.add_value方法的具體用法?Python Client.add_value怎麽用?Python Client.add_value使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rucio.client.Client
的用法示例。
在下文中一共展示了Client.add_value方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: locals
# 需要導入模塊: from rucio.client import Client [as 別名]
# 或者: from rucio.client.Client import add_value [as 別名]
trcbck = traceback.format_exc()
print "Interrupted processing with %s %s %s." % (errno, errstr, trcbck)
sys.exit(CRITICAL)
scopes_total -= 1
print "6. Adding %s artificial scopes for the user root finished" % tmp
# 7. Define meta data
for key, key_type, value_regexp, values in meta_keys:
try:
try:
c.add_key(key=key, key_type=key_type, value_regexp=value_regexp)
except Duplicate:
print "%(key)s already added" % locals()
for value in values:
try:
c.add_value(key=key, value=value)
except Duplicate:
print "%(key)s:%(value)s already added" % locals()
if key == "project":
try:
c.add_scope("root", value)
except Duplicate:
print "Scope %(value)s already added" % locals()
except:
errno, errstr = sys.exc_info()[:2]
trcbck = traceback.format_exc()
print "Interrupted processing with %s %s %s." % (errno, errstr, trcbck)