summaryrefslogtreecommitdiffstats
path: root/tests/main.py
diff options
context:
space:
mode:
authordongwenjuan <dong.wenjuan@zte.com.cn>2017-05-10 15:21:38 +0800
committerwenjuan dong <dong.wenjuan@zte.com.cn>2017-07-07 06:18:42 +0000
commit183dee7dc0d1c5086ad5d919b7eba955d1d011e9 (patch)
tree79a1031e47f68a55df6a4e6934f442f9a706b309 /tests/main.py
parent2e35513b691b0319b96182c5d9c39e4ab1a97552 (diff)
Add create instances
JIRA: DOCTOR-93 Change-Id: I7645c1cc0c76ff86b9fbcc01c19038469fc9b9b4 Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
Diffstat (limited to 'tests/main.py')
-rw-r--r--tests/main.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/main.py b/tests/main.py
index bb2c912d..540a9244 100644
--- a/tests/main.py
+++ b/tests/main.py
@@ -12,9 +12,10 @@ import sys
import config
from image import Image
+from instance import Instance
import logger as doctor_log
from user import User
-
+from network import Network
LOG = doctor_log.Logger('doctor').getLogger()
@@ -25,6 +26,8 @@ class DoctorTest(object):
self.conf = conf
self.image = Image(self.conf, LOG)
self.user = User(self.conf, LOG)
+ self.network = Network(self.conf, LOG)
+ self.instance = Instance(self.conf, LOG)
def setup(self):
# prepare the cloud env
@@ -36,6 +39,11 @@ class DoctorTest(object):
self.user.create()
self.user.update_quota()
+ # creating VM...
+ self.network.create()
+ self.instance.create()
+ self.instance.wait_for_vm_launch()
+
def run(self):
"""run doctor test"""
try:
@@ -54,6 +62,8 @@ class DoctorTest(object):
self.cleanup()
def cleanup(self):
+ self.instance.delete()
+ self.network.delete()
self.image.delete()
self.user.delete()