@@ -342,9 +342,9 @@ def cleanup(self):
342
342
343
343
def build (self ):
344
344
# Build stations
345
- self .station_profile .use_security (self .security ,
346
- self .ssid ,
347
- self .password )
345
+ self .station_profile .use_security (security_type = self .security ,
346
+ ssid = self .ssid ,
347
+ passwd = self .password )
348
348
self .station_profile .set_number_template (self .number_template )
349
349
350
350
print ("Creating stations" )
@@ -403,18 +403,18 @@ def build(self):
403
403
sgi = self .set_txo_data ["sgi" ],
404
404
)
405
405
406
- if self .station_profile .create (
407
- radio = self .radio ,
408
- sta_names_ = self .sta_list ,
409
- debug = self .debug ,
410
- up_ = self .up ):
406
+ if self .station_profile .create (radio = self .radio ,
407
+ sta_names_ = self .sta_list ,
408
+ debug = self .debug ,
409
+ up_ = self .up ):
411
410
self ._pass ("Stations created." )
412
411
else :
413
412
self ._fail ("Stations not properly created." )
414
413
# Custom Wifi setting
415
414
if self .custom_wifi_cmd :
416
415
for sta in self .sta_list :
417
- self .set_custom_wifi (resource = int (sta .split ('.' )[1 ]), station = str (sta .split ('.' )[2 ]),
416
+ self .set_custom_wifi (resource = int (sta .split ('.' )[1 ]),
417
+ station = str (sta .split ('.' )[2 ]),
418
418
cmd = self .custom_wifi_cmd )
419
419
420
420
if self .up :
@@ -438,8 +438,13 @@ def modify_radio(self, mgr, radio, antenna, channel, tx_power, country_code):
438
438
shelf , resource , radio , * nil = LFUtils .name_to_eid (radio )
439
439
440
440
modify_radio = lf_modify_radio .lf_modify_radio (lf_mgr = mgr )
441
- modify_radio .set_wifi_radio (_resource = resource , _radio = radio , _shelf = shelf , _antenna = antenna , _channel = channel ,
442
- _txpower = tx_power ,_country_code = country_code )
441
+ modify_radio .set_wifi_radio (_resource = resource ,
442
+ _radio = radio ,
443
+ _shelf = shelf ,
444
+ _antenna = antenna ,
445
+ _channel = channel ,
446
+ _txpower = tx_power ,
447
+ _country_code = country_code )
443
448
444
449
def get_station_list (self ):
445
450
response = super ().json_get ("/port/list?fields=_links,alias,device,port+type" )
@@ -903,15 +908,15 @@ def main():
903
908
_custom_wifi_cmd = args .custom_wifi_cmd ,
904
909
_debug_on = args .debug )
905
910
906
- if ( not args .no_pre_cleanup ) :
911
+ if not args .no_pre_cleanup :
907
912
create_station .cleanup ()
908
913
909
914
else :
910
915
already_available_stations = create_station .get_station_list ()
911
- if ( len (already_available_stations ) > 0 ) :
916
+ if len (already_available_stations ) > 0 :
912
917
used_indices = [int (station_id .split ('sta' )[1 ]) for station_id in already_available_stations ]
913
918
for new_station in station_list :
914
- if ( new_station in already_available_stations ) :
919
+ if new_station in already_available_stations :
915
920
print ('Some stations are already existing in the LANforge from the given start id.' )
916
921
print ('You can create stations from the start id {}' .format (max (used_indices ) + 1 ))
917
922
exit (1 )
@@ -925,7 +930,7 @@ def main():
925
930
country_code = args .country_code )
926
931
create_station .build ()
927
932
928
- if ( args .cleanup ) :
933
+ if args .cleanup :
929
934
create_station .cleanup ()
930
935
931
936
if create_station .passes ():
0 commit comments