@@ -77,27 +77,46 @@ def remote_module_files_cp(
7777 remote_module_files = []
7878 if local_module_files is not None :
7979 for local_module_file in local_module_files :
80- remote_module_file = "{}/{}" .format (
81- remote_module_file_dir , os .path .basename (local_module_file )
82- )
83- # copy the module to the DB machine
84- copy_file_to_remote_setup (
85- server_public_ip ,
86- username ,
87- private_key ,
88- local_module_file ,
89- remote_module_file ,
90- None ,
91- port ,
92- )
93- execute_remote_commands (
94- server_public_ip ,
95- username ,
96- private_key ,
97- ["chmod 755 {}" .format (remote_module_file )],
98- port ,
99- )
100- remote_module_files .append (remote_module_file )
80+
81+ splitted_module_and_plugins = local_module_file .split (" " )
82+ if len (splitted_module_and_plugins ) > 1 :
83+ logging .info (
84+ "Detected a module and plugin(s) pairs {}" .format (
85+ splitted_module_and_plugins
86+ )
87+ )
88+ abs_splitted_module_and_plugins = [
89+ os .path .abspath (x ) for x in splitted_module_and_plugins
90+ ]
91+ remote_module_files_in = ""
92+ for pos , local_module_file_and_plugin in enumerate (
93+ abs_splitted_module_and_plugins , start = 1
94+ ):
95+ remote_module_file = "{}/{}" .format (
96+ remote_module_file_dir ,
97+ os .path .basename (local_module_file_and_plugin ),
98+ )
99+ # copy the module to the DB machine
100+ copy_file_to_remote_setup (
101+ server_public_ip ,
102+ username ,
103+ private_key ,
104+ local_module_file_and_plugin ,
105+ remote_module_file ,
106+ None ,
107+ port ,
108+ )
109+ execute_remote_commands (
110+ server_public_ip ,
111+ username ,
112+ private_key ,
113+ ["chmod 755 {}" .format (remote_module_file )],
114+ port ,
115+ )
116+ if pos > 1 :
117+ remote_module_files_in = remote_module_files_in + " "
118+ remote_module_files_in = remote_module_files_in + remote_module_file
119+ remote_module_files .append (remote_module_files_in )
101120 return remote_module_files
102121
103122
0 commit comments