Merge ~smoser/cloud-init:bug/1642679-more-openstack-nic-types into cloud-init:master

Proposed by Scott Moser
Status: Merged
Merged at revision: 2d2ec70f06015f0624f1d0d328cc97f1fb5c29de
Proposed branch: ~smoser/cloud-init:bug/1642679-more-openstack-nic-types
Merge into: cloud-init:master
Diff against target: 34 lines (+14/-2)
1 file modified
cloudinit/sources/helpers/openstack.py (+14/-2)
Reviewer Review Type Date Requested Status
Adrian Vladu (community) Approve
Alessandro Pilotti (community) Approve
Ryan Harper Approve
Review via email: mp+311548@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Ryan Harper (raharper) :
review: Approve
Revision history for this message
Alessandro Pilotti (alexpilotti) :
review: Approve
Revision history for this message
Adrian Vladu (avladu) :
review: Approve

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/cloudinit/sources/helpers/openstack.py b/cloudinit/sources/helpers/openstack.py
index 61b0b08..42db5c2 100644
--- a/cloudinit/sources/helpers/openstack.py
+++ b/cloudinit/sources/helpers/openstack.py
@@ -61,6 +61,19 @@ OS_VERSIONS = (
61 OS_LIBERTY,61 OS_LIBERTY,
62)62)
6363
64PHYSICAL_TYPES = (
65 None,
66 'bridge',
67 'ethernet',
68 'hw_veb',
69 'hyperv',
70 'ovs',
71 'phy',
72 'tap',
73 'vhostuser',
74 'vif',
75)
76
6477
65class NonReadable(IOError):78class NonReadable(IOError):
66 pass79 pass
@@ -583,8 +596,7 @@ def convert_net_json(network_json=None, known_macs=None):
583 subnet['ipv6'] = True596 subnet['ipv6'] = True
584 subnets.append(subnet)597 subnets.append(subnet)
585 cfg.update({'subnets': subnets})598 cfg.update({'subnets': subnets})
586 if link['type'] in [None, 'ethernet', 'vif', 'ovs', 'phy',599 if link['type'] in PHYSICAL_TYPES:
587 'bridge', 'tap']:
588 cfg.update({'type': 'physical', 'mac_address': link_mac_addr})600 cfg.update({'type': 'physical', 'mac_address': link_mac_addr})
589 elif link['type'] in ['bond']:601 elif link['type'] in ['bond']:
590 params = {}602 params = {}

Subscribers

People subscribed via source and target branches