'Returns information about the IPv4 and IPv6 subnets
associated with a Neutron Network UUID.'

@staticmethod
def _extract_subnets(network):

    subnet_v4 = {'network_id': network.uuid, 'cidr': network.cidr, 'gateway': network.gateway, 'dhcp_server': getattr(network, 'dhcp_server'), 'broadcast': network.broadcast, 'netmask': network.netmask, 'version': 4, 'dns1': network.dns1, 'dns2': network.dns2}
    subnet_v6 = {'network_id': network.uuid, 'cidr': network.cidr_v6, 'gateway': network.gateway_v6, 'dhcp_server': None, 'broadcast': None, 'netmask': network.netmask_v6, 'version': 6, 'dns1': None, 'dns2': None}
    def ips_to_strs(net):
        for (key, value) in net.items():
            if isinstance(value, netaddr.ip.BaseIP):
                net[key] = str(value)
        return net
    return [ips_to_strs(subnet_v4), ips_to_strs(subnet_v6)]
