We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wherever ip addresses are stored, we should use netaddr.IPAddress instead of the standard Python str.
netaddr.IPAddress
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__().
IPAddress.__repr__()
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'}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Wherever ip addresses are stored, we should use
netaddr.IPAddress
instead of the standard Pythonstr
.Although we might want to override
IPAddress.__repr__()
to returnIPAddress.__str__()
.Currently, this is possible
The text was updated successfully, but these errors were encountered: