Allow overriding the RAPI port/scheme
authorIustin Pop <iustin@google.com>
Wed, 20 May 2009 22:02:45 +0000 (23:02 +0100)
committerIustin Pop <iustin@google.com>
Wed, 20 May 2009 22:24:29 +0000 (23:24 +0100)
commite015b5548401465a2c14f0237e0787489a03ef4a
treef9ee22f0f9a07c90b1f468cc70c5b743590aa1e5
parentba00ad4d6922b04bbe68f60d1a505d4ca7185f84
Allow overriding the RAPI port/scheme

This patch adds a very dumb way to override the port and scheme for
RAPI: if the master string doesn't contain a colon, we consider it a
simple hostname specification, and thus prepend ‘https://’ and append
‘:5080’, (the default RAPI port); otherwise, we consider it a fully
specified URL, and don't do any mangling to it.

This allows to use saved RAPI responses in testing, with the “file://”
scheme, or to use another port or non https mode with an actual RAPI
instance.
Ganeti/HTools/Rapi.hs
hbal.1
hn1.1