Class: Puppet::Plugins::DataProviders::PathBasedDataProviderFactory Abstract Deprecated Private
- Defined in:
- lib/puppet/plugins/data_providers/data_provider.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
TODO: API 5.0 Remove this class Factory for creating path based data providers
Direct Known Subclasses
Instance Method Summary collapse
- #create(name, paths, parent_data_provider) ⇒ DataProvider deprecated private Deprecated.
- #initialize ⇒ PathBasedDataProviderFactory constructor deprecated private Deprecated.
- #resolve_paths(datadir, declared_paths, paths, lookup_invocation) ⇒ Array<ResolvedPath> deprecated private Deprecated.
-
#version ⇒ Object
private
Returns the data provider factory version.
Constructor Details
#initialize ⇒ PathBasedDataProviderFactory
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of PathBasedDataProviderFactory.
322 323 324 325 326 327 |
# File 'lib/puppet/plugins/data_providers/data_provider.rb', line 322 def initialize unless Puppet[:strict] == :off Puppet.warn_once(:deprecation, 'PathBasedDataProviderFactory', 'PathBasedDataProviderFactory is deprecated and will be removed in the next major version of Puppet') end end |
Instance Method Details
#create(name, paths, parent_data_provider) ⇒ DataProvider
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create a path based data provider with the given name and paths
336 337 338 |
# File 'lib/puppet/plugins/data_providers/data_provider.rb', line 336 def create(name, paths, parent_data_provider) raise NotImplementedError, "Subclass of PathBasedDataProviderFactory must implement 'create' method" end |
#resolve_paths(datadir, declared_paths, paths, lookup_invocation) ⇒ Array<ResolvedPath>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Resolve the given paths to something that is meaningful as a paths argument when creating a provider using the #create call.
In order to increase efficiency, the implementors of this method should ensure that resolved paths that exists are included in the result.
352 353 354 |
# File 'lib/puppet/plugins/data_providers/data_provider.rb', line 352 def resolve_paths(datadir, declared_paths, paths, lookup_invocation) [] end |
#version ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the data provider factory version.
return [Integer] the version of this data provider factory
359 360 361 |
# File 'lib/puppet/plugins/data_providers/data_provider.rb', line 359 def version 2 end |