コード例 #1
0
ファイル: fib.py プロジェクト: Annapurna610/openr-1
    def run(self, prefixes, nexthops):
        routes = utils.build_routes(prefixes.split(','), nexthops.split(','))

        try:
            self.client.syncFib(self.client.client_id, routes)
        except Exception as e:
            print('Failed to sync routes.')
            print('Exception: {}'.format(e))
            sys.exit(1)

        print('Reprogrammed FIB with {} routes.'.format(len(routes)))
コード例 #2
0
ファイル: fib.py プロジェクト: Annapurna610/openr-1
    def run(self, prefixes, nexthops):
        routes = utils.build_routes(prefixes.split(','), nexthops.split(','))

        try:
            self.client.addUnicastRoutes(self.client.client_id, routes)
        except Exception as e:
            print('Failed to add routes.')
            print('Exception: {}'.format(e))
            sys.exit(1)

        print('Added {} routes.'.format(len(routes)))
コード例 #3
0
    def run(self, prefixes, nexthops):
        routes = utils.build_routes(prefixes.split(","), nexthops.split(","))

        try:
            self.client.syncFib(self.client.client_id, routes)
        except Exception as e:
            print("Failed to sync routes.")
            print("Exception: {}".format(e))
            return 1

        print("Reprogrammed FIB with {} routes.".format(len(routes)))
        return 0
コード例 #4
0
    def run(self, prefixes, nexthops):
        routes = utils.build_routes(prefixes.split(","), nexthops.split(","))

        try:
            self.client.addUnicastRoutes(self.client.client_id, routes)
        except Exception as e:
            print("Failed to add routes.")
            print("Exception: {}".format(e))
            return 1

        print("Added {} routes.".format(len(routes)))
        return 0