Class: OctocatalogDiff::Catalog::PuppetDB

Inherits:
OctocatalogDiff::Catalog show all
Defined in:
lib/octocatalog-diff/catalog/puppetdb.rb

Overview

Represents a Puppet catalog that is read from PuppetDB.

Instance Attribute Summary

Attributes inherited from OctocatalogDiff::Catalog

#built, #catalog, #catalog_json, #node, #options

Instance Method Summary collapse

Methods inherited from OctocatalogDiff::Catalog

#build, #builder, #compilation_dir, #compilation_dir=, #convert_file_resources, create, #environment, #error_message, #error_message=, #puppet_version, #resource, #resources, #retries, #valid?, #validate_references

Constructor Details

#initialize(options) ⇒ PuppetDB

Constructor - See OctocatalogDiff::PuppetDB for additional parameters

Parameters:

  • :node (String)

    Node name

  • :retry (Integer)

    Number of retries, if fetch fails



17
18
19
20
21
22
23
# File 'lib/octocatalog-diff/catalog/puppetdb.rb', line 17

def initialize(options)
  super

  unless @options[:node].is_a?(String) && @options[:node] != ''
    raise ArgumentError, 'node must be a non-empty string'
  end
end