aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/objects.py
diff options
context:
space:
mode:
Diffstat (limited to 'os_net_config/objects.py')
-rw-r--r--os_net_config/objects.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/os_net_config/objects.py b/os_net_config/objects.py
index 8115b38..bb50f18 100644
--- a/os_net_config/objects.py
+++ b/os_net_config/objects.py
@@ -133,11 +133,14 @@ class _BaseOpts(object):
persist_mapping=False):
numbered_nic_names = _numbered_nics(nic_mapping)
self.hwaddr = None
+ self.hwname = None
+ self.renamed = False
if name in numbered_nic_names:
if persist_mapping:
self.name = name
- hwname = numbered_nic_names[name]
- self.hwaddr = utils.interface_mac(hwname)
+ self.hwname = numbered_nic_names[name]
+ self.hwaddr = utils.interface_mac(self.hwname)
+ self.renamed = True
else:
self.name = numbered_nic_names[name]
else: