def isGlobalDBS(dbs):
    """Is this the global dbs"""
    try:
        from urlparse import urlparse
        url = urlparse(dbs.dbs.getServerUrl())
        if url.hostname.startswith('cmsweb.cern.ch') and url.path.startswith(
            '/dbs/prod/global'):
            return True
        info = dbs.dbs.getServerInfo()
        if info and info.get('InstanceName') == 'GLOBAL':
            return True
        return False
    except Exception:
        dbs.dbs.serverinfo()
        url = dbs.dbs.url
        if url.find('/global') != -1:
            return True
        else:
            return False
