dmwm/WMCore — pull request #4418 by giffels (2013-02-14 11:29:31+00:00)
Title: Move Service/SiteDB to SiteDBv2

Hi,

since the StoreResults service is using the Service/SiteDB.py for one of its components, I have adapted it to the new SiteDBv2. Please, feel free to include this into the WMCore repository by accept the pull request. I have also adapted the corresponding unittests.

Few comments:

* The JSONParser is not needed anymore, since SiteDBv2 returns proper formatted json. Therefore, I have removed the parser specific unittests.
* I have also changed few of the expected results in the unittests, since the corresponding sites have updated there information.
* I had to change the Service.py as well, since httplib is forcing "accept-encoding: gzip, deflate" in http headers, if it is not set to a different value. This is not working with cmsweb and leads to an decoding problem. Therefore, I have added the possibility to add additional incoming_headers to the refreshCache and forceRefresh methods of the Service class. The dictionary is passed through to the getData method, that already had the possibility to add additional headers.

Disclaimer: I am not sure, that always used the most efficient way to get the information. Please, feel free to improve the way of retrieving information. ;-)

Cheers,
Manuel

P.S.: I wonder what is the current status of the Service package, since Service.py did not work out-of-box for me and some unittests failed before?