# destroy the model
# TODO: should this be removed?
await self.libjuju.destroy_model(
- model_name=model_name, total_timeout=total_timeout
+ model_name=model_name,
+ total_timeout=total_timeout,
)
else:
- # get juju model and observer
- controller = await self.libjuju.get_controller()
- model = await self.libjuju.get_model(controller, model_name)
# destroy the application
await self.libjuju.destroy_application(
- model=model, application_name=application_name)
+ model_name=model_name,
+ application_name=application_name,
+ total_timeout=total_timeout,
+ )
except Exception as e:
raise N2VCException(
message=(
).format(ee_id, application_name, e)
)
- # destroy the machine
- # try:
- # await self._juju_destroy_machine(
- # model_name=model_name,
- # machine_id=machine_id,
- # total_timeout=total_timeout
- # )
- # except Exception as e:
- # raise N2VCException(
- # message='Error deleting execution environment {} (machine {}) : {}'
- # .format(ee_id, machine_id, e))
-
self.log.info("Execution environment {} deleted".format(ee_id))
async def exec_primitive(