Skip to content

Commit

Permalink
check if value exists before updating fim
Browse files Browse the repository at this point in the history
  • Loading branch information
kthare10 committed Jun 22, 2024
1 parent 74c0d98 commit 395317c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions fabrictestbed_extensions/fablib/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,13 +322,16 @@ def get_device_name(self) -> str:
# logging.debug(f"iface: {self}")
os_iface = self.get_physical_os_interface_name()
vlan = self.get_vlan()
if vlan is not None:
os_iface = f"{os_iface}.{vlan}"

fablib_data["base_dev"] = os_iface

if os_iface and vlan:
os_iface = f"{os_iface}.{vlan}"

fablib_data["dev"] = os_iface

self.set_fablib_data(fablib_data)
if os_iface:
self.set_fablib_data(fablib_data)
return os_iface

except Exception as e:
Expand Down

0 comments on commit 395317c

Please sign in to comment.