def __init__(): global logger, submitter, queue_exception, queue_threading logger = logging.getLogger("submitter."+__name__) submitter = SubmitterEngine() queue_exception = queue.Queue() queue_threading = queue.Queue() thread = threading.Thread(target=threads_management) thread.start()
def test_input_file_path(self): logging.debug( "--------------------------------------------------------------------------------------------------------------------------------------" ) logging.debug("test_input_file_path") logging.debug( "--------------------------------------------------------------------------------------------------------------------------------------" ) logging.debug("{}".format(__name__)) result = SubmitterEngine().launch(path_to_file=self.file_path) logging.debug("\n\n\n")
def test_input_url_path(self): logging.debug("\n\n\n") logging.debug( "--------------------------------------------------------------------------------------------------------------------------------------" ) logging.debug("test_input_url_path") logging.debug( "--------------------------------------------------------------------------------------------------------------------------------------" ) result = SubmitterEngine().launch(path_to_file=self.url_path) logging.debug("\n\n\n")
def test_parsed_params_file_path(self): logging.debug( "--------------------------------------------------------------------------------------------------------------------------------------" ) logging.debug("test_parsed_params_file_path") logging.debug( "--------------------------------------------------------------------------------------------------------------------------------------" ) logging.debug("{}".format(__name__)) result = SubmitterEngine().launch(path_to_file=self.url_path, parse_params=self.parsed_params) logging.debug("\n\n\n")
def test_wrong_arg(self): logging.debug( "--------------------------------------------------------------------------------------------------------------------------------------" ) logging.debug("test_wrong_arg") logging.debug( "--------------------------------------------------------------------------------------------------------------------------------------" ) logging.debug("{}".format(__name__)) self.assertRaises(KeyError, SubmitterEngine().launch(), path_of_file=self.url_path) logging.debug("\n\n\n")
def __init__(): global logger, submitter logger = logging.getLogger("submitter." + __name__) submitter = SubmitterEngine()
"-t", required=True, help="path or url of the template") update.add_argument( "--params", "-p", required=False, help="dictionary contianing the inputs that need to be modified") undeploy.set_defaults(which='undeploy') undeploy.add_argument("-id", required=True, help="ID of the topology that needs to be updated") args = parser.parse_args() submitter = SubmitterEngine() print(args) if args.which is "launch": if args.params: submitter.launch(path_to_file=args.template, parsed_params=ast.literal_eval(args.params)) else: submitter.launch(path_to_file=args.template) elif args.which is "update": if args.params: submitter.update(id_app=args.id, path_to_file=args.template, parsed_params=ast.literal_eval(args.params)) else: submitter.update(id_app=args.id, path_to_file=args.template) elif args.which is "undeploy":