mirror of
https://github.com/MikroWizard/mikroman.git
synced 2025-06-29 16:47:29 +02:00
Fix scan bug not finding vm/pc installations
This commit is contained in:
parent
43b894bd23
commit
4b52bcc0c3
2 changed files with 43 additions and 28 deletions
|
@ -301,14 +301,17 @@ def scan_with_ip(*args, **kwargs):
|
|||
)
|
||||
results = tuple(call)
|
||||
result: Dict[str, str] = results[0]
|
||||
|
||||
call = router.api.path(
|
||||
"/system/routerboard"
|
||||
)
|
||||
routerboard = tuple(call)
|
||||
routerboard: Dict[str, str] = routerboard[0]
|
||||
result.update(routerboard)
|
||||
|
||||
try:
|
||||
call = router.api.path(
|
||||
"/system/routerboard"
|
||||
)
|
||||
routerboard = tuple(call)
|
||||
routerboard: Dict[str, str] = routerboard[0]
|
||||
result.update(routerboard)
|
||||
except Exception as e:
|
||||
if 'no such command' not in str(e):
|
||||
log.error(e)
|
||||
pass
|
||||
call = router.api.path(
|
||||
"/system/identity"
|
||||
)
|
||||
|
@ -346,7 +349,12 @@ def scan_with_ip(*args, **kwargs):
|
|||
device['current_firmware']=current
|
||||
device['mac']=result['interface']['mac-address'] if "mac-address" in result['interface'] else 'tunnel'
|
||||
device['name']=result['name']
|
||||
device['details']=result['board-name'] + " " + result['model'] if result['model']!=result['board-name'] else result['model']
|
||||
if 'board-name' in result and 'mdoel' in result:
|
||||
device['details']=result['board-name'] + " " + result['model'] if result['model']!=result['board-name'] else result['model']
|
||||
elif 'board-name' in result:
|
||||
device['details']=result['board-name']
|
||||
else:
|
||||
device['details']='x86/64'
|
||||
device['uptime']=result['uptime']
|
||||
device['license']=""
|
||||
device['interface']=result['interface']['name']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue