This tree was mixed up, with an old version of the EC2 Observer. This
change copies across the version demo'd the OpenCloud developer meeting.
diff --git a/planetstack/ec2_observer/steps/sync_deployments.py b/planetstack/ec2_observer/steps/sync_deployments.py
new file mode 100644
index 0000000..8a258f1
--- /dev/null
+++ b/planetstack/ec2_observer/steps/sync_deployments.py
@@ -0,0 +1,22 @@
+import os
+import base64
+from django.db.models import F, Q
+from planetstack.config import Config
+from ec2_observer.syncstep import SyncStep
+from core.models.site import *
+
+class SyncDeployments(SyncStep):
+ requested_interval=86400
+ provides=[Deployment]
+
+ def fetch_pending(self,deletion):
+ deployments = Deployment.objects.filter(Q(name="Amazon EC2"))
+ if (not deployments):
+ deployments = [Deployment(name="Amazon EC2")]
+ else:
+ deployments = []
+
+ return deployments
+
+ def sync_record(self, deployment):
+ deployment.save()