#NEWLINE# def _build_execution_context( self , pipeline ) : #NEWLINE# #INDENT# ctx = self . _get_context_from_last_execution ( pipeline ) #NEWLINE# if ( ctx is not None ) : #NEWLINE# #INDENT# return ctx #NEWLINE# #UNINDENT# ctx = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# kc = self . _clients . keystone ( ) #NEWLINE# ctx [ 'heat_service_url' ] = kc . client . service_catalog . url_for ( service_type = 'orchestration' , endpoint_type = 'publicURL' ) #NEWLINE# ctx [ 'build_service_url' ] = kc . client . service_catalog . url_for ( service_type = 'image_builder' , endpoint_type = 'publicURL' ) #NEWLINE# plan_obj = objects . registry . Plan . get_by_id ( self . context , arti . plan_id ) #NEWLINE# ctx [ 'name' ] = plan_obj . name #NEWLINE# artifacts = plan_obj . raw_content . get ( 'artifacts' , [ ] ) #NEWLINE# for arti in artifacts : #NEWLINE# #INDENT# ctx [ 'source_uri' ] = arti [ 'content' ] [ 'href' ] #NEWLINE# ctx [ 'base_image_id' ] = arti . get ( 'language_pack' , 'auto' ) #NEWLINE# ctx [ 'source_format' ] = arti . get ( 'artifact_type' , 'heroku' ) #NEWLINE# ctx [ 'image_format' ] = arti . get ( 'image_format' , CONF . api . image_format ) #NEWLINE# #UNINDENT# ctx [ 'template' ] = catalog . get ( 'templates' , 'basic' ) #NEWLINE# ctx [ 'parameters' ] = { #NEWLINE# #INDENT# 'app_name' : pipeline . name , #NEWLINE# #UNINDENT# } #NEWLINE# ctx [ 'parameters' ] . update ( heat_utils . get_network_parameters ( self . _clients ) ) #NEWLINE# ctx [ 'stack_id' ] = self . _create_empty_stack ( pipeline ) #NEWLINE# ctx [ 'stack_name' ] = pipeline . name #NEWLINE# return ctx