'Populate the networks cache when the DHCP-agent starts.'

def _populate_networks_cache(self):

    try:
        existing_networks = self.dhcp_driver_cls.existing_dhcp_networks(self.conf)
        for net_id in existing_networks:
            net = dhcp.NetModel({'id': net_id, 'subnets': [], 'non_local_subnets': [], 'ports': []})
            self.cache.put(net)
    except NotImplementedError:
        LOG.debug("The    '%s'    DHCP-driver    does    not    support    retrieving    of    a    list    of    existing    networks", self.conf.dhcp_driver)
