Comment 6 for bug 1676363

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

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": [

  ],
  "networks": [
    {
      "network_id": "58469bbc-1b36-4e2d-a098-4096ab0e956b",
      "link": "tapd15840ff-85",
      "type": "ipv4_dhcp",
      "id": "network0"
    },
    {
      "network_id": "58469bbc-1b36-4e2d-a098-4096ab0e956b",
      "link": "tapd15840ff-85",
      "type": "ipv6_dhcp",
      "id": "network1"
    },
    {
      "network_id": "7d398f31-1179-4dcd-b322-017f1dd3fa91",
      "link": "tap6d9c3001-5a",
      "type": "ipv6_dhcp",
      "id": "network2"
    },
    {
      "network_id": "b41c9da6-95b5-4d79-874a-8ff66eefe691",
      "link": "tapee59b935-fe",
      "type": "ipv6_dhcp",
      "id": "network3"
    }
  ],
  "links": [
    {
      "ethernet_mac_address": "fa:16:3e:21:90:c1",
      "mtu": 1450,
      "type": "ovs",
      "id": "tapd15840ff-85",
      "vif_id": "d15840ff-85cb-4d07-b101-9bc25e228705"
    },
    {
      "ethernet_mac_address": "fa:16:3e:90:5f:b3",
      "mtu": 1450,
      "type": "ovs",
      "id": "tap6d9c3001-5a",
      "vif_id": "6d9c3001-5a51-4f76-a22e-724c9d31236b"
    },
    {
      "ethernet_mac_address": "fa:16:3e:7a:38:15",
      "mtu": 1450,
      "type": "ovs",
      "id": "tapee59b935-fe",
      "vif_id": "ee59b935-fee0-41cb-b118-b6a2f28f455b"
    }
  ]
}

New:

{
  "services": [

  ],
  "networks": [
    {
      "network_id": "58469bbc-1b36-4e2d-a098-4096ab0e956b",
      "type": "ipv4_dhcp",
      "netmask": "255.255.255.192",
      "link": "tapd15840ff-85",
      "routes": [
        {
          "netmask": "0.0.0.0",
          "network": "0.0.0.0",
          "gateway": "10.0.0.1"
        }
      ],
      "ip_address": "10.0.0.8",
      "id": "network0"
    },
    {
      "network_id": "58469bbc-1b36-4e2d-a098-4096ab0e956b",
      "type": "ipv6_slaac",
      "netmask": "\/64",
      "link": "tapd15840ff-85",
      "routes": [
        {
          "netmask": "\/0",
          "network": "::",
          "gateway": "fdcd:6ce3:aac5::1"
        }
      ],
      "ip_address": "fdcd:6ce3:aac5:0:f816:3eff:fe21:90c1",
      "id": "network1"
    },
    {
      "network_id": "7d398f31-1179-4dcd-b322-017f1dd3fa91",
      "type": "ipv6_dhcpv6-stateless",
      "netmask": "\/64",
      "link": "tap6d9c3001-5a",
      "routes": [
        {
          "netmask": "\/0",
          "network": "::",
          "gateway": "fdcd:6ce3:aac5:1::1"
        }
      ],
      "ip_address": "fdcd:6ce3:aac5:1:f816:3eff:fe90:5fb3",
      "id": "network2"
    },
    {
      "network_id": "b41c9da6-95b5-4d79-874a-8ff66eefe691",
      "type": "ipv6_dhcpv6-stateful",
      "netmask": "\/64",
      "link": "tapee59b935-fe",
      "routes": [
        {
          "netmask": "\/0",
          "network": "::",
          "gateway": "fdcd:6ce3:aac5:3::1"
        }
      ],
      "ip_address": "fdcd:6ce3:aac5:3::c",
      "id": "network3"
    }
  ],
  "links": [
    {
      "ethernet_mac_address": "fa:16:3e:21:90:c1",
      "mtu": 1450,
      "type": "ovs",
      "id": "tapd15840ff-85",
      "vif_id": "d15840ff-85cb-4d07-b101-9bc25e228705"
    },
    {
      "ethernet_mac_address": "fa:16:3e:90:5f:b3",
      "mtu": 1450,
      "type": "ovs",
      "id": "tap6d9c3001-5a",
      "vif_id": "6d9c3001-5a51-4f76-a22e-724c9d31236b"
    },
    {
      "ethernet_mac_address": "fa:16:3e:7a:38:15",
      "mtu": 1450,
      "type": "ovs",
      "id": "tapee59b935-fe",
      "vif_id": "ee59b935-fee0-41cb-b118-b6a2f28f455b"
    }
  ]
}

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.