~harlowja/cloud-init/cloud-init-fix-configobj-bound

Viewing all changes in revision 1255.

  • Committer: Scott Moser
  • Date: 2016-07-14 18:25:09 UTC
  • mfrom: (1245.1.5 trunk.lp1602373)
  • Revision ID: smoser@ubuntu.com-20160714182509-3u0osx9bxrwflke3
ConfigDrive: fix writing of 'injected' files and legacy networking

Previous commit inadvertently disabled the consumption of 'injected' files
in configdrive (openstack server boot --file=/target/file=local-file)
unless the datasource was in 'pass' mode. The default mode is 'net' so
that was not likely to happen.

Also here are:
a.) some comments to apply_network_config

b.) add backwards compatibility for distros that do not yet implement
    apply_network_config by converting the network config into ENI format
    and calling apply_network.

    This is required because prior to the previous commit, those distros
    would have had 'apply_network' called with the openstack provided
    ENI file. But after this change they will have apply_network_config
    called by cloudinit's main.

c.) add network_state_to_eni for converting net config to eni
    it supports the not-actually-correct 'hwaddress' field in ENI

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: