0e39248d8319163d92f32bd6e50580345cf7e3a5
[functest.git] / functest / opnfv_tests / features / doctor.py
1 #!/usr/bin/python
2 #
3 # Copyright (c) 2017 All rights reserved
4 # This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # 0.1: This script boots the VM1 and allocates IP address from Nova
11 # Later, the VM2 boots then execute cloud-init to ping VM1.
12 # After successful ping, both the VMs are deleted.
13 # 0.2: measure test duration and publish results under json format
14 #
15 #
16 import functest.core.feature as base
17 from functest.utils.constants import CONST
18
19
20 class Doctor(base.BashFeature):
21     def __init__(self, **kwargs):
22         repo = CONST.__getattribute__('dir_repo_doctor')
23         kwargs["cmd"] = 'cd %s/tests && ./run.sh' % repo
24         super(Doctor, self).__init__(**kwargs)