For reference, here is the sample output before and after my patch series, for an instance with three interfaces (dual-stack slaac, dhcpv6-stateless, dhcpv6-stateful):
I would like to make the output even nicer, by combining network+netmask for routes and maybe even ip_address+netmask for addresses, at least for IPv6, please let me know what you think about this.
For reference, here is the sample output before and after my patch series, for an instance with three interfaces (dual-stack slaac, dhcpv6-stateless, dhcpv6-stateful):
Old:
{
"services": [
], 1b36-4e2d- a098-4096ab0e95 6b", 1b36-4e2d- a098-4096ab0e95 6b", 1179-4dcd- b322-017f1dd3fa 91", 95b5-4d79- 874a-8ff66eefe6 91", ethernet_ mac_address" : "fa:16: 3e:21:90: c1", 85cb-4d07- b101-9bc25e2287 05" ethernet_ mac_address" : "fa:16: 3e:90:5f: b3", 5a51-4f76- a22e-724c9d3123 6b" ethernet_ mac_address" : "fa:16: 3e:7a:38: 15", fee0-41cb- b118-b6a2f28f45 5b"
"networks": [
{
"network_id": "58469bbc-
"link": "tapd15840ff-85",
"type": "ipv4_dhcp",
"id": "network0"
},
{
"network_id": "58469bbc-
"link": "tapd15840ff-85",
"type": "ipv6_dhcp",
"id": "network1"
},
{
"network_id": "7d398f31-
"link": "tap6d9c3001-5a",
"type": "ipv6_dhcp",
"id": "network2"
},
{
"network_id": "b41c9da6-
"link": "tapee59b935-fe",
"type": "ipv6_dhcp",
"id": "network3"
}
],
"links": [
{
"
"mtu": 1450,
"type": "ovs",
"id": "tapd15840ff-85",
"vif_id": "d15840ff-
},
{
"
"mtu": 1450,
"type": "ovs",
"id": "tap6d9c3001-5a",
"vif_id": "6d9c3001-
},
{
"
"mtu": 1450,
"type": "ovs",
"id": "tapee59b935-fe",
"vif_id": "ee59b935-
}
]
}
New:
{
"services": [
], 1b36-4e2d- a098-4096ab0e95 6b",
"netmask" : "0.0.0.0",
"network" : "0.0.0.0",
"gateway" : "10.0.0.1" 1b36-4e2d- a098-4096ab0e95 6b",
"netmask" : "\/0",
"network" : "::",
"gateway" : "fdcd:6ce3:aac5::1" aac5:0: f816:3eff: fe21:90c1" , 1179-4dcd- b322-017f1dd3fa 91", stateless" ,
"netmask" : "\/0",
"network" : "::",
"gateway" : "fdcd:6ce3: aac5:1: :1" aac5:1: f816:3eff: fe90:5fb3" , 95b5-4d79- 874a-8ff66eefe6 91", stateful" ,
"netmask" : "\/0",
"network" : "::",
"gateway" : "fdcd:6ce3: aac5:3: :1" aac5:3: :c", ethernet_ mac_address" : "fa:16: 3e:21:90: c1", 85cb-4d07- b101-9bc25e2287 05" ethernet_ mac_address" : "fa:16: 3e:90:5f: b3", 5a51-4f76- a22e-724c9d3123 6b" ethernet_ mac_address" : "fa:16: 3e:7a:38: 15", fee0-41cb- b118-b6a2f28f45 5b"
"networks": [
{
"network_id": "58469bbc-
"type": "ipv4_dhcp",
"netmask": "255.255.255.192",
"link": "tapd15840ff-85",
"routes": [
{
}
],
"ip_address": "10.0.0.8",
"id": "network0"
},
{
"network_id": "58469bbc-
"type": "ipv6_slaac",
"netmask": "\/64",
"link": "tapd15840ff-85",
"routes": [
{
}
],
"ip_address": "fdcd:6ce3:
"id": "network1"
},
{
"network_id": "7d398f31-
"type": "ipv6_dhcpv6-
"netmask": "\/64",
"link": "tap6d9c3001-5a",
"routes": [
{
}
],
"ip_address": "fdcd:6ce3:
"id": "network2"
},
{
"network_id": "b41c9da6-
"type": "ipv6_dhcpv6-
"netmask": "\/64",
"link": "tapee59b935-fe",
"routes": [
{
}
],
"ip_address": "fdcd:6ce3:
"id": "network3"
}
],
"links": [
{
"
"mtu": 1450,
"type": "ovs",
"id": "tapd15840ff-85",
"vif_id": "d15840ff-
},
{
"
"mtu": 1450,
"type": "ovs",
"id": "tap6d9c3001-5a",
"vif_id": "6d9c3001-
},
{
"
"mtu": 1450,
"type": "ovs",
"id": "tapee59b935-fe",
"vif_id": "ee59b935-
}
]
}
I would like to make the output even nicer, by combining network+netmask for routes and maybe even ip_address+netmask for addresses, at least for IPv6, please let me know what you think about this.