Tweak output of cmr list and find, better find query support #7144

Merged
merged 1 commit into from Mar 23, 2017

Conversation

Projects
None yet
3 participants
Owner

wallyworld commented Mar 23, 2017

Description of change

The output of the cmr list and find commands is tweaked for readability.
Also, the find endpoints api is fixed so that it requires the model owner to be specified, as distinct from the user making the query. It also supports queries across all models on a controller, so long as only one filter term is specified.

QA steps

bootstrap
create offers
run show-endpoints, find-endpoints, list-offers

Very nice! Only minor comments.

- offers, err := api.GetApplicationOffersDetails(filters, permission.ReadAccess)
+ var filtersToUse params.OfferFilters
+
+ // If there is only one filter term, and no model is specified, add in
@babbageclunk

babbageclunk Mar 23, 2017

Member

"add in add models" - edito?

@wallyworld

wallyworld Mar 23, 2017

Owner

should be "any"
fixed

-Application Charm Connected Store URL Endpoint Interface Role
-adiff-db2 db2 23 vendor vendor:fred/model.adiff-db2 log http provider
- mysql db2 requirer
+Application Charm Connected Store URL Endpoint Interface Role
@babbageclunk

babbageclunk Mar 23, 2017

Member

If we're sorting by source then why not put in the first column? Also, I found "Store" a confusing heading - maybe just call it Controller? I guess it's a bit long. Is controller the only thing that will go in that column?

@wallyworld

wallyworld Mar 23, 2017

Owner

Store is a general term. JAAS for example isn't a controller as such. Let's stick with controller for now and it can be bike shedded.

Reason for not having store in first column is that for the foreseeable future, there will only be one store, and application name is more important. We can adjust the tabular output if needed later.

@babbageclunk

babbageclunk Mar 23, 2017

Member

Yeah, that makes sense - I had a feeling that things like JAAS would make Controller not quite right. Adjusting the order later when there are more values for stores makes sense too.

Owner

wallyworld commented Mar 23, 2017

$$merge$$

Contributor

jujubot commented Mar 23, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Mar 23, 2017

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/10538

Owner

wallyworld commented Mar 23, 2017

$$mrge$$

Contributor

jujubot commented Mar 23, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 49067af into juju:develop Mar 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment