'Return subnet IDs for interfaces attached to the given router.'

def get_subnet_ids_on_router(self, context, router_id):

    subnet_ids = set()
    filter_rtr = {'device_id': [router_id]}
    int_ports = self._core_plugin.get_ports(context, filters=filter_rtr)
    for int_port in int_ports:
        int_ips = int_port['fixed_ips']
        if int_ips:
            int_subnet = int_ips[0]['subnet_id']
            subnet_ids.add(int_subnet)
        else:
            LOG.debug('DVR:    Could    not    find    a    subnet    id    for    router    %s', router_id)
    return subnet_ids
