Skip to content

Commit

Permalink
Loop over interfaces and parameterize the interface name
Browse files Browse the repository at this point in the history
Signed-off-by: Mohammed Boukhalfa <mohammed.boukhalfa@est.tech>
  • Loading branch information
mboukhalfa committed Sep 20, 2024
1 parent 791418e commit ea7810a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions fake-ipa/fake_ipa/inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,21 @@ def inspect(system, inspection_callback_url, verify, cert, logger):
"lldp": None,
"product": "0x0001",
"vendor": "0x1af4",
"name": "eth1",
"name": nic.get("name", f"enp{i+1}s0"),
"has_carrier": True,
"ipv4_address": system.get("nics")[0]["ip"] or None,
"ipv4_address": nic.get("ip"),
"client_id": None,
"mac_address": system.get("nics")[0]["mac"],
"mac_address": nic.get("mac"),
}
],
for i, nic in enumerate(system.get("nics"))
],
"cpu": {
"count": 2,
"frequency": "2100.084",
"flags": ["fpu", "mmx", "fxsr", "sse", "sse2"],
"architecture": "x86_64",
},
},
},
}

@tenacity.retry(
Expand Down

0 comments on commit ea7810a

Please sign in to comment.