Code review comment for lp:~themue/juju-core/go-firewaller-global-mode

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

https://codereview.appspot.com/6635043/diff/1/environs/dummy/environs.go
File environs/dummy/environs.go (right):

https://codereview.appspot.com/6635043/diff/1/environs/dummy/environs.go#newcode590
environs/dummy/environs.go:590: if inst.defaultFirewall() {
On 2012/10/08 16:10:36, rog wrote:
> i think this would be clearer (and easier to change if we ever add
modes) as:

> switch inst.e.Config().FirewallMode() {
> case config.FwDefault:
> ....
> case config.FwGlobal:
> ....
> default:
> panic("unknown mode")
> }

> FWIW, i think config.FwDefault is not a great name. FwPerInstance
would make it
> clearer what the default behaviour is intended to be.

The reason for FwDefault is that different environments may only be able
to support a given kind of firewall. PerInstance, for example, is not
entirely true. It's per security group, and that mode is unsupported by
MaaS.

https://codereview.appspot.com/6635043/

« Back to merge proposal