pithos: Enable stale snapshot better handling
Extend Pithos backend functionality in order to be able to set the state of the snapshot. This commit introduces the appropriate modifications proposed in #231. More specifically: * Changes 'available' flag (denoting the existence of the object mapfile in the backend) to integer. * The 'available' field can be assigned with the following values: -1 (MAP_ERROR), 0 (MAP_UNAVAILABLE) and 1 (MAP_AVAILABLE) * Provides a respective database migration script. * Adds 'update_object_status' method in PithosBackend that is used in order to update the state of a Pithos object. * Returns 400 (BAD REQUEST) response status when one tries to download a broken snapshot.
Showing with 99 additions and 17 deletions
snf-pithos-backend/pithos/backends/lib/sqlalchemy/alembic/versions/5adc52055209_alter_versions_avail.py 0 → 100644