dimitern/juju — pull request #5 by dimitern (2014-09-29 15:47:11+00:00)
Title: [WIP] uniter: open-port and close-port now sandboxed and validated

An important improvement in supporting opening and
closing port ranges for charms is to also provide
sandboxing for these operations. This PR implements
an internal caching of all pending port ranges to
open or close for the unit, as well as existing ports
opened on the unit's assigned machine by other units.
Each time open-port or close-port is called, we validate
the given range against other existing ranges on the
machine and other pending ranges and returns errors
when there's a conflict. Ports are only actually opened
or closed when the current hook is committed.