X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetstack%2Fobserver%2Fsteps%2Fsync_external_routes.py;fp=planetstack%2Fobserver%2Fsteps%2Fsync_external_routes.py;h=ba4f939ee7f0ad350ed703e54c483326bb813853;hb=24836f18c96de50f93cacb2be40f311f66e4876a;hp=0000000000000000000000000000000000000000;hpb=f61e17af98a435ab1eac843ee865abff81f5fa4c;p=plstackapi.git diff --git a/planetstack/observer/steps/sync_external_routes.py b/planetstack/observer/steps/sync_external_routes.py new file mode 100644 index 0000000..ba4f939 --- /dev/null +++ b/planetstack/observer/steps/sync_external_routes.py @@ -0,0 +1,14 @@ +import os +import base64 +from planetstack.config import Config + +class SyncExternalRoutes(SyncStep): + # XXX what does this provide? + def call(self): + routes = self.manager.driver.get_external_routes() + subnets = self.manager.driver.shell.quantum.list_subnets()['subnets'] + for subnet in subnets: + try: + self.manager.driver.add_external_route(subnet, routes) + except: + logger.log_exc("failed to add external route for subnet %s" % subnet)