Sha256: 60266fdede086fd61d22bc9b90b5f395bf8e1c31e6ea57f7512a12a69614d4ca

Contents?: true

Size: 1.77 KB

Versions: 150

Compression:

Stored size: 1.77 KB

Contents

# This registers the default bindings for this module.
# These bidnings are loaded at the start of a Puppet
# catalog production.
# 
# The registrations makes 'sample' available as both a
# data provider for an environment, and individually
# selectable in modules.
#
# Note that there are two different implementation classes
# registered, one for environment, and one for modules.
#
# Also note that all data are strings including the names
# of the classes that implement the provider logic. This
# is to not cause loading of those classes until they
# are needed.
#
Puppet::Bindings.newbindings('dataprovider::default') do

  # Make the SampleEnvData provider available for use in environments
  # as 'sample'.
  #
  bind {
    name 'sample'
    in_multibind 'puppet::environment_data_providers'
    to_instance 'PuppetX::Helindbe::SampleEnvData'
  }

  # Make the SampleModuleData provider available for use in environments
  # as 'sample'.
  #
  bind {
    name 'sample'
    in_multibind 'puppet::module_data_providers'
    to_instance 'PuppetX::Helindbe::SampleModuleData'
  }

  # This is what users of the 'sample' module data provider should
  # use in its default.rb bindings. The module providing the implementation
  # of this data provider typically does not have any puppet logic, so it
  # would not have this binding. This example module has this however since
  # it would otherwise require an additional module with just some puppet code
  # and this binding to demonstrate the functionality.
  #
  # This binding declares that this module wants to use the 'sample' data provider
  # for this module. (Thus ending up using the SampleModuleData implementation
  # bound above in this example).
  # 
  bind {
    name 'dataprovider'
    to 'sample'
    in_multibind 'puppet::module_data'
  }
end

Version data entries

150 entries across 150 versions & 1 rubygems

Version Path
puppet-4.10.12 spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.12-x86-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.12-x64-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.12-universal-darwin spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.11 spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.11-x86-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.11-x64-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.11-universal-darwin spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.10 spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.10-x86-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.10-x64-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.10-universal-darwin spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.9 spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.9-x86-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.9-x64-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.9-universal-darwin spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.8 spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.8-x86-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.8-x64-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb
puppet-4.10.8-universal-darwin spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb