Descriptionrpc: support a Version field
This adds support for a Version field in RPC requests, and changes the
MethodCaller interface for how and when it looks up objects.
Most of the MethodCaller changes were already reviewed in:
https://code.launchpad.net/~jameinel/juju-core/reflect-only-facades/+merge/218764
There are only a couple of tweaks because the lookup is now done with a
real Version instead of overriding the "id" field.
This also uses the registry.TypedNameVersion code in a sample registry that
shows one possible way that we can do a Registry with versioned lookups.
Note that the next steps don't actually make use of rpc/registry/* so
I'm willing to pull it out, or put it in as a test-suite only thing.
Alternatively it might be something tha could fit into
documentation/example sort of code.
This does disable one test that assumed you could statically iterate
over all the types and exposed methods. I introduce a similar function
later on once we have the factories registered.
One thing that was brought up before about always unfolding Interface(),
I didn't do that yet, but I still could if we feel it would be more
straightforward.
https://code.launchpad.net/~jameinel/juju-core/api-rpc-reflect-version/+merge/219653
Requires: https://code.launchpad.net/~jameinel/juju-core/typed-registry/+merge/219161
(do not edit description out of merge proposal)
Patch Set 1 #
Total comments: 11
Patch Set 2 : rpc: support a Version field #
Total comments: 6
Patch Set 3 : rpc: support a Version field #
MessagesTotal messages: 5
|