daemon: refactored usages of addr to ip and updated functions to align
This commit is contained in:
parent
d88f3a2535
commit
20feea8f12
12 changed files with 138 additions and 118 deletions
|
@ -74,7 +74,7 @@ class DefaultRouteService(UtilService):
|
|||
ifaces = node.get_ifaces()
|
||||
if ifaces:
|
||||
iface = ifaces[0]
|
||||
for ip in iface.all_ips():
|
||||
for ip in iface.ips():
|
||||
net = ip.cidr
|
||||
if net.size > 1:
|
||||
router = net[1]
|
||||
|
@ -118,7 +118,7 @@ class StaticRouteService(UtilService):
|
|||
cfg += "# NOTE: this service must be customized to be of any use\n"
|
||||
cfg += "# Below are samples that you can uncomment and edit.\n#\n"
|
||||
for iface in node.get_ifaces(control=False):
|
||||
cfg += "\n".join(map(cls.routestr, iface.all_ips()))
|
||||
cfg += "\n".join(map(cls.routestr, iface.ips()))
|
||||
cfg += "\n"
|
||||
return cfg
|
||||
|
||||
|
@ -241,7 +241,7 @@ max-lease-time 7200;
|
|||
ddns-update-style none;
|
||||
"""
|
||||
for iface in node.get_ifaces(control=False):
|
||||
cfg += "\n".join(map(cls.subnetentry, iface.all_ips()))
|
||||
cfg += "\n".join(map(cls.subnetentry, iface.ips()))
|
||||
cfg += "\n"
|
||||
return cfg
|
||||
|
||||
|
@ -555,10 +555,7 @@ export LANG
|
|||
% node.name
|
||||
)
|
||||
for iface in node.get_ifaces(control=False):
|
||||
body += "<li>%s - %s</li>\n" % (
|
||||
iface.name,
|
||||
[str(x) for x in iface.all_ips()],
|
||||
)
|
||||
body += "<li>%s - %s</li>\n" % (iface.name, [str(x) for x in iface.ips()])
|
||||
return "<html><body>%s</body></html>" % body
|
||||
|
||||
|
||||
|
@ -626,7 +623,7 @@ class RadvdService(UtilService):
|
|||
"""
|
||||
cfg = "# auto-generated by RADVD service (utility.py)\n"
|
||||
for iface in node.get_ifaces(control=False):
|
||||
prefixes = list(map(cls.subnetentry, iface.all_ips()))
|
||||
prefixes = list(map(cls.subnetentry, iface.ips()))
|
||||
if len(prefixes) < 1:
|
||||
continue
|
||||
cfg += (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue