code: def _add_rid_to_vrf_list(self, ri):
          
          if ri.ex_gw_port or ri.router.get('gw_port'):
              driver = self.driver_manager.get_driver(ri.id)
              vrf_name = driver._get_vrf_name(ri)
              if not vrf_name:
                  return
              if not self._router_ids_by_vrf.get(vrf_name):
                  LOG.debug("++ CREATING VRF %s" % vrf_name)
                  driver._do_create_vrf(vrf_name)
              self._router_ids_by_vrf.setdefault(vrf_name, set()).add(
                  ri.router['id'])
docs: Add router ID to a VRF list.
  
          In order to properly manage VRFs in the ASR, their
          usage has to be tracked. VRFs are provided with neutron
          router objects in their hosting_info fields of the gateway ports.
          This means that the VRF is only available when the gateway port
          of the router is set. VRFs can span routers, and even OpenStack
          tenants, so lists of routers that belong to the same VRF are
          kept in a dictionary, with the VRF name as the key.