nplan: correctly generate ipv6 and ipv4 netmask addresses
It appears that the internal networking state parses netmask as
netmask for ipv4, yet as a cidr for ipv6, resulting in mask2cidr
failing as the passed value is not an integer. This feels like a
workaround to me. I think mask2cidr should cash the arguments passed
to int, into a string first.
Fix examples that reference upstream chef repository.
Also add integration test. Note: this new test is not comprehensive; it
simply ensures that the example chef configuration does not blow up and
that chef seems to be installed after its completion.
This new test is disabled by default as it depends on a 3rd party
repository.
Add a basic snapcraft.yaml file to allow the execution of cloud-init as
a snap. This will always pull down the latest source from master for
the snap. setup.py will now also set the default init system to be
systemd when no other is passed to it.
DigitalOcean: assign IPv4ll address to lowest indexed interface.
Previously the IPv4LL address for metadata discovery was assigned to the
first interfaces from an alphabetic sort. On DigitalOcean, the metadata
is only accessible from the first interface. This fixes a problem where the
IPv4LL address is bound to the wrong interface with snapshots.
This is part of general improvements to the DigitalOcean Datasource in bug 1676908.
DigitalOcean: configure all NICs presented in meta-data.
Instead of only configuring 'public' and 'private' interfaces, we want
to configure any that has been defined in the meta-data. For legacy reasons,
the 'public' and 'private' interfaces are maintained as 'eth0' and 'eth1'
respectively.
This is part of bug 1676908 for general DigitalOcean datasource fixups.