Revision ee688a71
b/snf-cyclades-app/synnefo/logic/servers.py | ||
---|---|---|
40 | 40 |
|
41 | 41 |
# Check if action can be performed to VM's operstate |
42 | 42 |
operstate = vm.operstate |
43 |
if operstate == "BUILD" and action != "BUILD": |
|
43 |
if operstate == "ERROR": |
|
44 |
raise faults.BadRequest("Can not perform '%s' action while server is" |
|
45 |
" in 'ERROR' state." % action) |
|
46 |
elif operstate == "BUILD" and action != "BUILD": |
|
44 | 47 |
raise faults.BuildInProgress("Server '%s' is being build." % vm.id) |
45 | 48 |
elif (action == "START" and operstate != "STOPPED") or\ |
46 | 49 |
(action == "STOP" and operstate != "STARTED") or\ |
Also available in: Unified diff