Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/api/client.py
Show All 11 Lines | |||||
class RemoteStorage(SWHRemoteAPI): | class RemoteStorage(SWHRemoteAPI): | ||||
"""Proxy to a remote storage API""" | """Proxy to a remote storage API""" | ||||
api_exception = StorageAPIError | api_exception = StorageAPIError | ||||
def check_config(self, *, check_write): | def check_config(self, *, check_write): | ||||
return self.post('check_config', {'check_write': check_write}) | return self.post('check_config', {'check_write': check_write}) | ||||
def reset(self): | |||||
return self.post('reset', {}) | |||||
def content_add(self, content): | def content_add(self, content): | ||||
return self.post('content/add', {'content': content}) | return self.post('content/add', {'content': content}) | ||||
def content_add_metadata(self, content): | def content_add_metadata(self, content): | ||||
return self.post('content/add_metadata', {'content': content}) | return self.post('content/add_metadata', {'content': content}) | ||||
def content_update(self, content, keys=[]): | def content_update(self, content, keys=[]): | ||||
return self.post('content/update', {'content': content, | return self.post('content/update', {'content': content, | ||||
▲ Show 20 Lines • Show All 259 Lines • Show Last 20 Lines |