Descriptionstate/apiserver: Last batch of Uniter API calls
This implements the last (hopefully) needed calls
in the uniter server-side API facade:
* ProviderType (added a TODO in uniter/modes to
refactor the code and use that instead of EnvironConfig,
just to get the provider type);
* EnterScope;
* LeaveScope;
* ReadSettings (working on both the local and remote unit
settings, depending on args);
* WriteSettings (needed to implement the client-side
Settings.Write() method).
Added some suggested changes from the previous CL: slight
reformatting of common_test.go to save some space; renamed
params.Relations to params.RelationUnits; Changed AuthEiter
to take GetAuthFunc arguments and return one.
In the course of writing tests for EnterScope and LeaveScope
I run into some issues with how to reliably verify the unit
has entered or left the scope. I tried using the same way as
in relationunit_test.go - RelationScopeWatcher, but it didn't
work. So I decided to add a small function to state.RelationUnit,
called InScope() bool, and updated the state tests to verify it
works. I use InScope() in the uniter_test.go
https://code.launchpad.net/~dimitern/juju-core/106-apiserver-uniter-relationunit-ops/+merge/180597
(do not edit description out of merge proposal)
Patch Set 1 #
Total comments: 19
Patch Set 2 : state/apiserver: Last batch of Uniter API calls #
MessagesTotal messages: 4
|