'Faciliate creation of a cell mapping for cell0.
See map_cell0 for more.'

def _map_cell0(self, database_connection=None):

    def cell0_default_connection():
        connection = CONF.database.connection
        url = sqla_url.make_url(connection)
        url.database = (url.database + '_cell0')
        return urlparse.unquote(str(url))
    dbc = (database_connection or cell0_default_connection())
    ctxt = context.RequestContext()
    cell_mapping = objects.CellMapping(ctxt, uuid=objects.CellMapping.CELL0_UUID, name='cell0', transport_url='none:///', database_connection=dbc)
    cell_mapping.create()
    return cell_mapping
