aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dcaegen2/testcases/resources/CertsLibrary.py
blob: b81894228198a43c269608c5ae4fcfd6f2b73f29 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import os
import subprocess
import time

from robot.api import logger


class CertsLibrary(object):

    def __init__(self):
        pass



    @staticmethod
    def generate_certs():
        ws = os.environ['WORKSPACE']
        script2run = ws + "/tests/dcaegen2/testcases/resources/gen-certs.sh"
        logger.info("Running script: " + script2run)
        logger.console("Running script: " + script2run)
        subprocess.call([script2run, ws])
        time.sleep(5)
        return

    @staticmethod
    def remove_certs():
        ws = os.environ['WORKSPACE']
        script2run = ws + "/tests/dcaegen2/testcases/resources/rm-certs.sh"
        logger.info("Running script: " + script2run)
        logger.console("Running script: " + script2run)
        subprocess.call([script2run, ws])
        time.sleep(5)
        return