swh.objstorage.backends.noop module#

class swh.objstorage.backends.noop.NoopObjStorage(*, allow_delete: bool = False, **kwargs)[source]#

Bases: ObjStorage

Noop objstorage. Basic implementation which does no operations at all.

Only intended for test purposes to avoid either memory or i/o operations. This allows swh clients to use the swh stack without having to deal with objstorage configuration. So users can concentrate on testing the remaining part of the stack without the objstorage.

name: str = 'noop'#

Default objstorage name; can be overloaded at instantiation time giving a ‘name’ argument to the constructor

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

Check if a content is found and recompute its hash to check integrity.

delete(obj_id, *args, **kwargs)[source]#