particle-iot / particle-cli

Command Line Interface for Particle Cloud and devices
Apache License 2.0
212 stars 92 forks source link

Add option to filter device with `particle device-protection` commands #763

Closed keeramis closed 1 month ago

keeramis commented 2 months ago

Description

As title says. The option is -d to select device ID or name.

How to Test

  1. Connect multiple devices and verify that they are readable using particle usb list
  2. Run particle device-protection status -d device-id-or-name
  3. Run particle device-protection disable -d device-id-or-name
  4. Run particle device-protection enable -d device-id-or-name

Expected Outcome

$ particle.js usb list
armadillo_cheetah [e00fce68623fcff480e85e47] (Boron)
power_robot [0a10aced202194944a04af80] (M-SoM, PROTECTED)

$ particle.js device-protection status -d 0a10aced202194944a04af80
[0a10aced202194944a04af80] (Product 28400): Protected Device
Run particle device-protection disable to put the device in Service Mode.

$

Related Issues / Discussions

https://app.shortcut.com/particle/story/129867/specify-device-by-id-in-device-protection-commands

Completeness