Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion coriolis/osmorphing/netpreserver/ifcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ def _get_ifcfgs_by_type(self, ifcfg_type, network_scripts_path):
ifcfgs = []
for ifcfg_file in self._get_net_config_files(network_scripts_path):
ifcfg = self.osmorphing_tool._read_config_file_sudo(ifcfg_file)
if ifcfg.get("TYPE") == ifcfg_type:
detected_type = ifcfg.get('TYPE')
if not detected_type:
detected_type = "Ethernet"
ifcfg["TYPE"] = detected_type
if detected_type.lower() == ifcfg_type.lower():
ifcfgs.append((ifcfg_file, ifcfg))
return ifcfgs