Descriptionstate: Add machine networks and interfaces
Added a couple of entities (and related methods) in state:
* Network - holds a name, CIDR and VLAN tag; used to
describe actual configured networks that machines
need to be on.
* NetworkInterface - linked to a machine id and network
name, holds the network interface name to MAC address
mapping in state (MAC address as key for uniqueness);
machines support adding one or more NICs.
Renamed machine.Network() and st.networks to RequestedNetworks()
and st.requestedNetworks (in code only, schema remains the same).
This helps avoid confusion between the requested networks
(to include/exclude on a machine, coming from the service; they
are now called "requested networks"), and actually configured
networks on a running machine (just "networks").
For now networks are immutable, can't be removed and NICs can be
added to them only if their machine is not provisioned yet.
NICs are only removed when the machine itself is removed.
Provisioner API change: renamed Networks() to RequestedNetworks()
which is fine, because Networks() was added recently and not
released yet.
We'll use the added machine NICs to show enabled networks
in juju status later on, and they will be set at StartInstance()
time inside the provisioner. Internally, MaaS provider changes
will be needed to get NIC-to-MAC mapping for an acquired node
and the list of networks for it.
https://code.launchpad.net/~dimitern/juju-core/381-state-machine-nics/+merge/213796
Requires: https://code.launchpad.net/~dimitern/juju-core/380-provisioner-honors-networks/+merge/213647
(do not edit description out of merge proposal)
Patch Set 1 #Patch Set 2 : state: Add machine.(Set)NetworkInterfaces #
Total comments: 2
Patch Set 3 : state: Add machine networks and interfaces #
Total comments: 48
Patch Set 4 : state: Add machine networks and interfaces #
Total comments: 16
Patch Set 5 : state: Add machine networks and interfaces #
Total comments: 2
Patch Set 6 : state: Add machine networks and interfaces #Patch Set 7 : state: Add machine networks and interfaces #
MessagesTotal messages: 11
|