Commit a9a6613c authored by Jonathan Michalon's avatar Jonathan Michalon

Allow configuring hosts without IPv4 or IPv6

Omitting addresses in Host instanciation now defaults to doc-reserved
IP addresses, so that one can create hosts that are not dual-stacked.
parent f7c75c70
...@@ -5,7 +5,7 @@ from collections import Iterable ...@@ -5,7 +5,7 @@ from collections import Iterable
class Host(object): class Host(object):
def __init__(self, ipv4, ipv6, name=None): def __init__(self, ipv4='192.0.2.1', ipv6='2001:db8::1', name=None):
self.ipv4 = ipv4 self.ipv4 = ipv4
self.ipv6 = ipv6 self.ipv6 = ipv6
self.name = name if name is not None else "%s/%s" % (ipv4, ipv6) self.name = name if name is not None else "%s/%s" % (ipv4, ipv6)
......
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