ijiraq/cadcVOFS — pull request #21 by edwardchapin (2014-03-07 00:23:28+00:00)
Title: Random access

Here I have attempted to turn-on the short cut method of obtaining URLs to nodes, using the full negotiation (URL list) method as a fall back.

Some things to note:

- cutouts had some old hard-wired URL code in getNodeURL which I have removed upon JJ's recommendation.

- when getNodeURL applies the short cut method, I raise an IOError if the response is a 404. Norm mentioned to me that this part of the code looked strange, and he thought that the short cut would involve a GET rather than a POST, so perhaps this should be reviewed.

- if the short cut method produces an unusable URL, the call to self.lastVOFile.read() after the try: should raise an exception. It will then re-try forcing the full negotiation, and the subsequent read() ought to cycle through all of the available URLs.

- although not implemented yet, it might make sense in this final case to remove the URL that failed with the short cut method from the URL list using the full negotiation if it is present.

- there isn't an integration test for cutouts...