-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpropertyreader.py
71 lines (53 loc) · 2.26 KB
/
propertyreader.py
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import configparser
config = configparser.ConfigParser()
config.read('quicksystem.properties')
class Properties(object):
"""quicksystem properties reader """
def __init__(self):
self.randomSystem = RandomSystem()
self.beaker = Beaker()
self.jenkinsInstaller = JenkinsInstaller()
self.theSystem = TheSystem()
self.contentHost = ContentHost()
self.mymail = Mymail()
self.logslevel = LogsLevel()
class RandomSystem(object):
"""random system reader"""
def __init__(self):
self.system_count = config.get('RandomSystem', 'system_count')
class Beaker(object):
"""beaker reader"""
def __init__(self):
self.username = config.get('Beaker', 'krb_username')
self.password = config.get('Beaker', 'krb_password')
self.hub = config.get('Beaker', 'beaker_url')
self.env_host_string = config.get('Beaker', 'env_host_string')
self.env_username = config.get('Beaker', 'env_username')
self.env_password = config.get('Beaker', 'env_password')
class JenkinsInstaller(object):
"""Jenkins Installer reader"""
def __init__(self):
self.satellite_distribution = config.get('JenkinsInstaller', 'satellite_distribution')
self.satellite_version = config.get('JenkinsInstaller', 'satellite_version')
self.jenkins_url = config.get('JenkinsInstaller', 'jenkins_url')
self.jenkins_jobname = config.get('JenkinsInstaller', 'jenkins_jobname')
self.setup_fake_manifest_certificate = config.get('JenkinsInstaller',
'setup_fake_manifest_certificate')
class TheSystem(object):
"""theSystem reader"""
def __init__(self):
self.host = config.get('TheSystem', 'host')
self.distrotree = config.get('TheSystem', 'distrotree')
class ContentHost(object):
"""content host reader"""
def __init__(self):
self.host_count = config.get('ContentHost', 'host_count')
class Mymail(object):
"""Email reader"""
def __init__(self):
self.to_mail = config.get('Emails', 'to_mail')
self.from_mail = config.get('Emails', 'from_mail')
class LogsLevel(object):
"""Logs reader"""
def __init__(self):
self.level = config.get('Logs', 'level')