From: Sapan Bhatia Date: Wed, 22 Oct 2014 00:59:08 +0000 (-0400) Subject: Worked around an authentication problem X-Git-Url: http://git.onelab.eu/?p=plstackapi.git;a=commitdiff_plain;h=94e5bf487a056ee008eeaa347a3f904773f78403 Worked around an authentication problem --- diff --git a/planetstack/openstack_observer/steps/sync_external_routes.py b/planetstack/openstack_observer/steps/sync_external_routes.py index 334d19d..28d24cc 100644 --- a/planetstack/openstack_observer/steps/sync_external_routes.py +++ b/planetstack/openstack_observer/steps/sync_external_routes.py @@ -2,6 +2,7 @@ import os import base64 from planetstack.config import Config from observer.openstacksyncstep import OpenStackSyncStep +from core.models.site import Deployment class SyncExternalRoutes(OpenStackSyncStep): # XXX what does this provide? @@ -9,6 +10,8 @@ class SyncExternalRoutes(OpenStackSyncStep): requested_interval = 86400 # This step is slow like a pig. Let's run it infrequently def call(self, **args): + deployments = Deployment.objects.all() + self.driver = self.driver.admin_driver(deployment=deployments[0],tenant='admin') routes = self.driver.get_external_routes() subnets = self.driver.shell.quantum.list_subnets()['subnets'] for subnet in subnets: