Merge lp:~jtv/juju-core/mpv-singleton into lp:~maas-maintainers/juju-core/maas-provider-skeleton
Proposed by
Jeroen T. Vermeulen
Status: | Rejected |
---|---|
Rejected by: | Jeroen T. Vermeulen |
Proposed branch: | lp:~jtv/juju-core/mpv-singleton |
Merge into: | lp:~maas-maintainers/juju-core/maas-provider-skeleton |
Diff against target: |
52 lines (+13/-12) 2 files modified
environs/maas/environ.go (+1/-1) environs/maas/environprovider.go (+12/-11) |
To merge this branch: | bzr merge lp:~jtv/juju-core/mpv-singleton |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
MAAS Maintainers | Pending | ||
Review via email: mp+145777@code.launchpad.net |
Commit message
Instantiate & register the MAAS environment provider. Make maasEnvironProv
Description of the change
This was cargo-culted off the EC2 provider: create a singleton instance of the maasEnvironProv
There is a difference, discussed with John Meinel: where the EC2 and OpenStack providers create a singleton instance but then register a separate instance, this code really uses just a single instance. We believe this is what the EC2 code intended. The OpenStack provider was cargo-culted off that one, so the fact that it does the same thing as the EC2 one is not particularly significant.
Jeroen
To post a comment you must log in.
We discussed this some more, with Roger Peppe as well. Turns out the singleton is really just a holdover from the time before Environ.Provider(). That simplifies things a bit. Environ.Provider() can just hand out pointers to instances it creates on the fly.