#1800 - Renamed all ip fields so that they're post-fixed with ip_address

This commit is contained in:
Chris McCarthy
2023-09-04 14:58:34 +01:00
parent 05959e5408
commit 3075d1985b
12 changed files with 166 additions and 166 deletions

View File

@@ -36,9 +36,5 @@ class Computer(Node):
"""
def __init__(self, **kwargs):
for key in {"ip_address", "subnet_mask", "default_gateway"}:
if key in kwargs:
if not isinstance(kwargs[key], IPv4Address):
kwargs[key] = IPv4Address(kwargs[key])
super().__init__(**kwargs)
self.connect_nic(NIC(ip_address=kwargs["ip_address"], subnet_mask=kwargs["subnet_mask"]))