-
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
Wherever ip addresses are stored, we should use netaddr.IPAddress instead of the standard Python str.
>>> ip = IPAddress("1.1.1.1")
>>> ip
IPAddress('1.1.1.1')
>>> str(ip)
'1.1.1.1'
>>> repr(ip)
"IPAddress('1.1.1.1')"
>>>
Although we might want to override IPAddress.__repr__() to return IPAddress.__str__().
Currently, this is possible
>>> vpn31 = model.Node.get("vpn31")
>>> vpn31.ip = "79.134.237.10722"
>>> vpn31.save()
>>> model.Node.get("vpn31")
{'name': 'vpn31', .... , 'ip': '79.134.237.10722'}
Reactions are currently unavailable