@@ -163,11 +163,11 @@ async def mock_retrieve_features(
163163 ) as respx_mock :
164164 if is_legacy :
165165 service_details = RunningDynamicServiceDetails .parse_obj (
166- RunningDynamicServiceDetails .Config . schema_extra ["examples" ][0 ]
166+ RunningDynamicServiceDetails .model_config [ "json_schema_extra" ] ["examples" ][0 ]
167167 )
168168 respx_mock .post (
169169 f"{ service_details .legacy_service_url } /retrieve" , name = "retrieve"
170- ).respond (json = RetrieveDataOutEnveloped .Config . schema_extra ["examples" ][0 ])
170+ ).respond (json = RetrieveDataOutEnveloped .model_config [ "json_schema_extra" ] ["examples" ][0 ])
171171
172172 yield respx_mock
173173 # no cleanup required
@@ -230,7 +230,7 @@ def mocked_director_v0_service_api(
230230 name = "running interactive service" ,
231231 ).respond (
232232 json = {
233- "data" : RunningDynamicServiceDetails .Config . schema_extra ["examples" ][0 ]
233+ "data" : RunningDynamicServiceDetails .model_config [ "json_schema_extra" ] ["examples" ][0 ]
234234 }
235235 )
236236
@@ -247,7 +247,7 @@ def get_stack_status(node_uuid: NodeID) -> RunningDynamicServiceDetails:
247247 raise DynamicSidecarNotFoundError (node_uuid )
248248
249249 return RunningDynamicServiceDetails .parse_obj (
250- RunningDynamicServiceDetails .Config . schema_extra ["examples" ][0 ]
250+ RunningDynamicServiceDetails .model_config [ "json_schema_extra" ] ["examples" ][0 ]
251251 )
252252
253253 module_base = "simcore_service_director_v2.modules.dynamic_sidecar.scheduler"
@@ -279,26 +279,26 @@ def remove_service(node_uuid: NodeID, *ars: Any, **kwargs: Any) -> None:
279279 [
280280 pytest .param (
281281 * ServiceParams (
282- service = DynamicServiceCreate .Config . schema_extra ["example" ],
283- service_labels = SimcoreServiceLabels .Config . schema_extra ["examples" ][0 ],
282+ service = DynamicServiceCreate .model_config [ "json_schema_extra" ] ["example" ],
283+ service_labels = SimcoreServiceLabels .model_config [ "json_schema_extra" ] ["examples" ][0 ],
284284 exp_status_code = status .HTTP_307_TEMPORARY_REDIRECT ,
285285 is_legacy = True ,
286286 ),
287287 id = "LEGACY" ,
288288 ),
289289 pytest .param (
290290 * ServiceParams (
291- service = DynamicServiceCreate .Config . schema_extra ["example" ],
292- service_labels = SimcoreServiceLabels .Config . schema_extra ["examples" ][1 ],
291+ service = DynamicServiceCreate .model_config [ "json_schema_extra" ] ["example" ],
292+ service_labels = SimcoreServiceLabels .model_config [ "json_schema_extra" ] ["examples" ][1 ],
293293 exp_status_code = status .HTTP_201_CREATED ,
294294 is_legacy = False ,
295295 ),
296296 id = "DYNAMIC" ,
297297 ),
298298 pytest .param (
299299 * ServiceParams (
300- service = DynamicServiceCreate .Config . schema_extra ["example" ],
301- service_labels = SimcoreServiceLabels .Config . schema_extra ["examples" ][2 ],
300+ service = DynamicServiceCreate .model_config [ "json_schema_extra" ] ["example" ],
301+ service_labels = SimcoreServiceLabels .model_config [ "json_schema_extra" ] ["examples" ][2 ],
302302 exp_status_code = status .HTTP_201_CREATED ,
303303 is_legacy = False ,
304304 ),
@@ -351,26 +351,26 @@ def test_create_dynamic_services(
351351 [
352352 pytest .param (
353353 * ServiceParams (
354- service = DynamicServiceCreate .Config . schema_extra ["example" ],
355- service_labels = SimcoreServiceLabels .Config . schema_extra ["examples" ][0 ],
354+ service = DynamicServiceCreate .model_config [ "json_schema_extra" ] ["example" ],
355+ service_labels = SimcoreServiceLabels .model_config [ "json_schema_extra" ] ["examples" ][0 ],
356356 exp_status_code = status .HTTP_307_TEMPORARY_REDIRECT ,
357357 is_legacy = True ,
358358 ),
359359 id = "LEGACY" ,
360360 ),
361361 pytest .param (
362362 * ServiceParams (
363- service = DynamicServiceCreate .Config . schema_extra ["example" ],
364- service_labels = SimcoreServiceLabels .Config . schema_extra ["examples" ][1 ],
363+ service = DynamicServiceCreate .model_config [ "json_schema_extra" ] ["example" ],
364+ service_labels = SimcoreServiceLabels .model_config [ "json_schema_extra" ] ["examples" ][1 ],
365365 exp_status_code = status .HTTP_200_OK ,
366366 is_legacy = False ,
367367 ),
368368 id = "DYNAMIC" ,
369369 ),
370370 pytest .param (
371371 * ServiceParams (
372- service = DynamicServiceCreate .Config . schema_extra ["example" ],
373- service_labels = SimcoreServiceLabels .Config . schema_extra ["examples" ][2 ],
372+ service = DynamicServiceCreate .model_config [ "json_schema_extra" ] ["example" ],
373+ service_labels = SimcoreServiceLabels .model_config [ "json_schema_extra" ] ["examples" ][2 ],
374374 exp_status_code = status .HTTP_200_OK ,
375375 is_legacy = False ,
376376 ),
@@ -409,26 +409,26 @@ def test_get_service_status(
409409 [
410410 pytest .param (
411411 * ServiceParams (
412- service = DynamicServiceCreate .Config . schema_extra ["example" ],
413- service_labels = SimcoreServiceLabels .Config . schema_extra ["examples" ][0 ],
412+ service = DynamicServiceCreate .model_config [ "json_schema_extra" ] ["example" ],
413+ service_labels = SimcoreServiceLabels .model_config [ "json_schema_extra" ] ["examples" ][0 ],
414414 exp_status_code = status .HTTP_307_TEMPORARY_REDIRECT ,
415415 is_legacy = True ,
416416 ),
417417 id = "LEGACY" ,
418418 ),
419419 pytest .param (
420420 * ServiceParams (
421- service = DynamicServiceCreate .Config . schema_extra ["example" ],
422- service_labels = SimcoreServiceLabels .Config . schema_extra ["examples" ][1 ],
421+ service = DynamicServiceCreate .model_config [ "json_schema_extra" ] ["example" ],
422+ service_labels = SimcoreServiceLabels .model_config [ "json_schema_extra" ] ["examples" ][1 ],
423423 exp_status_code = status .HTTP_204_NO_CONTENT ,
424424 is_legacy = False ,
425425 ),
426426 id = "DYNAMIC" ,
427427 ),
428428 pytest .param (
429429 * ServiceParams (
430- service = DynamicServiceCreate .Config . schema_extra ["example" ],
431- service_labels = SimcoreServiceLabels .Config . schema_extra ["examples" ][2 ],
430+ service = DynamicServiceCreate .model_config [ "json_schema_extra" ] ["example" ],
431+ service_labels = SimcoreServiceLabels .model_config [ "json_schema_extra" ] ["examples" ][2 ],
432432 exp_status_code = status .HTTP_204_NO_CONTENT ,
433433 is_legacy = False ,
434434 ),
@@ -481,8 +481,8 @@ def dynamic_sidecar_scheduler(minimal_app: FastAPI) -> DynamicSidecarsScheduler:
481481 [
482482 pytest .param (
483483 * ServiceParams (
484- service = DynamicServiceCreate .Config . schema_extra ["example" ],
485- service_labels = SimcoreServiceLabels .Config . schema_extra ["examples" ][1 ],
484+ service = DynamicServiceCreate .model_config [ "json_schema_extra" ] ["example" ],
485+ service_labels = SimcoreServiceLabels .model_config [ "json_schema_extra" ] ["examples" ][1 ],
486486 exp_status_code = status .HTTP_201_CREATED ,
487487 is_legacy = False ,
488488 )
@@ -528,26 +528,26 @@ def test_delete_service_waiting_for_manual_intervention(
528528 [
529529 pytest .param (
530530 * ServiceParams (
531- service = DynamicServiceCreate .Config . schema_extra ["example" ],
532- service_labels = SimcoreServiceLabels .Config . schema_extra ["examples" ][0 ],
531+ service = DynamicServiceCreate .model_config [ "json_schema_extra" ] ["example" ],
532+ service_labels = SimcoreServiceLabels .model_config [ "json_schema_extra" ] ["examples" ][0 ],
533533 exp_status_code = status .HTTP_200_OK ,
534534 is_legacy = True ,
535535 ),
536536 id = "LEGACY" ,
537537 ),
538538 pytest .param (
539539 * ServiceParams (
540- service = DynamicServiceCreate .Config . schema_extra ["example" ],
541- service_labels = SimcoreServiceLabels .Config . schema_extra ["examples" ][1 ],
540+ service = DynamicServiceCreate .model_config [ "json_schema_extra" ] ["example" ],
541+ service_labels = SimcoreServiceLabels .model_config [ "json_schema_extra" ] ["examples" ][1 ],
542542 exp_status_code = status .HTTP_200_OK ,
543543 is_legacy = False ,
544544 ),
545545 id = "DYNAMIC" ,
546546 ),
547547 pytest .param (
548548 * ServiceParams (
549- service = DynamicServiceCreate .Config . schema_extra ["example" ],
550- service_labels = SimcoreServiceLabels .Config . schema_extra ["examples" ][2 ],
549+ service = DynamicServiceCreate .model_config [ "json_schema_extra" ] ["example" ],
550+ service_labels = SimcoreServiceLabels .model_config [ "json_schema_extra" ] ["examples" ][2 ],
551551 exp_status_code = status .HTTP_200_OK ,
552552 is_legacy = False ,
553553 ),
@@ -571,7 +571,7 @@ def test_retrieve(
571571 response .status_code == exp_status_code
572572 ), f"expected status code { exp_status_code } , received { response .status_code } : { response .text } "
573573 assert (
574- response .json () == RetrieveDataOutEnveloped .Config . schema_extra ["examples" ][0 ]
574+ response .json () == RetrieveDataOutEnveloped .model_config [ "json_schema_extra" ] ["examples" ][0 ]
575575 )
576576
577577
0 commit comments