DescriptionRefactoring environ mongo functions and version.
This branch started as one to move the Mongo tool selection functions out of
environs/tools.go and into their own file. I also changed the parameters to
be only what the function actually needed. This made the call-sites simpler
too.
Then I added a few more helper functions to the versions package, and started
using them in locations in the code. Too many places were using
version.Current when what they actually wanted was a string representation of
the version number, or the default series. Additional methods were added for
CurrentSeries, and CurrentArch, so they could be exposed independently of
version.Current.
A DefaultSeries method is added to express the intent that by default we
support precise, and have this different to version.Current, or
version.CurrentSeries, which represents the current machine that the code is
running on.
Putting fake tools was modified in dummy to put both the current series, and
the default series if it is different to the current series. Same for the
other putFakeTools functions that were used by ec2 and openstack. That method
was extracted into a common testing package, but had to be in a new package as
there were circular dependencies trying to use the main testing module due to
internal test in environs.
https://code.launchpad.net/~thumper/juju-core/mongo-driveby/+merge/156992
(do not edit description out of merge proposal)
Patch Set 1 #
Total comments: 20
Patch Set 2 : Refactoring environ mongo functions and version. #
Total comments: 3
Patch Set 3 : Refactoring environ mongo functions and version. #
Total comments: 1
Patch Set 4 : Refactoring environ mongo functions and version. #
MessagesTotal messages: 13
|