def main(**kwargs): """ 获取系统及配置 安装 操作系统 返回 ip port user password :param kwargs: is dict type :return: <bool> , <message> ,(ip port user password) """ logging.info("start install os") logging.warning("ok") logging.info("test") print("**kwargs") print("test module is running...") print(ping()) print("kwargs", kwargs) print(kwargs["os"]) print(kwargs["cpu_num"]) print(kwargs["mem_gb"]) print(kwargs["disk_gb"]) ping() # get install os result ip = "127.0.0.1" port = 22 user = "******" passwd = "test" ret_dict_data = {"ip": ip, "port": port, "user": user, "passwd": passwd} logging.info("end install os") return True, "ok", ret_dict_data
def main(**kwargs): """ run test method :param kwargs: is dict type :return: <bool> , <message> """ logging.info("notice start") logging.warning("ok") logging.info("test") instance = kwargs["sys_taskflow_instance"] flow_name = instance["title"] flow_description = instance["description"] creator = instance["creator"] # sample module task ping() logging.info("hi, %s, 你的流程:%s-%s ,已经顺利完成", creator, flow_name, flow_description) logging.info("notice end")
def test_main(**kwargs): kwargs["ip"] = "127.0.0.1" kwargs["port"] = 22 kwargs["user"] = "******" kwargs["password"] = "******" ######################################## print("kwargs", kwargs) print(kwargs["ip"]) print(kwargs["port"]) print(kwargs["user"]) print(kwargs["password"]) print("ssh server") ping() print("config data") print("install monitor script") print("change root password to random") return True
def test_main(**kwargs): kwargs["os"] = "centos 8.0" kwargs["cpu_num"] = 8 kwargs["mem_gb"] = 24 kwargs["disk_gb"] = 100 print("kwargs", kwargs) print(kwargs["os"]) print(kwargs["cpu_num"]) print(kwargs["mem_gb"]) print(kwargs["disk_gb"]) ping() # get install os result ip = "127.0.0.1" port = 22 user = "******" passwd = "test" ret_dict_data = {"ip": ip, "port": port, "user": user, "passwd": passwd} return True, "ok", ret_dict_data
def main(**kwargs): """ 获取系统及配置 安装 操作系统 返回 ip port user password :param kwargs: is dict type :return: <bool> , <message> ,(ip port user password) """ logging.info("start init os config") print("kwargs", kwargs) print(kwargs["ip"]) print(kwargs["port"]) print(kwargs["user"]) print(kwargs["password"]) print("ssh server") ping() print("config data") print("install monitor script") print("change root password to random") logging.info("end init os config") return True
def test_main(**kwargs): """ 用于测试的main 函数 :param kwargs: :return: """ instance = kwargs["sys_taskflow_instance"] # set demo instance["title"] = "hello" instance["description"] = "test" instance["creator"] = "jiangxf" ##################################### logging.warning("ok") logging.info("test") flow_name = instance["title"] flow_description = instance["description"] creator = instance["creator"] # sample module task ping() logging.info("hi, %s, 你的流程:%s-%s ,已经顺利完成", creator, flow_name, flow_description)
def main(**kwargs): """ run test method :param kwargs: is dict type :return: <bool> , <message> """ logging.info("demo start") logging.warning("ok") logging.info("test") print("**kwargs") print(kwargs["id"]) print("test module is running...") print(ping()) logging.info("demo end") return True, "ok"
def test_main(**kwargs): """ 仅仅用于测试的方式运行 :param kwargs: :return: """ kwargs["id"] = 8 print("kwargs data:", kwargs) logging.warning("ok") logging.info("test") print("**kwargs") print(kwargs["id"]) print("test module is running...") print(ping()) return True, "ok"