- vdu["interfaces"][iface["name"]] = \
- {x.replace("-", "_"): iface[x] for x in ("mac-address", "ip-address", "name")
- if iface.get(x) is not None}
+ vdu["interfaces"][iface["name"]] = {
+ x.replace("-", "_"): iface[x]
+ for x in ("mac-address", "ip-address", "name")
+ if iface.get(x) is not None
+ }