Commit d5b91d53 authored by Simon Redman's avatar Simon Redman

Add skeleton for configuring FRR

parent 5d2557e4
#!/usr/bin/env python3
# Copyright (C) 2018 Simon Redman <sredman@cs.utah.edu>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import ssh_helper
import argparse
from netdiff import NetJsonParser
import getpass
if __name__ == "__main__":
parser = argparse.ArgumentParser("Configure Free Range Routing's OSPFv6 and Zebra for all nodes in the network")
parser.add_argument("--in-file", action='store', type=str, required=True,
help="Path to the NetJSON file to parse")
parser.add_argument("--username", action='store', type=str, default=getpass.getuser(),
help="Username to use on all hosts. Defaults to current user's username")
args = parser.parse_args()
netgraph = NetJsonParser(file=args.in_file)
ssh_helper.network_graph_login(netgraph.graph, args.username)
ssh_helper.network_graph_logout(netgraph.graph)
pass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment