#NEWLINE# def get_planfile( git_uri , app_name , cmd , public ) : #NEWLINE# #INDENT# plan_dict = dict . copy ( PLAN_TEMPLATE ) #NEWLINE# plan_dict [ 'name' ] = app_name #NEWLINE# plan_dict [ 'description' ] = git_uri #NEWLINE# arti = { #NEWLINE# #INDENT# 'name' : 'chef' , #NEWLINE# 'artifact_type' : 'chef' , #NEWLINE# 'content' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# 'language_pack' : 'auto' , #NEWLINE# #UNINDENT# } #NEWLINE# arti [ 'content' ] [ 'href' ] = git_uri #NEWLINE# if ( not public ) : #NEWLINE# #INDENT# arti [ 'content' ] [ 'private' ] = True #NEWLINE# #UNINDENT# arti [ 'unittest_cmd' ] = cmd #NEWLINE# plan_dict [ 'artifacts' ] . append ( arti ) #NEWLINE# for arti in plan_dict [ 'artifacts' ] : #NEWLINE# #INDENT# arti [ 'status_token' ] = _get_token ( arti [ 'content' ] [ 'href' ] ) #NEWLINE# #UNINDENT# plan_file = tempfile . NamedTemporaryFile ( suffix = '.yaml' , prefix = 'solum_' , delete = False ) #NEWLINE# plan_file . write ( yaml . dump ( plan_dict , default_flow_style = False ) ) #NEWLINE# plan_file_name = plan_file . name #NEWLINE# plan_file . close ( ) #NEWLINE# return plan_file_name