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
(CLA) [1].

If you have already signed it as an individual, your Launchpad user will
be listed in the contributor-agreement-canonical launchpad group [2].
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.pow...@canonical.com or ping powersj in #cloud-init channel
via freenode.

For information on how to sign, please see the HACKING document [3].

Thanks again, and please feel free to reach out with any questions.

–
[1] http://www.canonical.com/contributors
[2] https://launchpad.net/~contributor-agreement-canonical/+members
[3] http://cloudinit.readthedocs.io/en/latest/topics/hacking.html


Diff comments:

> 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).

>                  subnet.update({
>                      'type': t,
>                  })


-- 
https://code.launchpad.net/~harald-jensas/cloud-init/+git/cloud-init/+merge/373932
Your team cloud-init Commiters is requested to review the proposed merge of 
~harald-jensas/cloud-init:bug/1847517 into cloud-init:master.

_______________________________________________
Mailing list: https://launchpad.net/~cloud-init-dev
Post to     : cloud-init-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~cloud-init-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to