Skip to content

Commit

Permalink
state_diff: include the lo interface in the diff
Browse files Browse the repository at this point in the history
  • Loading branch information
daniloegea committed Oct 27, 2023
1 parent 41aa6e3 commit ae0a302
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions netplan_cli/cli/state_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,6 @@ def _analyze_missing_interfaces(self, report: dict) -> None:

system_only = []
for iface in self.system_state.interface_list:
# Let's not show the loopback interface as missing
if iface.name == 'lo':
continue
if iface.netdef_id not in netplan_interfaces:
system_only.append(iface.name)

Expand Down
4 changes: 2 additions & 2 deletions tests/cli/test_state_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ def test_diff_missing_netplan_interface(self):

missing = diff_data.get('missing_interfaces_netplan', [])
self.assertIn('eth0', missing)
# lo is filtered out
self.assertNotIn('lo', missing)
# lo is included
self.assertIn('lo', missing)

def test_diff_missing_system_interface(self):
with open(self.path, "w") as f:
Expand Down

0 comments on commit ae0a302

Please sign in to comment.