- # Remove an application from the model
- model = await self.get_model(self.get_namespace(cluster_uuid), cluster_uuid=cluster_uuid)
-
- if model:
- # Get the application
- if kdu_instance not in model.applications:
- # TODO: Raise a named exception
- raise Exception("Application not found.")
-
- application = model.applications[kdu_instance]
-
- # Destroy the application
- await application.destroy()
-
- # TODO: Verify removal
-
- removed = True
- return removed