Support PuppetDB API v3.

Recently changes were made to pypuppetdb to support, at a basic level,
the v3 API introduced with PuppetDB 1.5.

This commit changes some internals of Puppetboard to handle the new
situation:
 * The experimental endpoints are gone, so is the ExperimentalDisabled
   Error;
 * v2 API can no longer access Reports/Events so we now check that we're
   talking at least v3 API;
 * Introduce a configuration setting PUPPETDB_API which takes an integer
   repersenting the API version we want to talk.
This commit is contained in:
Daniele Sluijters
2013-10-11 11:17:53 +02:00
parent 3b4db8f37e
commit cc87e54cea
5 changed files with 17 additions and 20 deletions

View File

@@ -4,7 +4,7 @@ PUPPETDB_SSL=False
PUPPETDB_KEY=None
PUPPETDB_CERT=None
PUPPETDB_TIMEOUT=20
PUPPETDB_EXPERIMENTAL=False
PUPPETDB_API=3
DEV_LISTEN_HOST='127.0.0.1'
DEV_LISTEN_PORT=5000
LOGLEVEL='info'