Descriptionstate: Add Machine.Networks() and create them
This adds a new method to state.Machine: Networks(),
which returns any associated networks to include or
exclude for the machine.
Added a couple of extra fields to state.MachineTemplate:
IncludeNetworks and ExcludeNetworks. Each time a new
machine or container is created, if these are populated,
they will be also saved in state for the machine, as a
linked networksDoc.
A few drive-by fixes for naming consistency, including
changing Included/ExcludedNetworks across the codebase
to Include/ExcludeNetworks to better illustrate the
intent (i.e. we're saying what networks should be
included or excluded, not how the reality is yet - we
can do that post-provisioning only).
Added tests to ensure when the new networkDocs are
missing for a service/machine .Networks() still works
and returns nil error, as suggested in reviews.
https://code.launchpad.net/~dimitern/juju-core/360-state-machine-networks/+merge/212418
(do not edit description out of merge proposal)
Patch Set 1 #
Total comments: 6
Patch Set 2 : state: Add Machine.Networks() and create them #
Total comments: 7
Patch Set 3 : state: Add Machine.Networks() and create them #Patch Set 4 : state: Add Machine.Networks() and create them #
MessagesTotal messages: 10
|