Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-5011

Helper methods for enumerating manifest files in environments


    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Language
    • Labels:


      We have found that in order for Puppet Server to be able to utilize the ClassInformationService.classes_per_environment method implemented for PUP-4819 that we would ideally need to have a couple of helper methods that we could use to construct the parameter passed into classes_per_environment. Ideally, we'd like to get this in for Puppet 4.3.0.

      The methods would be something like:


      This would require no arguments and when called would return back a Hash with keys being the string name of each environment and the value being an Array of fully-qualified file names of the manifest files that can be referenced by that environment.


      The env_name would be a string representing the name of the environment for which manifests files should be found. The return payload from this call would be an Array of fully-qualified names of manifest files that can be referenced by that environment.

      For both methods above, the list of manifest files returned for an environment should include any manifests that the environment could reference directly - via the directory or file that the manifest setting in the environment's "environment.conf" file would either implicitly or explicitly be set to. The list should also include any manifests that the environment could reference via any of the modules in its modulepath.

      Also, for both methods above, no "cached" data should be used to compute the result. No cached values of settings sourced from each environment's "environment.conf" file should be used, e.g., for computing module and manifest paths. Also, none of the manifests that the module objects return should be from previously cached data. (I understand that the setting values coming directly from "puppet.conf" will be cached for when Puppet is running inside of Puppet Server, but I think that's an artifact of Puppet Server's current reloading of global configuration that will need to be looked separately.) Essentially, we want the result to include the full list of manifest files for each environment as currently defined on disk at the time the method call is made.

      In terms of the format of the response data, I'm assuming it should be sufficient for our Puppet Server-level code to just turn right back around and hand the data into the ClassInformationService.classes_per_environment method to get parsed class info for each of the manifest files.


          Issue Links




                • Assignee:
                  jeremy.barlow Jeremy Barlow
                • Votes:
                  0 Vote for this issue
                  5 Start watching this issue


                  • Created:

                    Zendesk Support