diff options
author | Scott Moser <smoser@brickies.net> | 2016-11-22 16:39:13 -0500 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2016-11-28 10:11:19 -0500 |
commit | 2d2ec70f06015f0624f1d0d328cc97f1fb5c29de (patch) | |
tree | a20fa15fba38e2c21373daa60155f466ae1eea34 /cloudinit | |
parent | 8c6878a04eff2fd75115b5f23faa2665cabb5ccd (diff) | |
download | vyos-cloud-init-2d2ec70f06015f0624f1d0d328cc97f1fb5c29de.tar.gz vyos-cloud-init-2d2ec70f06015f0624f1d0d328cc97f1fb5c29de.zip |
OpenStack: extend physical types to include hyperv, hw_veb, vhost_user.
This extends the list of device 'types' that are considered to be physical
to include hyperv, hw_veb, and vhost_user.
LP: #1642679
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/sources/helpers/openstack.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/cloudinit/sources/helpers/openstack.py b/cloudinit/sources/helpers/openstack.py index 61b0b08c..42db5c27 100644 --- a/cloudinit/sources/helpers/openstack.py +++ b/cloudinit/sources/helpers/openstack.py @@ -61,6 +61,19 @@ OS_VERSIONS = ( OS_LIBERTY, ) +PHYSICAL_TYPES = ( + None, + 'bridge', + 'ethernet', + 'hw_veb', + 'hyperv', + 'ovs', + 'phy', + 'tap', + 'vhostuser', + 'vif', +) + class NonReadable(IOError): pass @@ -583,8 +596,7 @@ def convert_net_json(network_json=None, known_macs=None): subnet['ipv6'] = True subnets.append(subnet) cfg.update({'subnets': subnets}) - if link['type'] in [None, 'ethernet', 'vif', 'ovs', 'phy', - 'bridge', 'tap']: + if link['type'] in PHYSICAL_TYPES: cfg.update({'type': 'physical', 'mac_address': link_mac_addr}) elif link['type'] in ['bond']: params = {} |