#NEWLINE# @ classmethod #NEWLINE# def message( cls , task , images_data ) : #NEWLINE# #INDENT# files = [ ] #NEWLINE# for ( image_path , image_data ) in six . iteritems ( images_data ) : #NEWLINE# #INDENT# file_name = os . path . basename ( six . moves . urllib . parse . urlsplit ( image_data [ 'uri' ] ) . path ) #NEWLINE# files . append ( os . path . join ( settings . PROVISIONING_IMAGES_PATH , file_name ) ) #NEWLINE# if ( image_path == '/' ) : #NEWLINE# #INDENT# yaml_name = '{0}.{1}' . format ( file_name . split ( '.' ) [ 0 ] , 'yaml' ) #NEWLINE# files . append ( os . path . join ( settings . PROVISIONING_IMAGES_PATH , yaml_name ) ) #NEWLINE# #UNINDENT# #UNINDENT# task_params = { #NEWLINE# #INDENT# 'parameters' : { #NEWLINE# #INDENT# 'cmd' : 'rm -f {0}' . format ( ' ' . join ( files ) ) , #NEWLINE# 'timeout' : settings . REMOVE_IMAGES_TIMEOUT , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# rpc_message = make_astute_message ( task , 'execute_tasks' , 'remove_images_resp' , { #NEWLINE# #INDENT# 'tasks' : [ tasks_templates . make_shell_task ( [ consts . MASTER_NODE_UID ] , task_params ) ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# return rpc_message