puppetdb package

Submodules

puppetdb.core module

PuppetDBClientTestCaseV3.py: The core of this module

exception puppetdb.core.AuthException

Bases: exceptions.BaseException

exception puppetdb.core.ClientException

Bases: exceptions.BaseException

class puppetdb.core.PuppetDBClient(host='localhost', port=8080, api_version='v3', use_ssl=False, verify=True, cert=[])

Bases: object

get_aggregate_event_counts(query='', summarize_by='', count_by='', counts_filter='', distinct_resources='')
get_catalog(node_name)
get_environments(query='')
get_environments_by_name(environment_name)
get_environments_by_route(environment_name, route, query)
get_event_counts(query='', summarize_by='', count_by='', counts_filter='', distinct_resources='')
get_events(query='')
get_fact_names()
get_facts(query='')
get_facts_by_name(fact_name)
get_facts_by_name_and_value(fact_name, fact_value)
get_metric_names()
get_metrics_by_name(metric_name)
get_node(node_name=None)
get_node_fact_by_name(node_name=None, fact_name=None)
get_node_facts(node_name=None)
get_node_resource_by_type(node_name=None, type_name=None)
get_node_resources(node_name=None)
get_nodes()
get_reports(query='')
get_resources(query='')
get_resources_by_name(resource_name)
get_resources_by_name_and_value(resource_name, resource_value)
get_server_time()
get_version()

puppetdb.utils module

utils.py: Handy utility class for this module.

puppetdb.utils.api_request(api_base_url='http://localhost:8080/', path='', method='get', data=None, params={}, verify=True, cert=[])

Wrapper function for requests

Parameters:
  • api_base_url – Base URL for requests
  • path – Path to request
  • method – HTTP method
  • data – Data for post (ignored for GETs)
  • params – Dict of key, value query params
  • verify – True/False/CA_File_Name to perform SSL Verification of CA Chain
  • cert – list of cert and key to use for client authentication

Module contents

__init__.py: Init for this module.