Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presenters - use field whitelists #47

Open
jistr opened this issue Mar 19, 2013 · 0 comments
Open

Presenters - use field whitelists #47

jistr opened this issue Mar 19, 2013 · 0 comments

Comments

@jistr
Copy link
Contributor

jistr commented Mar 19, 2013

Get rid of hidden_fields on presenters (https://github.com/aeolus-incubator/thor-cli/blob/master/lib/aeolus/cli/formatting/presenter.rb#L84-L91, used when aliasing fields) and use a whitelist-based approach instead.

Drawbacks:

  • We'll need to set the whitelist in each resource's presenter.

Benefits:

  • Minor: we'll get more control over what attributes are allowed for listing.
  • Major: we'll be able to provide better information in help command (see issue Let user know which fields are available on resources #39). Currently, the set of attributes for a given resource is automagically determined from its XML representation, which means we don't know what attributes can be listed (and can't show this info to the user) until we fetch a resource instance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant