From ec53529b33c22eb54f6d9af5aa14e4ef74340963 Mon Sep 17 00:00:00 2001 From: Dan Radez Date: Tue, 12 Apr 2016 14:39:32 -0400 Subject: Adding VLAN support JIRA: APEX-136 JIRA: APEX-30 Change-Id: I7cbbe11f4c1f1455dba253733c78fe8dc215de97 Signed-off-by: Dan Radez --- lib/python/apex/network_settings.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/python/apex/network_settings.py') diff --git a/lib/python/apex/network_settings.py b/lib/python/apex/network_settings.py index 9df8a1de..475082df 100644 --- a/lib/python/apex/network_settings.py +++ b/lib/python/apex/network_settings.py @@ -84,6 +84,11 @@ class NetworkSettings: given NIC in the system. The resulting config in settings object will be an ipaddress.network object, replacing the NIC name. """ + # if vlan not defined then default it to native + if network is not constants.ADMIN_NETWORK: + if 'vlan' not in self.settings_obj[network]: + self.settings_obj[network]['vlan'] = 'native' + cidr = self.settings_obj[network].get('cidr') nic_name = self.settings_obj[network].get('bridged_interface') -- cgit 1.2.3-korg