TheThingsArchive / ttn

The Things Network Stack V2
https://www.thethingsnetwork.org
MIT License
463 stars 276 forks source link

cli: Add ttnctl devices convert-to-abp command #777

Closed neoaggelos closed 4 years ago

neoaggelos commented 4 years ago

Summary

Needed for https://github.com/TheThingsNetwork/lorawan-stack/pull/2467

Changes

Add a new ttnctl devices disable command that resets AppKey of OTAA devices.

Also adds a ttnctl devices disable-all variant.

The user can pass a --save-to-attribute <attribute-name> to save the original AppKey as an attribute on the device (if they want to). The original AppKey is printed on the command output in any case.

Notes

Some more ideas I played around with but left out for now:

neoaggelos commented 4 years ago

Renamed commands to convert-to-abp and convert-all-to-abp.

I just want the commands to make sense in the context of the migration guide.