config file update

Change-Id: I50e18de5616ce383051a1f972ed538813dee09e5
This commit is contained in:
Kanagaraj Manickam 2016-04-14 16:18:57 +05:30
parent 510b6d1b49
commit ae139d5540
2 changed files with 11 additions and 0 deletions

View File

@ -94,6 +94,10 @@ class ConductorAPI(object):
identification=identification,
dieing=dieing)
@wrapper_function
def update_config_file(self, context, identification, name, content):
self.mgr._update_config_file(identification, name, content)
def manage_me(self):
self.server.start()

View File

@ -262,6 +262,13 @@ def ping_me(id_):
return id_
def update_config_file(id_, name, content):
# TODO(mrkanag) backup the existing file
with open(name, 'w') as file:
file.write(content)
logger.info("*** CONF FILE [%s] UPDATE [%s] DONE. ***" % (name, id_))
def add_config(config):
pass