Skip to content

Commit

Permalink
[java-matter-controller] Remove pairing ethernet command (#24891)
Browse files Browse the repository at this point in the history
  • Loading branch information
yufengwangca authored and pull[bot] committed Oct 17, 2023
1 parent 57b81c2 commit 1567289
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ jobs:
--target linux-x64-java-matter-controller \
build \
"
- name: Run Discover Tests
- name: Run Discover Commissionables Test
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh \
Expand All @@ -523,7 +523,7 @@ jobs:
--tool-args "commissionables" \
--factoryreset \
'
- name: Run Pairing Tests
- name: Run Pairing over Onnetwork Test
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh \
Expand Down
1 change: 0 additions & 1 deletion examples/java-matter-controller/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ java_binary("java-matter-controller") {
"java/src/com/matter/controller/commands/pairing/PairCodePaseCommand.java",
"java/src/com/matter/controller/commands/pairing/PairCodeThreadCommand.java",
"java/src/com/matter/controller/commands/pairing/PairCodeWifiCommand.java",
"java/src/com/matter/controller/commands/pairing/PairEthernetCommand.java",
"java/src/com/matter/controller/commands/pairing/PairOnNetworkCommand.java",
"java/src/com/matter/controller/commands/pairing/PairOnNetworkCommissionerCommand.java",
"java/src/com/matter/controller/commands/pairing/PairOnNetworkCommissioningModeCommand.java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ private static void registerCommandsPairing(
new PairCodeWifiCommand(controller, credentialsIssuer);
PairCodeThreadCommand pairCodeThreadCommand =
new PairCodeThreadCommand(controller, credentialsIssuer);
PairEthernetCommand pairEthernetCommand =
new PairEthernetCommand(controller, credentialsIssuer);
PairOnNetworkCommand pairOnNetworkCommand =
new PairOnNetworkCommand(controller, credentialsIssuer);
PairOnNetworkShortCommand pairOnNetworkShortCommand =
Expand All @@ -83,7 +81,6 @@ private static void registerCommandsPairing(
clusterCommands.add(pairCodePaseCommand);
clusterCommands.add(pairCodeWifiCommand);
clusterCommands.add(pairCodeThreadCommand);
clusterCommands.add(pairEthernetCommand);
clusterCommands.add(pairOnNetworkCommand);
clusterCommands.add(pairOnNetworkShortCommand);
clusterCommands.add(pairOnNetworkLongCommand);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ public void setValue(String value) {
try {
IPAddress ipAddress = (IPAddress) mValue;
ipAddress.setAddress(InetAddress.getByName(value));
} catch (UnknownHostException e) {
isValidArgument = true;
} catch (UnknownHostException e) {
isValidArgument = false;
}
break;
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public abstract class PairingCommand extends MatterCommand
private final StringBuffer mPassword = new StringBuffer();
private final StringBuffer mOnboardingPayload = new StringBuffer();
private final StringBuffer mDiscoveryFilterInstanceName = new StringBuffer();

private static Logger logger = Logger.getLogger(PairingCommand.class.getName());

public long getNodeId() {
Expand Down Expand Up @@ -206,12 +205,6 @@ public PairingCommand(
addArgument("device-remote-ip", mRemoteAddr, false);
addArgument("device-remote-port", (short) 0, Short.MAX_VALUE, mRemotePort, null, false);
break;
case ETHERNET:
addArgument("setup-pin-code", 0, 134217727, mSetupPINCode, null, false);
addArgument("discriminator", (short) 0, (short) 4096, mDiscriminator, null, false);
addArgument("device-remote-ip", mRemoteAddr, false);
addArgument("device-remote-port", (short) 0, Short.MAX_VALUE, mRemotePort, null, false);
break;
}

switch (filterType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,5 @@ public enum PairingModeType {
CODE_PASE_ONLY,
BLE,
SOFT_AP,
ETHERNET,
ON_NETWORK;
}
2 changes: 1 addition & 1 deletion scripts/tests/java/commissioning_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ def TestCmdOnnetworkLong(self, nodeid, setuppin, discriminator, timeout):
return java_process.wait()

def RunTest(self):
logging.info("Testing onnetwork-long pairing")
if self.command_name == 'onnetwork-long':
logging.info("Testing pairing over onnetwork-long")
code = self.TestCmdOnnetworkLong(self.nodeid, self.setup_payload, self.discriminator, self.timeout)
if code != 0:
raise Exception(f"Testing onnetwork-long pairing failed with error {code}")
Expand Down

0 comments on commit 1567289

Please sign in to comment.