Skip to content

Commit

Permalink
Use netbox defined interfaces if input is None
Browse files Browse the repository at this point in the history
  • Loading branch information
stveit committed Sep 14, 2023
1 parent a167904 commit d864cb2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/nav/portadmin/napalm/juniper.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,8 @@ def set_poe_state(self, interface: manage.Interface, state: PoeState):
def get_poe_states(
self, interfaces: Sequence[manage.Interface] = None
) -> Dict[int, Optional[PoeState]]:
if interfaces is None:
interfaces = self.netbox.interfaces

Check warning on line 472 in python/nav/portadmin/napalm/juniper.py

View check run for this annotation

Codecov / codecov/patch

python/nav/portadmin/napalm/juniper.py#L472

Added line #L472 was not covered by tests
if len(interfaces) == 0:
return {}
elif len(interfaces) == 1:
Expand Down

0 comments on commit d864cb2

Please sign in to comment.