Issue #6752 has been updated by Dan Bode.
"I believe this ticket will be rendered unnecessary by ticket #6781. Some of Dan’s logic may need to be moved from the render methods to the individual actions, but I think this would be a beneficial move." I strongly disagree, examples: 1. I would never want to set exit codes in the interface, it has nothing to do with the data being abstracted 2. I already have several examples where I am transforming the object representation of something into something only useful for printing. I am adding headers, and even transforming the data for better readability. I can assert that this proposed change would make it harder for me to code interfaces/applications. It would basically require that I created a class for every interface and implement to_s, this is a lot of overhead to introduce compared to the render method. ---------------------------------------- Feature #6752: Allow action-specific render methods https://projects.puppetlabs.com/issues/6752 Author: Paul Berry Status: Accepted Priority: Normal Assignee: Category: interfaces Target version: 2.6.x Affected Puppet version: Keywords: Branch: The current implementation of interfaces allows a render method to be specified at the interface level but not at the action level. (The render method is in fact specified in the application file, not the interface file). This is unfortunate because not all actions in the same interface generate the same kind of output, so it does not necessarily make sense to have their output rendered in the same way. For example, "puppet catalog find" generates a catalog, which should probably be rendered as YAML or JSON, whereas "puppet catalog select" generates a list of resources. It would be nice if interface-specific render methods could be specified in the declaration of the interface, and action-specific render methods could be specified in the declaration of the action. The current implementation works around this situation by having "puppet catalog select" direct its output straight to stdout (instead of returning it)--this means that "puppet catalog select" cannot be effectively used from within Ruby. -- 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 post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
