#NEWLINE# def remove_bbcp( cloud ) : #NEWLINE# #INDENT# '\n    Remove bbcp from the hosts were memorized in the hosts_with_bbcp variable.\n\n    :param cloud: object of a cloud\n    ' #NEWLINE# if ( cloud . position == 'src' ) : #NEWLINE# #INDENT# user = CONF . src . ssh_user #NEWLINE# sudo_password = CONF . src . ssh_sudo_password #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# user = CONF . dst . ssh_user #NEWLINE# sudo_password = CONF . dst . ssh_sudo_password #NEWLINE# #UNINDENT# LOG . info ( "Removing the bbcp files from hosts of '%s' cloud: %s" , cloud . position , cloud . hosts_with_bbcp ) #NEWLINE# cmd = 'rm -f {path}' #NEWLINE# for host in cloud . hosts_with_bbcp : #NEWLINE# #INDENT# runner = remote_runner . RemoteRunner ( host , user , password = sudo_password , sudo = True ) #NEWLINE# runner . run_ignoring_errors ( cmd , path = BBCP_PATH )