예제 #1
0
 def setup(self):
     self.os_client = ObjectStoreClient()
     self.url = 's3+https://cephgw.usatlas.bnl.gov:8443/rucio_bucket/test_public'
     self.rse = 'BNL-OSG2_ES'
     ret = objectstore.get_signed_urls([self.url], rse=self.rse, operation='write')
     if isinstance(ret[self.url], Exception):
         raise ret[self.url]
     command = 'curl --request PUT --upload-file /bin/hostname "%s"' % ret[self.url]
     status, output = commands.getstatusoutput(command)
     if status:
         raise Exception(output)
     if 'AccessDenied' in output:
         raise Exception(output)
예제 #2
0
 def _rename(self, url, new_url):
     client = ObjectStoreClient()
     return client.rename(url, new_url, rse=self.rse['rse'])
예제 #3
0
 def _get_signed_url(self, url, operation='read'):
     client = ObjectStoreClient()
     return client.get_signed_url(url, rse=self.rse['rse'], operation=operation)
예제 #4
0
 def _get_metadata(self, urls):
     client = ObjectStoreClient()
     return client.get_metadata(urls, rse=self.rse['rse'])
예제 #5
0
 def _connect(self):
     url = self.path2pfn('')
     client = ObjectStoreClient()
     return client.connect(self.rse['rse'], url)