本文整理匯總了Python中rucio.client.Client.attach_dids方法的典型用法代碼示例。如果您正苦於以下問題:Python Client.attach_dids方法的具體用法?Python Client.attach_dids怎麽用?Python Client.attach_dids使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rucio.client.Client
的用法示例。
在下文中一共展示了Client.attach_dids方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: RucioClient
# 需要導入模塊: from rucio.client import Client [as 別名]
# 或者: from rucio.client.Client import attach_dids [as 別名]
import sys
from rucio.client import Client as RucioClient
client = RucioClient()
# scope = sys.argv[1]
# name = sys.argv[2]
# rep.list_replicas([{'scope':'ams-2011B-ISS.B620-pass4', 'name':'1340252898.00981893.root'}])
# for x in rep.list_replicas([{'scope':scope, 'name':name}]):
# print x
from rucio.common.utils import generate_uuid
account = 'chenghsi'
scope = 'twgrid-user-chenghsi'
name = 'file20150709T105442'
client.attach_dids(scope, 'New_Dataset', [{'scope': scope, 'name': '0.txt',
'bytes': 29, 'adler32': '6e190697',
'meta': {'guid': str(generate_uuid()), 'events': 100}}])
# import pdb; pdb.set_trace()
# for key, value in client.get_metadata(scope, name).iteritems():
# print key, value
# client.set_metadata(scope, name, 'guid', generate_uuid())