Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
fix: get device logs
Browse files Browse the repository at this point in the history
  • Loading branch information
jjeff07 committed Feb 18, 2022
1 parent 8082224 commit dfd7a33
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ipfabric/tools/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ def get_log(self, device: str, snapshot_id: str = None):
device = self._validate_device(device, snapshot_id=snapshot_id, log=True)
if not device["sn"]:
return None
return self.get_test_log(device)

def get_test_log(self, device: dict):
res = self.ipf.get("/os/logs/task/" + device["taskKey"])
res.raise_for_status()
return res.text

0 comments on commit dfd7a33

Please sign in to comment.