blob: b81894228198a43c269608c5ae4fcfd6f2b73f29 [file] [log] [blame]
Aleksandra Maciagaa73f9a52019-11-20 12:14:44 +01001
2import os
3import subprocess
4import time
5
6from robot.api import logger
7
8
9class 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