Merge "Fix PM_MAPPER_01 test - use a non-generic log"
[integration/csit.git] / tests / dcaegen2 / testcases / resources / robot_library / CertsLibrary.py
1
2 import os
3 import subprocess
4 import time
5
6 from robot.api import logger
7
8
9 class CertsLibrary(object):
10
11     def __init__(self):
12         pass
13
14
15
16     @staticmethod
17     def generate_certs():
18         ws = os.environ['WORKSPACE']
19         script2run = ws + "/tests/dcaegen2/testcases/resources/gen-certs.sh"
20         logger.info("Running script: " + script2run)
21         logger.console("Running script: " + script2run)
22         subprocess.call([script2run, ws])
23         time.sleep(5)
24         return
25
26     @staticmethod
27     def remove_certs():
28         ws = os.environ['WORKSPACE']
29         script2run = ws + "/tests/dcaegen2/testcases/resources/rm-certs.sh"
30         logger.info("Running script: " + script2run)
31         logger.console("Running script: " + script2run)
32         subprocess.call([script2run, ws])
33         time.sleep(5)
34         return
35
36
37
38
39
40
41
42