Skip to content

Presenters - use field whitelists #47

@jistr

Description

@jistr

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions