Added ec2 observer, WIP
diff --git a/planetstack/ec2_observer/deleters/user_deleter.py b/planetstack/ec2_observer/deleters/user_deleter.py
new file mode 100644
index 0000000..3573f8d
--- /dev/null
+++ b/planetstack/ec2_observer/deleters/user_deleter.py
@@ -0,0 +1,13 @@
+from core.models import User, UserDeployments
+from observer.deleter import Deleter
+from observer.deleters.user_deployment_deleter import UserDeploymentDeleter
+
+class UserDeleter(Deleter):
+ model='User'
+
+ def call(self, pk):
+ user = User.objects.get(pk=pk)
+ user_deployment_deleter = UserDeploymentDeleter()
+ for user_deployment in UserDeployments.objects.filter(user=user):
+ user_deployment_deleter(user_deployment.id)
+ user.delete()