implement fetch_pending()
[plstackapi.git] / planetstack / observer / steps / sync_external_routes.py
index cbaf490..7a67896 100644 (file)
@@ -1,20 +1,21 @@
 import os
 import base64
 from planetstack.config import Config
-from observer.syncstep import SyncStep
+from observer.openstacksyncstep import OpenStackSyncStep
 
-class SyncExternalRoutes(SyncStep):
-       # XXX what does this provide?
-       requested_interval = 86400 # This step is slow like a pig. Let's run it infrequently
+class SyncExternalRoutes(OpenStackSyncStep):
+    # XXX what does this provide?
+    provides=[]
+    requested_interval = 86400 # This step is slow like a pig. Let's run it infrequently
 
-       def __init__(self):
-               pass
+    def __init__(self):
+        pass
 
-       def call(self):
-               routes = self.driver.get_external_routes()
-               subnets = self.driver.shell.quantum.list_subnets()['subnets']
-               for subnet in subnets:
-                       try:
-                               self.driver.add_external_route(subnet, routes)
-                       except:
-                               logger.log_exc("failed to add external route for subnet %s" % subnet)
+    def call(self):
+        routes = self.driver.get_external_routes()
+        subnets = self.driver.shell.quantum.list_subnets()['subnets']
+        for subnet in subnets:
+            try:
+                self.driver.add_external_route(subnet, routes)
+            except:
+                logger.log_exc("failed to add external route for subnet %s" % subnet)