@@ -367,12 +367,15 @@ async def add_model(
367367
368368 return model
369369
370- async def destroy_models (self , * models , destroy_storage = False ):
370+ async def destroy_models (self , * models , destroy_storage = False , force = False , max_wait = None ):
371371 """Destroy one or more models.
372372
373373 :param str *models: Names or UUIDs of models to destroy
374374 :param bool destroy_storage: Whether or not to destroy storage when
375375 destroying the models. Defaults to false.
376+ :param bool force: Whether or not to force when destroying the models.
377+ Defaults to false.
378+ :param int max_wait : Max time in seconds to wait when destroying the models.
376379
377380 """
378381 uuids = await self .model_uuids ()
@@ -390,13 +393,18 @@ async def destroy_models(self, *models, destroy_storage=False):
390393
391394 if model_facade .version >= 5 :
392395 params = [
393- client .DestroyModelParams (model_tag = tag .model (model ),
394- destroy_storage = destroy_storage )
396+ client .DestroyModelParams (
397+ model_tag = tag .model (model ),
398+ destroy_storage = destroy_storage ,
399+ force = force ,
400+ max_wait = max_wait ,
401+ )
395402 for model in models ]
403+ await model_facade .DestroyModels (models = params )
396404 else :
397405 params = [client .Entity (tag .model (model )) for model in models ]
398406
399- await model_facade .DestroyModels (entities = params )
407+ await model_facade .DestroyModels (entities = params )
400408 destroy_model = destroy_models
401409
402410 async def add_user (self , username , password = None , display_name = None ):
0 commit comments