Revision e872c133 snf-astakos-app/astakos/im/management/commands/project-control.py
b/snf-astakos-app/astakos/im/management/commands/project-control.py | ||
---|---|---|
34 | 34 |
from optparse import make_option |
35 | 35 |
|
36 | 36 |
from django.core.management.base import BaseCommand, CommandError |
37 |
from astakos.im.functions import (terminate, suspend, resume, check_expiration, |
|
37 |
from astakos.im.functions import (terminate, suspend, unsuspend, |
|
38 |
reinstate, check_expiration, |
|
38 | 39 |
approve_application, deny_application) |
39 | 40 |
from snf_django.lib.db.transaction import commit_on_success_strict |
40 | 41 |
|
... | ... | |
60 | 61 |
metavar='<project id>', |
61 | 62 |
help="Suspend a project"), |
62 | 63 |
make_option('--unsuspend', |
63 |
dest='resume',
|
|
64 |
dest='unsuspend',
|
|
64 | 65 |
metavar='<project id>', |
65 | 66 |
help="Resume a suspended project"), |
67 |
make_option('--reinstate', |
|
68 |
dest='reinstate', |
|
69 |
metavar='<project id>', |
|
70 |
help=("Resume a terminated project; this will fail if its " |
|
71 |
"name has been reserved by another project")), |
|
66 | 72 |
make_option('--check-expired', |
67 | 73 |
action='store_true', |
68 | 74 |
dest='check_expired', |
... | ... | |
87 | 93 |
|
88 | 94 |
actions = { |
89 | 95 |
'terminate': terminate, |
90 |
'resume': resume, |
|
96 |
'reinstate': reinstate, |
|
97 |
'unsuspend': unsuspend, |
|
91 | 98 |
'suspend': suspend, |
92 | 99 |
'approve': approve_application, |
93 | 100 |
'deny': lambda a: deny_application(a, reason=message), |
Also available in: Unified diff