Commit 09fd7a19 authored by Simon Redman's avatar Simon Redman

Add flag to skip assigning IPv6 addresses

parent f3eb9560
......@@ -42,6 +42,8 @@ if __name__ == "__main__":
help="(Optional) Path to write the final NetJSON file")
parser.add_argument("--username", action='store', type=str, default=getpass.getuser(),
help="Username to use on all hosts. Defaults to current user's username")
parser.add_argument("--no-ipv6-assign", action='store_true',
help="Do not assign IPv6 addresses - Requires that the 'interfaces' property is defined in the incoming netjson")
parser.add_argument("--no-frr", action='store_true',
help="Do not start the FRR daemons")
parser.add_argument("--no-sniffer", action='store_true',
......@@ -67,6 +69,7 @@ if __name__ == "__main__":
# Skip adding ipv6 addresses to the management interfaces
management_ips = [node["management-ip"] for node in netgraph.graph._node.values()]
if not args.no_ipv6_assign:
ULA_map = add_routable_ipv6_addrs.construct_ULAs(netgraph.graph, ignore_addrs=management_ips)
add_routable_ipv6_addrs.add_ULAs_to_hosts(netgraph.graph, ULA_map)
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