def oracle_shutdown(tags,host,user,password): oper_type = '关闭oracle数据库' server_type = 'Oracle' task_id = uuid.uuid1() task_name = '%s:oracle_shutdow' %tags args = 'host:' + host + ',' + 'user:' + user + ',' + 'password:' + password tools.begin_task(task_id,oper_type,server_type,tags,task_name,args) oracle.oracle_shutdown(host,user,password) result = '' state = 'SUCCESS' tools.end_task(task_id,result,state)
def oracle_shutdown(tags, host, user, password, ssh_port, version): oper_type = '关闭oracle数据库' server_type = 'Oracle' task_id = uuid.uuid1() task_name = '%s:oracle_shutdow' % tags args = 'host:' + host + ',' + 'user:' + user + ',' + 'password:' + password + ', ' + \ 'ssh_port: ' + str(ssh_port) + ', ' + 'version: ' + version tools.begin_task(task_id, oper_type, server_type, tags, task_name, args) oracle.oracle_shutdown(host, user, password, ssh_port, version) result = '' state = 'SUCCESS' tools.end_task(task_id, result, state)