TheThingsArchive / ttn

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

Export v2 devices in v3 format #776

Closed neoaggelos closed 4 years ago

neoaggelos commented 4 years ago

Summary

Closes #764 . This is the v2 part of migrating end devices to the v3.

Changes

Example

$ ttnctl devices export-all --frequency-plan-id EU_863_870 | ttn-lw-cli dev create --application-id my-v3-app

It is required to pass the frequency plan ID (v2 devices don't have one). We could probably pick a default one from the handler/router, but I think it's better to let the user decide.

Review

@htdvisser please review CLI and usage. Also, running ttnctl locally updates some packages in go.mod. Not sure how to proceed with these. @rvolosatovs please review the MAC settings

CLAassistant commented 4 years ago

CLA assistant check
All committers have signed the CLA.