Added config files as part of registration

Change-Id: I3b885cc8b2358bed3d0b7dc94ee5e76fee348535
This commit is contained in:
Kanagaraj Manickam 2016-03-23 18:03:30 +05:30
parent f2364c4b2d
commit 483824880f
1 changed files with 15 additions and 2 deletions

View File

@ -39,10 +39,17 @@ class RegistrationInfo(object):
self.prog_name = prog_name
self.pid = pid
self.config_file_list = config_file_list or list()
self.config_file_dict = self.get_config_files()
# List of configuration which CONF is already updated with
self.config_dict = config_dict or dict()
def get_config_files(self):
files = {}
for f in self.config_file_list:
files[f] = open(f).read()
return files
class Config(object):
def __init__(self,
@ -169,7 +176,13 @@ if __name__ == '__main__':
project,
version=VERSION)
def read_confs():
r = RegistrationInfo('', '', '',
config_file_list=['/etc/nova/nova.conf'])
print (r.get_config_files())
init_log()
init_conf('test-run')
print (register_myself())
# print (register_myself())
read_confs()