Port range support in the firewaller.

The firewaller watches the openedPorts collection, the ports field on units is no longer updated.

This work fixes https://bugs.launchpad.net/juju-core/+bug/1337817
yup, it's not your fault. that pattern is rife inside the api server. It's
on my list to address after i'm done fixing fake authorizer


On Thu, Aug 14, 2014 at 7:58 PM, Domas Monkus <notifications@github.com>
wrote:

> In state/apiserver/common/portswatcher.go:
>
> > +		getCanWatch: getCanWatch,
> > +	}
> > +}
> > +
> > +// WatchOpenedPorts returns a StringsWatcher that observes the changes in
> > +// the openedPorts configuration.
> > +func (o *OpenedPortsWatcher) WatchOpenedPorts() (params.StringsWatchResult, error) {
> > +	nothing := params.StringsWatchResult{}
> > +
> > +	canWatch, err := o.getCanWatch()
> > +	if err != nil {
> > +		return nothing, err
> > +	}
> > +	// Using empty string for the id of the current
> > +	// environment.
> > +	if !canWatch("") {
>
> I've discussed this with @fwereade <https://github.com/fwereade> and it
> seems like the best option for now.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/juju/juju/pull/517/files#r16229731>.
>