Fix 1462
[osm/N2VC.git] / n2vc / n2vc_juju_conn.py
index d31c169..c09c263 100644 (file)
@@ -794,15 +794,16 @@ class N2VCJujuConnector(N2VCConnector):
                 # 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=(