def launch_topology_server(cl_args, topology_file, topology_defn_file, topology_name):
service_apiurl = cl_args['<STR_LIT>'] + rest.ROUTE_SIGNATURES['<STR_LIT>'][<NUM_LIT:1>]<EOL>service_method = rest.ROUTE_SIGNATURES['<STR_LIT>'][<NUM_LIT:0>]<EOL>data = dict(<EOL>name=topology_name,<EOL>cluster=cl_args['<STR_LIT>'],<EOL>role=cl_args['<STR_LIT>'],<EOL>environment=cl_args['<STR_LIT>'],<EOL>user=cl_args['<STR_LIT>'],<EOL>)<EOL>Log.info("<STR_LIT>" + str(cl_args))<EOL>overrides = dict()<EOL>if '<STR_LIT>' in cl_args:<EOL><INDENT>overrides = config.parse_override_config(cl_args['<STR_LIT>'])<EOL><DEDENT>if overrides:<EOL><INDENT>data.update(overrides)<EOL><DEDENT>if cl_args['<STR_LIT>']:<EOL><INDENT>data["<STR_LIT>"] = True<EOL><DEDENT>files = dict(<EOL>definition=open(topology_defn_file, '<STR_LIT:rb>'),<EOL>topology=open(topology_file, '<STR_LIT:rb>'),<EOL>)<EOL>err_ctxt = "<STR_LIT>" % (topology_name, launch_mode_msg(cl_args))<EOL>succ_ctxt = "<STR_LIT>" % (topology_name, launch_mode_msg(cl_args))<EOL>try:<EOL><INDENT>r = service_method(service_apiurl, data=data, files=files)<EOL>ok = r.status_code is requests.codes.ok<EOL>created = r.status_code is requests.codes.created<EOL>s = Status.Ok if created or ok else Status.HeronError<EOL>if s is Status.HeronError:<EOL><INDENT>Log.error(r.json().get('<STR_LIT:message>', "<STR_LIT>" % r.status_code))<EOL><DEDENT>elif ok:<EOL><INDENT>print(r.json().get("<STR_LIT>"))<EOL><DEDENT><DEDENT>except (requests.exceptions.ConnectionError, requests.exceptions.HTTPError) as err:<EOL><INDENT>Log.error(err)<EOL>return SimpleResult(Status.HeronError, err_ctxt, succ_ctxt)<EOL><DEDENT>return SimpleResult(s, err_ctxt, succ_ctxt)<EOL>
Launch a topology given topology jar, its definition file and configurations
:param cl_args:
:param topology_file:
:param topology_defn_file:
:param topology_name:
:return: