Issue #5526 has been updated by eric sorenson. Assignee set to eric sorenson Target version set to 3.4.0
I just wrote this up on another bug, then searched -- that'll teach me. One approach to fixing this would be to split environment definitions (and their associated config directives) out from the main puppet.conf and into their own file, which would make it easier to enumerate and manipulate them programmatically. Another approach, which I personally favour, would be to promote dynamic environments to be the primary (only?) way to do environments. Since there's a very limited subset of config directives which are environment aware, and only two that are generally used (`manifest` and `modulepath`), which are generally relative paths to one another, they could be generalized and put into a single directive (`environment_basedir` or the like). This exposes/codifies the source of truth for valid environments to be the filesystem, and the enumeration API simply looks for valid directories under that root and enumerates the things it finds there. ---------------------------------------- Feature #5526: API call to return list of available environments https://projects.puppetlabs.com/issues/5526#change-98641 * Author: James Turnbull * Status: Accepted * Priority: Normal * Assignee: eric sorenson * Category: API * Target version: 3.4.0 * Affected Puppet version: * Keywords: API introspection environment ENC * Branch: ---------------------------------------- Usage: Would like to make an API call as a validation to an ENC to return a list of valid environments: Story: Bob has an ENC in a web interface and wants to add a node to an environment. He sets the environment setting to "testing" but has no idea until he runs the ENC if the "testing" environment exists. Instead he'd like his web interface to query the Puppet master and return a list of valid environments so he can validate that the "testing" environment exists. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
