Moved storage backend names to a module-global constant

This allows others to import the constant and have proper 'allowed' values
for backends. This will be used by Flamenco for storing task logs.
This commit is contained in:
Sybren A. Stüvel 2019-01-08 14:45:46 +01:00
parent a756632cad
commit 974ac6867c

View File

@ -1,5 +1,6 @@
import os
STORAGE_BACKENDS = ["local", "pillar", "cdnsun", "gcs", "unittest"]
URL_PREFIX = 'api'
# Enable reads (GET), inserts (POST) and DELETE for resources/collections
@ -463,7 +464,7 @@ files_schema = {
'backend': {
'type': 'string',
'required': True,
'allowed': ["local", "pillar", "cdnsun", "gcs", "unittest"]
'allowed': STORAGE_BACKENDS,
},
# Where the file is in the backend storage itself. In the case of GCS,