aboutsummaryrefslogtreecommitdiffstats
path: root/qtip/runner/project.py
blob: 90d1e079823bd7d1e0bc776db136974455b76bb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
##############################################################################
# Copyright (c) 2017 ZTE corp. and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

import os


def convert(vals):
    if vals:
        return " ".join(vals)


def setup(extra_val=None):
    os.system('ansible-playbook setup.yml {}'.format(convert(extra_val)))


def run(extra_val=None):
    os.system('ansible-playbook run.yml {}'.format(convert(extra_val)))


def teardown(extra_val=None):
    os.system('ansible-playbook teardown.yml {}'.format(convert(extra_val)))