Renamed SiteDeployments->SiteDeployment
diff --git a/planetstack/ec2_observer/deleters/site_deleter.py b/planetstack/ec2_observer/deleters/site_deleter.py
index c97dee1..88a4008 100644
--- a/planetstack/ec2_observer/deleters/site_deleter.py
+++ b/planetstack/ec2_observer/deleters/site_deleter.py
@@ -1,4 +1,4 @@
-from core.models import Site, SiteDeployments
+from core.models import Site, SiteDeployment
from observer.deleter import Deleter
from observer.deleters.site_deployment_deleter import SiteDeploymentDeleter
@@ -7,7 +7,7 @@
def call(self, pk):
site = Site.objects.get(pk=pk)
- site_deployments = SiteDeployments.objects.filter(site=site)
+ site_deployments = SiteDeployment.objects.filter(site=site)
site_deployment_deleter = SiteDeploymentDeleter()
for site_deployment in site_deployments:
site_deployment_deleter(site_deployment.id)
diff --git a/planetstack/ec2_observer/deleters/site_deployment_deleter.py b/planetstack/ec2_observer/deleters/site_deployment_deleter.py
index fa97be2..db344cd 100644
--- a/planetstack/ec2_observer/deleters/site_deployment_deleter.py
+++ b/planetstack/ec2_observer/deleters/site_deployment_deleter.py
@@ -1,11 +1,11 @@
-from core.models import Site, SiteDeployments
+from core.models import Site, SiteDeployment
from observer.deleter import Deleter
class SiteDeploymentDeleter(Deleter):
- model='SiteDeployments'
+ model='SiteDeployment'
def call(self, pk):
- site_deployment = SiteDeployments.objects.get(pk=pk)
+ site_deployment = SiteDeployment.objects.get(pk=pk)
if site_deployment.tenant_id:
driver = self.driver.admin_driver(deployment=site_deployment.deployment.name)
driver.delete_tenant(site_deployment.tenant_id)
diff --git a/planetstack/ec2_observer/steps/sync_nodes.py b/planetstack/ec2_observer/steps/sync_nodes.py
index 9f032ed..0fa8b61 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 = SiteDeployments.objects.filter(Q(deployment=deployment))
+ current_site_deployments = SiteDeployment.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 7c24f68..5adccb7 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 SyncSiteDeployments(SyncStep):
+class SyncSiteDeployment(SyncStep):
requested_interval=86400
- provides=[SiteDeployments]
+ provides=[SiteDeployment]
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 = SiteDeployments.objects.filter(Q(deployment=deployment))
+ current_site_deployments = SiteDeployment.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 = SiteDeployments(site=site,deployment=deployment,tenant_id=base64.urlsafe_b64encode(os.urandom(12)))
+ sd = SiteDeployment(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 0c1c7cf..0959c71 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 = SiteDeployments.objects.filter(Q(deployment=deployment))
+ current_site_deployments = SiteDeployment.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_slivers.py b/planetstack/ec2_observer/steps/sync_slivers.py
index 15cd5eb..a7b1dad 100644
--- a/planetstack/ec2_observer/steps/sync_slivers.py
+++ b/planetstack/ec2_observer/steps/sync_slivers.py
@@ -5,7 +5,7 @@
from planetstack.config import Config
from ec2_observer.syncstep import SyncStep
from core.models.sliver import Sliver
-from core.models.slice import SlicePrivilege, SliceDeployments
+from core.models.slice import SlicePrivilege, SliceDeployment
from core.models.network import Network, NetworkSlice, NetworkDeployments
from util.logger import Logger, logging
from ec2_observer.awslib import *