@@ -80,30 +80,7 @@ def get_resource(self, filename):
8080
8181 return []
8282
83- def install_file_stub (self , target ):
84- """
85- Installs any data associated with the resource object that is going to be deployed from the **ecFlow** server.
86-
87- Parameters:
88- target(Deployment): The target deployment where the resource data should be installed.
89- """
90-
91- """
92- n.b. If a resource does not need to save data at deployment time, it should not do so (e.g. WebResource)
93- """
94- # Install path is for the suite, so we don't need to include the suite name
95- assert self .fullname .count ("/" ) > 1
96- subpath = self .fullname [self .fullname .find ("/" , 1 ) + 1 :]
97-
98- self ._server_filename = os .path .join (
99- target .files_install_path (), subpath , self .name
100- )
101-
102- super ().install_file_stub (target )
103-
104- self .save_data (target , self ._server_filename )
105-
106- def build_script (self ):
83+ def generate_script (self ):
10784 """
10885 Returns the installer script for the data resource.
10986
@@ -128,7 +105,7 @@ def build_script(self):
128105 for h in self ._hosts :
129106 lines += h .copy_file_to (self ._server_filename , self .location ()).split ("\n " )
130107
131- return lines
108+ return lines , []
132109
133110 def location (self ):
134111 """
@@ -206,9 +183,8 @@ class FileResource(Resource):
206183 """
207184
208185 def __init__ (self , name , hosts , source_file ):
209- self ._source = source_file
210-
211186 super ().__init__ (name , hosts )
187+ self ._server_filename = source_file
212188
213189 def md5 (self ):
214190 """
@@ -230,7 +206,7 @@ def data(self):
230206 The resource data.
231207 """
232208
233- with open (self ._source , "rb" ) as f :
209+ with open (self ._server_filename , "rb" ) as f :
234210 return f .read ()
235211
236212 def save_data (self , target , filename ):
0 commit comments