
Adding a config file for security related items. Only item to start is dns name. Change-Id: Ia55060198c705fdd0c9114aba199857d8196beb5
28 lines
578 B
Python
28 lines
578 B
Python
import json5
|
|
|
|
|
|
class SecurityConfig:
|
|
"""
|
|
Class to hold configuration for Security tests
|
|
"""
|
|
|
|
def __init__(self, config):
|
|
|
|
try:
|
|
json_data = open(config)
|
|
except FileNotFoundError:
|
|
print(f"Could not find the security config file: {config}")
|
|
raise
|
|
|
|
security_dict = json5.load(json_data)
|
|
self.dns_name = security_dict["dns_name"]
|
|
|
|
def get_dns_name(self) -> str:
|
|
"""
|
|
Getter for the dns name
|
|
|
|
Returns:
|
|
str: the dns name
|
|
"""
|
|
return self.dns_name
|