juju/juju — pull request #78 by dimitern (2014-06-11 15:16:43+00:00)
Title: state: Pending networks and related ops

Created a new collection "pendingnetworks",
which contains information about networks
we'll get from the provider, but before we
can use them in juju (i.e. they have no juju
name, only provider id, and the user has to
explicitly request to "promote" them). Later,
we'll use the result of Environ.ListNetworks()
call to update pending networks in state.

Several new state.State methods added:
- UpdatePendingNetworks() - creates/updates pending
networks given a []network.BasicInfo from the provider.
- PendingNetwork(providerId) - returns a single network
as network.BasicInfo or a NotFound error.
- AllPendingNetworks() - returns all pending networks as
[]network.BasicInfo.

In the networks package, added a IsVLANTag() helper to
centralize VLAN tags validation, and added tests.