swh.objstorage.multiplexer.filter.filter module#

class swh.objstorage.multiplexer.filter.filter.ObjStorageFilter(storage)[source]#

Bases: ObjStorage

Base implementation of a filter that allow inputs on ObjStorage or not.

This class copy the API of …objstorage in order to filter the inputs of this class.

If the operation is allowed, return the result of this operation applied to the destination implementation. Otherwise, just return without any operation.

This class is an abstract base class for a classic read/write storage. Filters can inherit from it and only redefine some methods in order to change behavior.

check_config(*, check_write)[source]#

Check the object storage for proper configuration.


check_write – check whether writes to the objstorage will succeed


True if the storage is properly configured

add(content, obj_id, check_presence=True, *args, **kwargs)[source]#
restore(content, obj_id, *args, **kwargs)[source]#
get(obj_id, *args, **kwargs)[source]#
check(obj_id, *args, **kwargs)[source]#
delete(obj_id, *args, **kwargs)[source]#