ServerUtils

Provide uniform interface to backend for local and remote clients.return

There’s a pretty big assumption here: that DB and Handler expose the same calls, with identical signatures. This is not exactly the case for WMS DBs and services.

DIRAC.WorkloadManagementSystem.Client.ServerUtils.getDBOrClient(DB, serverName)

Tries to instantiate the DB object and returns it if we manage to connect to the DB, otherwise returns a Client of the server

DIRAC.WorkloadManagementSystem.Client.ServerUtils.getPilotAgentsDB()