Closed jpmeijers closed 1 year ago
Renamed this issue as I suspect the name and description was missing because they are empty. However, the version_ids
is set, and not included in the export. So what we really want is to export ALL fields that are relevant for a migration.
I've tried to reproduce the issue, but all the fields mentioned were exported.
Renamed this issue as I suspect the name and description was missing because they are empty.
That is correct. Fields are omitempty
which means they are not going to be exported when they are empty.
Add the missing fields so that the exported json aligns with the json when exporting a device using ttn-lw-cli: ...
I've confirmed the fields mentioned are all exported. This was confirmed using jq
utility to filter wanted fields:
jq '.name,.description,.lorawan_version,.lorawan_phy_version,.frequency_plan_id,.supports_join,.root_keys,.mac_settings,.session.dev_addr,.session.keys'
Which in combination with go run cmd/ttn-lw-migrate/main.go --source ttnv3 --dry-run dev brettm-bag-tracker
produces expected output
However, the version_ids is set, and not included in the export.
The same tool was used to check for existence of version_ids
in the output:
If name
and description
of the device is set it is going to be included in the output json:
If this behaviour is different than experienced please provide more details to reproduce the issue.
Testing again now and it indeed seems correct. It looks like I had two devices in the application mixed up. So all looks good. Thanks for checking!
Summary
The exported json does not contain the name and description when exporting from TTS.
Steps to Reproduce
What do you see now?
name and description are missing
What do you want to see instead?
name and description should be included
Environment
TTS 3.22.1, ttn-lw-migrate 0.9.0-rc0
How do you propose to implement this?
Add the missing fields so that the exported json aligns with the json when exporting a device using ttn-lw-cli:
How do you propose to test this?
The exported json form ttn-lw-cli and ttn-lw-migrate should be exactly the same.
Can you do this yourself and submit a Pull Request?
Yes, but would be quicker if a TTI employ does it.