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 1- from interface import ssid
1+ from interface import encryption , ssid
2+
23
34def ap_no_encryption (interface ):
45 """
@@ -23,7 +24,7 @@ def ap_wpa2_personal(interface):
2324 in ``access_point`` mode
2425 """
2526 return {
26- 'psk' : interface [ 'wireless' ][ ' encryption' ] ['key' ],
27+ 'psk' : encryption ( interface ) ['key' ],
2728 'ssid' : ssid (interface ),
2829 'key_mgmt' : [
2930 {
@@ -59,7 +60,7 @@ def sta_wpa2_personal(interface):
5960 """
6061 return {
6162 'ssid' : ssid (interface ),
62- 'psk' : interface [ 'wireless' ][ ' encryption' ] ['key' ],
63+ 'psk' : encryption ( interface ) ['key' ],
6364 # no advanced authentication methods
6465 # with psk
6566 'eap' : [
@@ -104,8 +105,8 @@ def sta_wpa2_enterprise(interface):
104105 'status' : 'enabled' ,
105106 },
106107 ],
107- 'password' : 'TODO' ,
108- 'identity' : 'TODO' ,
108+ 'password' : encryption ( interface )[ 'password' ] ,
109+ 'identity' : encryption ( interface )[ 'identity' ] ,
109110 'anonymous_identity' : 'TODO' ,
110111 'pairwise' : [
111112 {
Original file line number Diff line number Diff line change @@ -157,8 +157,8 @@ def test_wpa2_enterprise(self):
157157 'profile.1.network.1.phase2=auth' : 'MSCHAPV2' ,
158158 'profile.1.network.1.eap.1.status' : 'enabled' ,
159159 'profile.1.network.1.eap.1.name' : 'TTLS' ,
160- 'profile.1.network.1.password' : 'TODO ' ,
161- 'profile.1.network.1.identity' : 'TODO ' ,
160+ 'profile.1.network.1.password' : 'password1234 ' ,
161+ 'profile.1.network.1.identity' : 'definitely-fake-identity ' ,
162162 'profile.1.network.1.anonymous_identity' : 'TODO' ,
163163 'profile.1.network.1.pairwise.1.name' : 'CCMP' ,
164164 'profile.1.network.1.proto.1.name' : 'RSN' ,
You can’t perform that action at this time.
0 commit comments