obspy/obspy — pull request #754 by krischer (2014-03-06 23:05:25+00:00)
Title: Feature request: override capabilty for specific FDSN web service locations

Currently there appears to be no way to directly specify an FDSN web service endpoint. The service locations are generated from a base_url + "fdsnws" + the service name + service major version. For compliant services this works just fine. But it is not possible to have ObsPy.fdsn work against services that do not fit the URL pattern or to access services on different hosts for the same Client instance.

There are two use cases that I know of for needing service-specific overrides:

a) Non-conforming paths. The DMC uses "fdsnwsbeta" in the path instead of "fdsnws" for beta locations. This does not fit the pattern and means we cannot use ObsPy.fdsn to access our beta services.

b) Using two different base_urls for the same Client query. In some cases a single Client uses multiple services, e.g. get_waveform(..., attach_response=True). Using such a combination of dataselect and station services on different hosts, like would be common in service development/testing cycles where one of the two is in production and the other is on a test host, is not possible. Another reason, perhaps particular to the DMC: we have multiple back end hosts behind a load balancer handling the requests. Sometimes in diagnostics/testing it is convenient to direct all traffic for one service directly to a single backend, but in our case no single back end handles all of the services.

In the DMC's Fetch perl scripts we allow the user to override the SERVICEBASE (equivalent to the ObsPy.fdsn base_url) via an environment variable. We also allow individual services to be explicitly specified. While this is not commonly needed for end users it has proved to be extremely useful for development and testing, I'm hopeful that feature could be incorporated into ObsPy.fdsn as well.