@@ -23,7 +23,7 @@ class InstallAllFromInventory(WorkflowImpl):
23
23
version : int = 1
24
24
description : str = 'Install all devices from device inventory or by label'
25
25
labels : list [str ] = ['INVENTORY' ]
26
- timeout_seconds = 3600
26
+ timeout_seconds : int = 3600
27
27
28
28
class WorkflowInput (WorkflowImpl .WorkflowInput ):
29
29
labels : WorkflowInputField = WorkflowInputField (
@@ -42,15 +42,19 @@ def workflow_builder(self, workflow_inputs: WorkflowInput) -> None:
42
42
name = InventoryService .InventoryGetLabelsId ,
43
43
task_reference_name = 'get_labels' ,
44
44
input_parameters = SimpleTaskInputParameters (
45
- labels = workflow_inputs .labels .wf_input
45
+ root = dict (
46
+ labels = workflow_inputs .labels .wf_input
47
+ )
46
48
)
47
49
)
48
50
49
51
get_pages_cursors = SimpleTask (
50
52
name = InventoryService .InventoryGetPagesCursors ,
51
53
task_reference_name = 'get_pages_cursors' ,
52
54
input_parameters = SimpleTaskInputParameters (
53
- labels = get_labels .output_ref ('labels_id' )
55
+ root = dict (
56
+ labels = get_labels .output_ref ('labels_id' )
57
+ )
54
58
)
55
59
)
56
60
@@ -68,8 +72,10 @@ def workflow_builder(self, workflow_inputs: WorkflowInput) -> None:
68
72
name = InventoryService .InventoryGetPagesCursorsForkTasks ,
69
73
task_reference_name = 'get_pages_cursors_fork_task' ,
70
74
input_parameters = SimpleTaskInputParameters (
71
- task = InventoryService .InventoryInstallInBatch ().WorkerDefinition ().name ,
72
- cursors_groups = convert_to_string .output_ref ('result' ),
75
+ root = dict (
76
+ task = InventoryService .InventoryInstallInBatch ().WorkerDefinition ().name ,
77
+ cursors_groups = convert_to_string .output_ref ('result' )
78
+ )
73
79
)
74
80
)
75
81
@@ -122,14 +128,14 @@ def workflow_builder(self, workflow_inputs: WorkflowInput) -> None:
122
128
123
129
self .output_parameters = self .WorkflowOutput (
124
130
response_body = join_results .output_ref ('result.output' )
125
- ).dict ()
131
+ ).model_dump ()
126
132
127
133
class InstallInBatch (WorkflowImpl ):
128
134
name : str = 'INVENTORY_install_in_batch'
129
135
version : int = 1
130
136
description : str = 'Install devices in batch'
131
137
labels : list [str ] = ['INVENTORY' ]
132
- timeout_seconds = 3600
138
+ timeout_seconds : int = 3600
133
139
134
140
class WorkflowInput (WorkflowImpl .WorkflowInput ):
135
141
devices : WorkflowInputField = WorkflowInputField (
@@ -148,7 +154,9 @@ def workflow_builder(self, workflow_inputs: WorkflowInput) -> None:
148
154
name = InventoryService .InventoryInstallInBatch ,
149
155
task_reference_name = 'install_in_batch' ,
150
156
input_parameters = SimpleTaskInputParameters (
151
- devices = workflow_inputs .devices .wf_input
157
+ root = dict (
158
+ devices = workflow_inputs .devices .wf_input
159
+ )
152
160
)
153
161
)
154
162
)
@@ -158,7 +166,7 @@ class UninstallAllFromInventory(WorkflowImpl):
158
166
version : int = 1
159
167
description : str = 'Uninstall all devices from device inventory or by label'
160
168
labels : list [str ] = ['INVENTORY' ]
161
- timeout_seconds = 3600
169
+ timeout_seconds : int = 3600
162
170
163
171
class WorkflowInput (WorkflowImpl .WorkflowInput ):
164
172
labels : WorkflowInputField = WorkflowInputField (
@@ -177,15 +185,19 @@ def workflow_builder(self, workflow_inputs: WorkflowInput) -> None:
177
185
name = InventoryService .InventoryGetLabelsId ,
178
186
task_reference_name = 'get_labels' ,
179
187
input_parameters = SimpleTaskInputParameters (
180
- labels = workflow_inputs .labels .wf_input
188
+ root = dict (
189
+ labels = workflow_inputs .labels .wf_input
190
+ )
181
191
)
182
192
)
183
193
184
194
get_pages_cursors = SimpleTask (
185
195
name = InventoryService .InventoryGetPagesCursors ,
186
196
task_reference_name = 'get_pages_cursors' ,
187
197
input_parameters = SimpleTaskInputParameters (
188
- labels = get_labels .output_ref ('labels_id' )
198
+ root = dict (
199
+ labels = get_labels .output_ref ('labels_id' )
200
+ )
189
201
)
190
202
)
191
203
@@ -203,8 +215,10 @@ def workflow_builder(self, workflow_inputs: WorkflowInput) -> None:
203
215
name = InventoryService .InventoryGetPagesCursorsForkTasks ,
204
216
task_reference_name = 'get_pages_cursors_fork_task' ,
205
217
input_parameters = SimpleTaskInputParameters (
206
- task = 'INVENTORY_uninstall_in_batch' ,
207
- cursors_groups = convert_to_string .output_ref ('result' ),
218
+ root = dict (
219
+ task = 'INVENTORY_uninstall_in_batch' ,
220
+ cursors_groups = convert_to_string .output_ref ('result' )
221
+ )
208
222
)
209
223
)
210
224
@@ -257,14 +271,14 @@ def workflow_builder(self, workflow_inputs: WorkflowInput) -> None:
257
271
258
272
self .output_parameters = self .WorkflowOutput (
259
273
response_body = join_results .output_ref ('result.output' )
260
- ).dict ()
274
+ ).model_dump ()
261
275
262
276
class UninstallInBatch (WorkflowImpl ):
263
277
name : str = 'INVENTORY_uninstall_in_batch'
264
278
version : int = 1
265
279
description : str = 'Uninstall devices in batch'
266
280
labels : list [str ] = ['INVENTORY' ]
267
- timeout_seconds = 3600
281
+ timeout_seconds : int = 3600
268
282
269
283
class WorkflowInput (WorkflowImpl .WorkflowInput ):
270
284
devices : WorkflowInputField = WorkflowInputField (
@@ -283,7 +297,9 @@ def workflow_builder(self, workflow_inputs: WorkflowInput) -> None:
283
297
name = InventoryService .InventoryUninstallInBatch ,
284
298
task_reference_name = 'uninstall_in_batch' ,
285
299
input_parameters = SimpleTaskInputParameters (
286
- devices = workflow_inputs .devices .wf_input
300
+ root = dict (
301
+ devices = workflow_inputs .devices .wf_input
302
+ )
287
303
)
288
304
)
289
305
)
0 commit comments