Change-Id: If42c99ac9ec88a492d89a201f12a93872a476783
Signed-off-by: quilesj <e.nvi001.tid@telefonica.com>
model = await self._juju_get_model(model_name=model_name)
uuid = model.info.uuid
+ # destroy machines
+ machines = await model.get_machines()
+ for machine_id in machines:
+ try:
+ await self._juju_destroy_machine(model_name=model_name, machine_id=machine_id)
+ except Exception as e:
+ # ignore exceptions destroying machine
+ pass
+
await self._juju_disconnect_model(model_name=model_name)
self.juju_models[model_name] = None
self.juju_observers[model_name] = None