routeros: also add comment to interface

This commit is contained in:
CroneKorkN 2025-12-03 22:34:11 +01:00
parent 463cf8783c
commit 8066efb923
Signed by: cronekorkn
SSH key fingerprint: SHA256:v0410ZKfuO1QHdgKBsdQNF64xmTxOF8osF1LIqwTcVw

View file

@ -87,8 +87,13 @@ for port_name, port_conf in node.metadata.get('routeros/ports').items():
},
}
routeros[f'/interface?name={port_name}'] = {
'_comment': port_conf.get('description', ''),
}
if comment := port_conf.get('comment', None):
routeros[f'/interface/bridge/port?interface={port_name}']['_comment'] = comment
routeros[f'/interface?name={port_name}']['_comment'] = comment
# create IPs
for ip, ip_conf in node.metadata.get('routeros/ips').items():