mirror of
https://github.com/MikroWizard/mikroman.git
synced 2025-07-22 03:34:34 +02:00
Fix routers scannaing with tunnel peer2
This commit is contained in:
parent
e6930e3a1a
commit
dce4458d7b
1 changed files with 12 additions and 1 deletions
|
@ -312,6 +312,17 @@ def scan_with_ip(*args, **kwargs):
|
|||
if 'no such command' not in str(e):
|
||||
log.error(e)
|
||||
pass
|
||||
try:
|
||||
call = router.api.path(
|
||||
"/system/license"
|
||||
)
|
||||
license = tuple(call)
|
||||
license: Dict[str, str] = license[0]
|
||||
result.update(license)
|
||||
except Exception as e:
|
||||
if 'no such command' not in str(e):
|
||||
log.error(e)
|
||||
pass
|
||||
call = router.api.path(
|
||||
"/system/identity"
|
||||
)
|
||||
|
@ -347,7 +358,7 @@ def scan_with_ip(*args, **kwargs):
|
|||
device['update_availble']=is_availbe
|
||||
device['upgrade_availble']=upgrade_availble
|
||||
device['current_firmware']=current
|
||||
device['mac']=result['interface']['mac-address'] if "mac-address" in result['interface'] else 'tunnel'
|
||||
device['mac']=result['interface']['mac-address'] if "mac-address" in result['interface'] else 'tunnel-'+result['software-id']
|
||||
device['name']=result['name']
|
||||
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']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue