Class: Puppet::Pops::Binder::SystemBindings

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/pops/binder/system_bindings.rb

Constant Summary collapse

ENVIRONMENT_BOOT_BINDINGS_NAME =

Constant with name used for bindings used during initialization of injector

'puppet::env::injector::boot'
Factory =
Puppet::Pops::Binder::BindingsFactory

Class Method Summary collapse

Class Method Details

.default_bindingsObject



15
16
17
# File 'lib/puppet/pops/binder/system_bindings.rb', line 15

def self.default_bindings()
  @default_bindings
end

.default_contributionObject



27
28
29
# File 'lib/puppet/pops/binder/system_bindings.rb', line 27

def self.default_contribution
  Factory.contributed_bindings("puppet-default", [deep_clone(@default_bindings.model)])
end

.extensionsObject



11
12
13
# File 'lib/puppet/pops/binder/system_bindings.rb', line 11

def self.extensions()
  @extension_bindings
end

.factoryObject



47
48
49
# File 'lib/puppet/pops/binder/system_bindings.rb', line 47

def self.factory()
  Puppet::Pops::Binder::BindingsFactory
end

.final_contributionObject



23
24
25
# File 'lib/puppet/pops/binder/system_bindings.rb', line 23

def self.final_contribution
  Factory.contributed_bindings("puppet-final", [deep_clone(@extension_bindings.model)])
end

.injector_boot_bindingsObject



19
20
21
# File 'lib/puppet/pops/binder/system_bindings.rb', line 19

def self.injector_boot_bindings()
  @injector_boot_bindings
end

.injector_boot_contribution(env_boot_bindings) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/puppet/pops/binder/system_bindings.rb', line 31

def self.injector_boot_contribution(env_boot_bindings)
  # Compose the injector_boot_bindings contributed from the puppet runtime book (i.e. defaults for
  # extensions that should be active in the boot injector - see Puppetx initialization.
  #
  bindings = [deep_clone(@injector_boot_bindings.model), deep_clone(@injector_default_bindings)]

  # Add the bindings that come from the bindings_composer as it may define custom extensions added in the bindings
  # configuration. (i.e. bindings required to be able to lookup using bindings schemes and backends when
  # configuring the real injector).
  #
  bindings << env_boot_bindings unless env_boot_bindings.nil?

  # return the composition
  Factory.contributed_bindings("puppet-injector-boot", bindings)
end

.type_factoryObject



51
52
53
# File 'lib/puppet/pops/binder/system_bindings.rb', line 51

def self.type_factory()
  Puppet::Pops::Types::TypeFactory
end