diff --git a/opt/ahenk/base/database/AhenkDbService.py b/opt/ahenk/base/database/AhenkDbService.py index c15c20b..79f2cef 100644 --- a/opt/ahenk/base/database/AhenkDbService.py +++ b/opt/ahenk/base/database/AhenkDbService.py @@ -25,7 +25,7 @@ class AhenkDbService(object): def initialize_table(self): - self.check_and_create_table('task', ['id INTEGER', 'create_date TEXT', 'modify_date TEXT', 'command_cls_id TEXT', 'parameter_map BLOB', 'deleted INTEGER', 'plugin TEXT', 'cron_expr TEXT']) + self.check_and_create_table('task', ['id INTEGER', 'create_date TEXT', 'modify_date TEXT', 'command_cls_id TEXT', 'parameter_map BLOB', 'deleted INTEGER', 'plugin TEXT', 'cron_expr TEXT','file_server TEXT']) self.check_and_create_table('policy', ['id INTEGER PRIMARY KEY AUTOINCREMENT', 'type TEXT', 'version TEXT', 'name TEXT', 'execution_id TEXT']) self.check_and_create_table('profile', ['id INTEGER', 'create_date TEXT', 'label TEXT', 'description TEXT', 'overridable INTEGER', 'active TEXT', 'deleted TEXT', 'profile_data TEXT', 'modify_date TEXT', 'plugin TEXT']) self.check_and_create_table('plugin', ['id INTEGER PRIMARY KEY AUTOINCREMENT', 'active TEXT', 'create_date TEXT', 'deleted TEXT', 'description TEXT', 'machine_oriented TEXT', 'modify_date TEXT', 'name TEXT', 'policy_plugin TEXT', 'user_oriented TEXT', 'version TEXT', 'task_plugin TEXT', 'x_based TEXT']) diff --git a/opt/ahenk/base/model/TaskBean.py b/opt/ahenk/base/model/TaskBean.py index 24fca81..4574172 100644 --- a/opt/ahenk/base/model/TaskBean.py +++ b/opt/ahenk/base/model/TaskBean.py @@ -7,7 +7,7 @@ class TaskBean(object): """docstring for TaskBean""" - def __init__(self, _id=None, create_date=None, modify_date=None, command_cls_id=None, parameter_map=None, deleted=None, plugin=None, cron_str=None): + def __init__(self, _id=None, create_date=None, modify_date=None, command_cls_id=None, parameter_map=None, deleted=None, plugin=None, cron_str=None, file_server=None): self._id = _id self.create_date = create_date self.modify_date = modify_date @@ -16,6 +16,7 @@ class TaskBean(object): self.deleted = deleted self.plugin = plugin self.cron_str = cron_str + self.file_server = file_server def get_id(self): return self._id @@ -65,6 +66,12 @@ class TaskBean(object): def set_cron_str(self, cron_str): self.cron_str = cron_str + def get_file_server(self): + return self.file_server + + def set_file_server(self, file_server): + self.file_server = file_server + def to_json(self): plugin_data = {} plugin_data['id'] = self.plugin.get_id() @@ -90,6 +97,7 @@ class TaskBean(object): task_data['cronExpression'] = self.cron_str task_data['createDate'] = self.create_date task_data['modifyDate'] = self.modify_date + task_data['fileServerConf'] = self.file_server return task_data @property