File tree Expand file tree Collapse file tree
netjsonconfig/backends/airos Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def encryption(interface):
2929 """
3030 Return the encryption dict for a wireless interface
3131 """
32- return interface ['wireless' ][ 'encryption' ]
32+ return interface ['wireless' ]. get ( 'encryption' , { 'protocol' : 'none' })
3333
3434
3535def flowcontrol (interface ):
Original file line number Diff line number Diff line change @@ -48,6 +48,9 @@ def authentication(interface):
4848
4949
5050def ap_accounting (interface ):
51+ """
52+ Returns the ``acct`` dict for ``access_point`` interfaces
53+ """
5154 result = {}
5255 if protocol (interface ) == 'wpa2_enterprise' :
5356 enc = encryption (interface )
@@ -59,6 +62,9 @@ def ap_accounting(interface):
5962 return result
6063
6164def sta_accounting (interface ):
65+ """
66+ Returns the ``acct`` dict for ``station`` interfaces
67+ """
6268 return {}
6369
6470
Original file line number Diff line number Diff line change 2828
2929
3030def status (interface ):
31+ """
32+ Return the ``wireless`` status
33+ """
3134 if interface .get ('disabled' ):
3235 return 'disabled'
3336 else :
Original file line number Diff line number Diff line change 1- from interface import encryption , ssid
1+ from . interface import encryption , ssid
22
33
44def ap_no_encryption (interface ):
You can’t perform that action at this time.
0 commit comments