projects
/
invirt/packages/invirt-web.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add kstart apache wrapper; update control
[invirt/packages/invirt-web.git]
/
code
/
controls.py
diff --git
a/code/controls.py
b/code/controls.py
index
cd2d926
..
b4740d4
100644
(file)
--- a/
code/controls.py
+++ b/
code/controls.py
@@
-97,7
+97,7
@@
def bootMachine(machine, cdtype):
else:
out, err = remctl('control', machine.name, 'create',
err=True)
else:
out, err = remctl('control', machine.name, 'create',
err=True)
- if 'already exists' in out:
+ if 'already running' in err:
raise InvalidInput('action', 'create',
'VM %s is already on' % machine.name)
elif err:
raise InvalidInput('action', 'create',
'VM %s is already on' % machine.name)
elif err:
@@
-259,7
+259,7
@@
def commandResult(username, state, fields):
elif action == 'Power off':
out, err = remctl('control', machine.name, 'destroy', err=True)
if err:
elif action == 'Power off':
out, err = remctl('control', machine.name, 'destroy', err=True)
if err:
- if re.match("Error: Domain '.*' does not exist.", err):
+ if re.match("machine '.*' is not on", err):
raise InvalidInput("action", "Power off",
"Machine is not on.")
else:
raise InvalidInput("action", "Power off",
"Machine is not on.")
else:
@@
-269,7
+269,7
@@
def commandResult(username, state, fields):
elif action == 'Shutdown':
out, err = remctl('control', machine.name, 'shutdown', err=True)
if err:
elif action == 'Shutdown':
out, err = remctl('control', machine.name, 'shutdown', err=True)
if err:
- if re.match("Error: Domain '.*' does not exist.", err):
+ if re.match("machine '.*' is not on", err):
raise InvalidInput("action", "Shutdown",
"Machine is not on.")
else:
raise InvalidInput("action", "Shutdown",
"Machine is not on.")
else: