Renamed SliceDeployment back to SliceDeployments
diff --git a/planetstack/ec2_observer/steps/sync_nodes.py b/planetstack/ec2_observer/steps/sync_nodes.py
index 0fa8b61..9f032ed 100644
--- a/planetstack/ec2_observer/steps/sync_nodes.py
+++ b/planetstack/ec2_observer/steps/sync_nodes.py
@@ -20,7 +20,7 @@
return []
deployment = Deployment.objects.filter(Q(name="Amazon EC2"))[0]
- current_site_deployments = SiteDeployment.objects.filter(Q(deployment=deployment))
+ current_site_deployments = SiteDeployments.objects.filter(Q(deployment=deployment))
zone_ret = aws_run('ec2 describe-availability-zones')
zones = zone_ret['AvailabilityZones']
diff --git a/planetstack/ec2_observer/steps/sync_site_deployments.py b/planetstack/ec2_observer/steps/sync_site_deployments.py
index 5adccb7..7c24f68 100644
--- a/planetstack/ec2_observer/steps/sync_site_deployments.py
+++ b/planetstack/ec2_observer/steps/sync_site_deployments.py
@@ -7,9 +7,9 @@
from ec2_observer.awslib import *
import pdb
-class SyncSiteDeployment(SyncStep):
+class SyncSiteDeployments(SyncStep):
requested_interval=86400
- provides=[SiteDeployment]
+ provides=[SiteDeployments]
def fetch_pending(self, deletion):
if (deletion):
@@ -29,7 +29,7 @@
# The syncstep should catch it
# At any rate, we should not run if there are no deployments
deployment = Deployment.objects.filter(Q(name="Amazon EC2"))[0]
- current_site_deployments = SiteDeployment.objects.filter(Q(deployment=deployment))
+ current_site_deployments = SiteDeployments.objects.filter(Q(deployment=deployment))
site_dict = {}
for sd in current_site_deployments:
@@ -40,7 +40,7 @@
try:
site_record = site_dict[site]
except KeyError:
- sd = SiteDeployment(site=site,deployment=deployment,tenant_id=base64.urlsafe_b64encode(os.urandom(12)))
+ sd = SiteDeployments(site=site,deployment=deployment,tenant_id=base64.urlsafe_b64encode(os.urandom(12)))
updated_site_deployments.append(sd)
return updated_site_deployments
diff --git a/planetstack/ec2_observer/steps/sync_sites.py b/planetstack/ec2_observer/steps/sync_sites.py
index 0959c71..0c1c7cf 100644
--- a/planetstack/ec2_observer/steps/sync_sites.py
+++ b/planetstack/ec2_observer/steps/sync_sites.py
@@ -16,7 +16,7 @@
return []
deployment = Deployment.objects.filter(Q(name="Amazon EC2"))[0]
- current_site_deployments = SiteDeployment.objects.filter(Q(deployment=deployment))
+ current_site_deployments = SiteDeployments.objects.filter(Q(deployment=deployment))
zone_ret = aws_run('ec2 describe-availability-zones')
zones = zone_ret['AvailabilityZones']