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)
def _rename(self, url, new_url): client = ObjectStoreClient() return client.rename(url, new_url, rse=self.rse['rse'])
def _get_signed_url(self, url, operation='read'): client = ObjectStoreClient() return client.get_signed_url(url, rse=self.rse['rse'], operation=operation)
def _get_metadata(self, urls): client = ObjectStoreClient() return client.get_metadata(urls, rse=self.rse['rse'])
def _connect(self): url = self.path2pfn('') client = ObjectStoreClient() return client.connect(self.rse['rse'], url)