cloud-init-dev team mailing list archive
Mailing list archive
Re: [Merge] ~harald-jensas/cloud-init:bug/1847517 into cloud-init:master
thanks for the well done bug report and merge proposal!
Please add a test to the unfortunately long and difficult to follow tests/unittests/test_net.py .
Also, as this is your first submission:
To contribute, you must sign the Canonical Contributor License Agreement
If you have already signed it as an individual, your Launchpad user will
be listed in the contributor-agreement-canonical launchpad group .
Unfortunately there is no easy way to check if an organization or company
you are doing work for has signed. If you are unsure or have questions,
email josh.powers@xxxxxxxxxxxxx or ping powersj in #cloud-init channel
For information on how to sign, please see the HACKING document .
Thanks again, and please feel free to reach out with any questions.
> diff --git a/cloudinit/sources/helpers/openstack.py b/cloudinit/sources/helpers/openstack.py
> index 8f06911..d1c4601 100644
> --- a/cloudinit/sources/helpers/openstack.py
> +++ b/cloudinit/sources/helpers/openstack.py
> @@ -585,7 +585,8 @@ def convert_net_json(network_json=None, known_macs=None):
> subnet = dict((k, v) for k, v in network.items()
> if k in valid_keys['subnet'])
> if 'dhcp' in network['type']:
> - t = 'dhcp6' if network['type'].startswith('ipv6') else 'dhcp4'
> + t = (network['type'] if network['type'].startswith('ipv6')
> + else 'dhcp4')
I don't love that a unknown network type 'dhcp6wobbly' will just be passed directly on here. I'd rather raise exception as unknown type than rely on it just happening to work (which in this case would take the DHCPV6C path above).
> 'type': t,
Your team cloud-init Commiters is requested to review the proposed merge of ~harald-jensas/cloud-init:bug/1847517 into cloud-init:master.