def _submit_bundle(cmd_args, app):
sac = streamsx.rest.StreamingAnalyticsConnection(service_name=cmd_args.service_name)<EOL>sas = sac.get_streaming_analytics()<EOL>sr = sas.submit_job(bundle=app.app, job_config=app.cfg[ctx.ConfigParams.JOB_CONFIG])<EOL>if '<STR_LIT>' in sr:<EOL><INDENT>rc = <NUM_LIT:1><EOL><DEDENT>elif '<STR_LIT>' in sr:<EOL><INDENT>try:<EOL><INDENT>rc = <NUM_LIT:0> if int(sr['<STR_LIT>'] == <NUM_LIT:200>) else <NUM_LIT:1><EOL><DEDENT>except:<EOL><INDENT>rc = <NUM_LIT:1><EOL><DEDENT><DEDENT>elif '<STR_LIT:id>' in sr or '<STR_LIT>' in sr:<EOL><INDENT>rc = <NUM_LIT:0><EOL><DEDENT>sr['<STR_LIT>'] = rc<EOL>return sr<EOL>
Submit an existing bundle to the service