@@ -1141,8 +1141,12 @@ def check_pics(self, pics_key: str) -> bool:
1141
1141
def is_pics_sdk_ci_only (self ) -> bool :
1142
1142
return self .check_pics ('PICS_SDK_CI_ONLY' )
1143
1143
1144
- async def openCommissioningWindow (self , dev_ctrl : ChipDeviceCtrl , node_id : int , timeout : int = 900 ) -> CustomCommissioningParameters :
1144
+ async def open_commissioning_window (self , dev_ctrl : Optional [ ChipDeviceCtrl ] = None , node_id : Optional [ int ] = None , timeout : int = 900 ) -> CustomCommissioningParameters :
1145
1145
rnd_discriminator = random .randint (0 , 4095 )
1146
+ if dev_ctrl is None :
1147
+ dev_ctrl = self .default_controller
1148
+ if node_id is None :
1149
+ node_id = self .dut_node_id
1146
1150
try :
1147
1151
commissioning_params = await dev_ctrl .OpenCommissioningWindow (nodeid = node_id , timeout = timeout , iteration = 1000 ,
1148
1152
discriminator = rnd_discriminator , option = 1 )
@@ -1166,7 +1170,6 @@ async def read_single_attribute_check_success(
1166
1170
if node_id is None :
1167
1171
node_id = self .dut_node_id
1168
1172
if endpoint is None :
1169
- #endpoint = 0 if self.matter_test_config.endpoint is None else self.matter_test_config.endpoint
1170
1173
endpoint = self .get_endpoint ()
1171
1174
1172
1175
result = await dev_ctrl .ReadAttribute (node_id , [(endpoint , attribute )], fabricFiltered = fabric_filtered )
@@ -1199,7 +1202,6 @@ async def read_single_attribute_expect_error(
1199
1202
if node_id is None :
1200
1203
node_id = self .dut_node_id
1201
1204
if endpoint is None :
1202
- #endpoint = 0 if self.matter_test_config.endpoint is None else self.matter_test_config.endpoint
1203
1205
endpoint = self .get_endpoint ()
1204
1206
1205
1207
result = await dev_ctrl .ReadAttribute (node_id , [(endpoint , attribute )], fabricFiltered = fabric_filtered )
@@ -1248,7 +1250,6 @@ async def send_single_cmd(
1248
1250
if node_id is None :
1249
1251
node_id = self .dut_node_id
1250
1252
if endpoint is None :
1251
- #endpoint = 0 if self.matter_test_config.endpoint is None else self.matter_test_config.endpoint
1252
1253
endpoint = self .get_endpoint ()
1253
1254
1254
1255
result = await dev_ctrl .SendCommand (nodeid = node_id , endpoint = endpoint , payload = cmd , timedRequestTimeoutMs = timedRequestTimeoutMs ,
@@ -1842,7 +1843,6 @@ def convert_args_to_matter_config(args: argparse.Namespace) -> MatterTestConfig:
1842
1843
config .pics = {} if args .PICS is None else read_pics_from_file (args .PICS )
1843
1844
config .tests = [] if args .tests is None else args .tests
1844
1845
config .timeout = args .timeout # This can be none, we pull the default from the test if it's unspecified
1845
- #config.endpoint = args.endpoint
1846
1846
config .endpoint = args .endpoint # This can be None, the get_endpoint function allows the tests to supply a default
1847
1847
config .app_pid = 0 if args .app_pid is None else args .app_pid
1848
1848
0 commit comments