All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

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,10 +69,11 @@ if __name__ == "__main__":
# Skip adding ipv6 addresses to the management interfaces
management_ips = [node["management-ip"] for node in netgraph.graph._node.values()]
ULA_map = add_routable_ipv6_addrs.construct_ULAs(netgraph.graph, ignore_addrs=management_ips)
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)
add_routable_ipv6_addrs.add_interfaces_to_netgraph(netgraph.graph, ULA_map)
add_routable_ipv6_addrs.add_ULAs_to_hosts(netgraph.graph, ULA_map)
add_routable_ipv6_addrs.add_interfaces_to_netgraph(netgraph.graph, ULA_map)
# Prepare a list of nodes which act as an edge switch and should thus be ignore for router-related activites
border_nodes = []
......
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