Class: Puppet::Environments::Legacy Private
- Includes:
- EnvironmentCreator
- Defined in:
- lib/puppet/environments.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.
Old-style environments that come either from explicit stanzas in puppet.conf or from dynamic environments created from use of ‘$environment` in puppet.conf.
Instance Method Summary collapse
-
#get(name) ⇒ Puppet::Node::Environment?
private
Find a named environment.
-
#get_conf(name) ⇒ Puppet::Setting::EnvironmentConf?
private
Attempt to obtain the initial configuration for the environment.
-
#list ⇒ Array<Puppet::Node::Environment>
private
All of the environments known to the loader.
-
#search_paths ⇒ Array<String>
private
A list of indicators of where the loader is getting its environments from.
Methods included from EnvironmentCreator
Instance Method Details
#get(name) ⇒ Puppet::Node::Environment?
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.
Because the Legacy system cannot list out all of its environments, get is able to return environments that are not returned by a call to #list.
Find a named environment
135 136 137 |
# File 'lib/puppet/environments.rb', line 135 def get(name) Puppet::Node::Environment.new(name) end |
#get_conf(name) ⇒ Puppet::Setting::EnvironmentConf?
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.
we could return something here, but since legacy environments are deprecated, there is no point.
Attempt to obtain the initial configuration for the environment. Not all loaders can provide this.
143 144 145 |
# File 'lib/puppet/environments.rb', line 143 def get_conf(name) nil end |
#list ⇒ Array<Puppet::Node::Environment>
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.
The list of environments for the Legacy environments is always empty.
Returns All of the environments known to the loader.
126 127 128 |
# File 'lib/puppet/environments.rb', line 126 def list [] end |
#search_paths ⇒ Array<String>
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.
A list of indicators of where the loader is getting its environments from.
118 119 120 |
# File 'lib/puppet/environments.rb', line 118 def search_paths ["file://#{Puppet[:config]}"] end |