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

@@ -3,8 +3,8 @@
<div class="container" style="margin-bottom:55px;">
<div class="row">
<div class="span12">
<h2>Experimental Disabled</h2>
<p>You're trying to access a feature restricted to PuppetDB's Experimental API but haven't configured Puppetboard to allow this.</p>
<h2>Feature unavailable</h2>
<p>You've configured Puppetboard with an API version that does not support this feature.</p>
</div>
</div>
</div>