[cli] add "dataset active|pending -ns" support (#11518)

This CLI command argument "-ns" prints out the dataset fields and
redact the sensitive values, including the network key and PSKc
fields.
This commit is contained in:
Tony Zhou
2025-06-03 08:20:49 -07:00
committed by GitHub
parent ea3a3da0ee
commit 5050bec030
4 changed files with 108 additions and 26 deletions
+11
View File
@@ -45,6 +45,17 @@ expect -re {Network Name: [^\r\n]+}
expect -re {PAN ID: 0x[0-9a-f]{4}}
expect -re {PSKc: [0-9a-f]{32}}
expect -re {Security Policy: \d+ o?n?r?c?b?}
send "dataset active -ns\n"
expect -re {Active Timestamp: \d+}
expect -re {Channel: (\d+)}
expect -re {Channel Mask: 0x[0-9a-f]{8}}
expect -re {Ext PAN ID: [0-9a-f]{16}}
expect -re {Mesh Local Prefix: ([0-9a-f]{1,4}:){3}[0-9a-f]{1,4}::\/64}
expect -re {Network Key: \[Redacted\]}
expect -re {Network Name: [^\r\n]+}
expect -re {PAN ID: 0x[0-9a-f]{4}}
expect -re {PSKc: \[Redacted\]}
expect -re {Security Policy: \d+ o?n?r?c?b?}
send "dataset pending\n"
expect "Error 23: NotFound"
send "dataset init active\n"