apiserver/facade: add Registry.ListDetails method #7331

Merged
merged 1 commit into from May 12, 2017

Conversation

Projects
None yet
3 participants
Owner

rogpeppe commented May 11, 2017

We add a ListDetails method to obtain information
on the available facades and also add AdminFacadeDetails in apiserver
for the Admin facade, which isn't available from apiserver.AllFacades.

This enables an external program to obtain information about
the juju API, for example to generate documentation
automatically or to do static compatibility checks.

Also export IsControllerFacade and IsModelFacade so that it's
possible to tell which facades are available in which mode.
In the future, it would be nice to be able to find which facades
are available to users as opposed to agents, but that's for
another PR.

Also remove some unused cruft from the tests (we only have
one admin facade version at the moment).

QA:

go get github.com/rogpeppe/misc/cmd/jujuapidoc github.com/rogpeppe/misc/cmd/jujuapidochtml
jujuapidoc > /tmp/apidoc.json
jujuapidochtml /tmp/apidoc.json > /tmp/apidoc.html
open /tmp/apidoc.html
# observe the beauty of the Juju API.
- logDir string
- limiter utils.Limiter
- validator LoginValidator
- adminAPIFactories map[int]adminAPIFactory
@rogpeppe

rogpeppe May 11, 2017

Owner

This is the only field removed.

apiserver/facade: add ListDetails method
Also add AdminFacadeDetails in apiserver.

axw approved these changes May 12, 2017

Owner

rogpeppe commented May 12, 2017

$$merge$$

Contributor

jujubot commented May 12, 2017

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

@jujubot jujubot merged commit 094c684 into juju:develop May 12, 2017

1 check failed

github-check-merge-juju Built PR, ran unit tests, and tested LXD deploy. Use !!.*!! to request another build. IE, !!build!!, !!retry!!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment