Revision 19ddd41b snf-pithos-app/pithos/api/management/commands/storagequota.py
b/snf-pithos-app/pithos/api/management/commands/storagequota.py | ||
---|---|---|
35 | 35 |
|
36 | 36 |
from django.core.management.base import BaseCommand, CommandError |
37 | 37 |
|
38 |
from pithos.api.settings import (BACKEND_QUOTA, BACKEND_VERSIONING) |
|
39 |
|
|
40 | 38 |
from pithos.api.util import get_backend |
41 | 39 |
|
40 |
|
|
42 | 41 |
class Command(BaseCommand): |
43 | 42 |
args = "<user>" |
44 | 43 |
help = "Get/set a user's quota" |
... | ... | |
63 | 62 |
raise CommandError("Invalid quota") |
64 | 63 |
|
65 | 64 |
backend = get_backend() |
66 |
backend.default_policy['quota'] = BACKEND_QUOTA |
|
67 |
backend.default_policy['versioning'] = BACKEND_VERSIONING |
|
68 | 65 |
|
69 | 66 |
if backend.using_external_quotaholder: |
70 | 67 |
raise CommandError("The system uses an extrenal quota holder.") |
Also available in: Unified diff