1 """
2 This file contains the API for the PilotData Framework.
3 """
4
6 """ B{PilotDataDescription (PDD).}
7
8 Dictionary based description containing reference to resource for Pilot Data.
9
10 Example::
11
12 {
13 'service_url': "ssh://localhost/tmp/pilotstore/",
14 'size':100,
15
16 # Affinity
17 'affinity_datacenter_label', # pilot stores sharing the same label are located in the same data center
18 'affinity_machine_label', # pilot stores sharing the same label are located on the same machine
19 }
20
21 Alternatively, a regular Python dictionary can be used.
22 """
23
26
27
30
31
34
35
36
38 """ B{PilotData (PD)}. """
39
40
41 __slots__ = (
42 'id',
43 'description',
44 'context',
45 'resource_url',
46 'state',
47 'state_detail',
48 )
49
51 raise NotImplementedError("Abstract super class, please use PilotData implementation class in pilot namespace")
52
53
55 """ Cancel PilotData
56
57 Keyword arguments:
58 None
59 """
60 pass
61
62
65
66
67
68
70 """ B{PilotDataService (PDS).} """
71
72
73 __slots__ = (
74 'id',
75 'state',
76 'pilot_data'
77 )
78
80 """ Create a PilotDataService
81
82 Keyword arguments:
83 pss_id -- restore from pss_id
84 """
85 raise NotImplementedError("Abstract super class, please use PilotDataService implementation class in pilot namespace")
86
87
89 """ Create a PilotData
90
91 Keyword arguments:
92 pilot_data_description -- PilotData Description
93
94 Return value:
95 A PilotData handle
96 """
97 pass
98
100 """ List all PDs of PDS """
101 pass
102
104 """ Cancel the PilotDataService.
105
106 Keyword arguments:
107 None
108
109 Return value:
110 Result of operation
111 """
112 pass
113
114
115
116
117
119 """ B{DataUnitService (DUS).}
120
121 Please use ComputeDataService
122 """
123
125 """ Create a DataUnitService.
126
127 Keyword arguments:
128 pds_id -- Reconnect to an existing DataUnitService
129 """
130 raise NotImplementedError("Abstract super class, please use DataUnitService implementation class in pilot namespace")
131
132
134 """ Add a PilotDataService
135
136 Keyword arguments:
137 pss -- The PilotDataService to add.
138
139 Return:
140 Result
141 """
142 pass
143
145 """ Remove a PilotDataService
146
147
148 Keyword arguments:
149 pss -- The PilotDataService to remove
150 Return:
151 Result
152 """
153 pass
154
155
157 """ List all PDs of PDS """
158 pass
159
160
162 """ Create Pilot Data object and schedule it to a Pilot Data """
163 pass
164
165
167 """ Cancel the PDS.
168
169 Keyword arguments:
170 None
171
172 Return:
173 Result
174 """
175 pass
176
177
180
181
184
185
186
187
189 """ B{DataUnitDescription (DUD).}
190
191 Description object for the creation of L{DataUnit}s::
192
193 {
194 'file_urls': [file1, file2, file3]
195 }
196
197 Currently, no directories supported
198 """
199
202
205
208
209
210
211
212
214 """ B{DataUnit (DU).}
215
216 Holds a set of files (that generally share the same locality and are used together).
217 """
218
219
220 __slots__ = (
221 'id',
222 'description',
223 'state',
224 'file_list'
225 )
226
228 """ Cancel the PD. """
229 raise NotImplementedError("Abstract super class, please use DataUnit implementation class in pilot namespace")
230
231
233 """
234 get current state of Pilot Data:
235 New => Initialized
236 Pending => Files are synchronized with a pilot store
237 Running => PD is in sync with all replicas
238 Done => Terminated
239 """
240 pass
241
242
244 """ Wait until in Running state
245 (or Failed state)
246 """
247 pass
248
249 - def export(self, target_directory):
250 """ copies content of PD to a directory on the local machine"""
251 pass
252