added logic for a failed state..

This commit is contained in:
David Lenwell 2013-10-04 05:25:34 -07:00
parent c83e9bd7be
commit 67bb1ab8b7
1 changed files with 9 additions and 4 deletions

View File

@ -22,7 +22,6 @@ from textwrap import dedent
from sqlalchemy.exc import IntegrityError
from refstack.models import *
def add(args):
"""adds a cloud
@ -104,6 +103,11 @@ def start(args):
# creat a new test
print 'Adding a new test.'
test = Test(args.cloud_id)
test.congif =
db.add(test)
# TODO tie in config generation here
@ -127,11 +131,12 @@ def start(args):
print 'status is: %s' % test_status.message
if test_status.message == 'stalled':
if test_status.message in ('stalled','failed'):
# stalled: clean up , trigger clean start new test run
print 'im stalled and need to be kicked'
print 'Test has stalled or failed and needs to be kicked'
status(args)
elif test_status.message in ('finished','new','canceled'):
elif test_status.message in ('ready','finished','new','canceled'):
#finished, new, canceled: trigger clean start new test run
print 'start clean and run'
test_status = TestStatus(test.id, 'running')