mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-25 14:42:22 +03:00
server conf parameters added to db and task bean
This commit is contained in:
parent
fc4aa05963
commit
ecc05da83b
2 changed files with 10 additions and 2 deletions
|
@ -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'])
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue