For a while I've wanted to have different "views" of resources, specifically content hosts, depending on which task I'm performing at that moment.
For example, if my job today is to set up subscriptions on a group of content hosts, then I'd like the UI columns to be centered around that (red/yellow/green subscription status, last subscription-manager check-in time, registered date, registered-by user name, etc.). Tomorrow when I'm evaluating a group of content hosts for applicable errata the columns should be different (red/yellow/green errata types, last yum update date, etc.).
In addition to the UI, the hammer 'list' command output should reflect the task at hand.
For performance (or other) reasons the API could limit its output to that necessary. (eg. Why query candlepin for subscription status if checking errata?)
With the upcoming work on folding katello's content host into foreman's host model[1] the API will already be needing an adjustment to params to account for the various "aspects".
With both hammer and (some of) the UI being 100% driven off of API, starting there and expanding to the UI and hammer may be good. Design work towards how to define "views" in both UI and hammer could hopefully be derived from the API syntax.
Do I define a "view" in rabl and have the controller switch based on params?
/api/hosts?view=subscription
/api/hosts?view=provision
/api/hosts?view=errata
Do we need fully customizable attributes?
/api/hosts?include=content.entitlement_status
Any ideas on this?
[1] HostUnification - Katello - Foreman
···
-- @thomasmckay–
“The leader must aim high, see big, judge widely, thus setting himself apart form the ordinary people who debate in narrow confines.” ~ Charles De Gaulle
“Leadership is about making others better as a result of your presence and making sure that impact lasts in your absence.” ~ Harvard Business School