language-puppet-1.4.3: Tools to parse and evaluate the Puppet DSL.

Safe HaskellNone
LanguageHaskell98

PuppetDB

Description

Common data types for PuppetDB.

Synopsis

Documentation

dummyPuppetDB :: Monad m => PuppetDBAPI m Source #

A dummy implementation of PuppetDBAPI, that will return empty responses.

getDefaultDB :: PDBType -> IO (Either PrettyError (PuppetDBAPI IO)) Source #

Given a PDBType, will try return a sane default implementation.

pdbConnect :: Manager -> String -> IO (Either PrettyError (PuppetDBAPI IO)) Source #

Given an URL (ie. http://localhost:8080), will return an incomplete PuppetDBAPI.

loadTestDB :: FilePath -> IO (Either PrettyError (PuppetDBAPI IO)) Source #

Initializes the test DB using a file to back its content

generateWireCatalog :: NodeName -> FinalCatalog -> EdgeMap -> WireCatalog Source #

Turns a FinalCatalog and EdgeMap into a document that can be serialized and fed to puppet apply.

data PDBType Source #

The supported PuppetDB implementations.

Constructors

PDBRemote

Your standard PuppetDB, queried through the HTTP interface.

PDBDummy

A stupid stub, this is the default choice.

PDBTest

A slow but handy PuppetDB implementation that is backed by a YAML file.

Instances
Eq PDBType Source # 
Instance details

Defined in PuppetDB.Core

Methods

(==) :: PDBType -> PDBType -> Bool #

(/=) :: PDBType -> PDBType -> Bool #

Read PDBType Source # 
Instance details

Defined in PuppetDB.Core

data Query a Source #

Pretty straightforward way to define the various PuppetDB queries

Constructors

QEqual a Text 
QG a Integer 
QL a Integer 
QGE a Integer 
QLE a Integer 
QMatch Text Text 
QAnd [Query a] 
QOr [Query a] 
QNot (Query a) 
QEmpty 
Instances
ToJSON a => ToJSON (Query a) Source # 
Instance details

Defined in PuppetDB.Core

FromJSON a => FromJSON (Query a) Source # 
Instance details

Defined in PuppetDB.Core

ToJSON a => ToHttpApiData (Query a) Source # 
Instance details

Defined in PuppetDB.Core

data FactField Source #

Fields for the fact endpoint

Constructors

FName 
FValue 
FCertname 

data NodeField Source #

Fields for the node endpoint

Constructors

NName 
NFact Text