From 266717afcc01c9ae2f9b4e8cfc2db08aad83de97 Mon Sep 17 00:00:00 2001 From: Wesley Wiedenmeier Date: Fri, 18 Mar 2016 12:17:15 -0500 Subject: Handle static ip= entries by appending a static subnet to the device --- cloudinit/net/__init__.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cloudinit') diff --git a/cloudinit/net/__init__.py b/cloudinit/net/__init__.py index 2bfaf149..88d0061c 100644 --- a/cloudinit/net/__init__.py +++ b/cloudinit/net/__init__.py @@ -303,6 +303,9 @@ def load_klibc_net_cfg(data_mapping): entry_ns['subnets'].append({'type': 'dhcp4'}) if data_mapping.get('IPV6ADDR'): entry_ns['subnets'].append({'type': 'dhcp6'}) + elif data_mapping.get('PROTO') in ['static', 'none']: + entry_ns['subnets'].append( + {'type': 'static', 'address': data_mapping.get('IPV4ADDR')}) if data_mapping.get('IPV4ADDR'): entry_ns['address'] = data_mapping['IPV4ADDR'] -- cgit v1.2.3