Configuration implementation

Gustavo Niemeyer gustavo.niemeyer at canonical.com
Tue Jul 17 02:35:32 UTC 2012


So, as we discussed today, here is the branch implementing something
very close to the proposal sent to the list last week:

    https://codereview.appspot.com/6408049

I have follow up changes associated with Validate that I want to
propose next, but I decided to stop here both because it's a good and
clear chunk, and also because it shows up how much the environment
implementation itself is *not* changing. For example,

    https://codereview.appspot.com/6408049/diff/2001/environs/ec2/ec2.go
    https://codereview.appspot.com/6408049/diff/2001/environs/ec2/config.go

William, you've raised two important points: first, the fact you were
concerned about the environment configuration not being validated. As
originally suggested, this seems well covered in the entry points for
loading an environment:

    https://codereview.appspot.com/6408049/diff/2001/environs/open.go

Then, the second point was about issues with set-env. I believe the
proposed interface for Validate has that well covered too. I'll handle
it next as mentioned, but you can already see the way it's going to be
called above, and its interface is documented on:

    https://codereview.appspot.com/6408049/diff/2001/environs/interface.go

In addition to that, I'd like to highlight the fact that with this we
have a single Config type across the board on all public APIs (state
support for it will come later), with a simple implementation that
handles all common fields, including authorized keys:

    https://codereview.appspot.com/6408049/diff/2001/environs/config/config.go

Curiously, a bunch of fixes had to be done because the handling of
authorized-keys was not really common across the providers:

    https://codereview.appspot.com/6408049/diff/2001/cmd/juju/main_test.go

I'm afraid we've debated this issue enough for it to have grown out of
proportion, but this is still the same proposal made on top of
William's suggestion here on the mailing list, and looking at it
implemented still feels like the right way to go.

I'm pushing it for review, fully tested, and will work on the follow
up clean ups, support for Validate, and support in state in separate
CLs if/when we get agreement.


gustavo @ http://niemeyer.net



More information about the Juju-dev mailing list