dcs: Pass gateway identifiers to claimer interface#7916
Open
vlasebian wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Device Claiming Server’s gateway-claiming flow to preserve and forward full gateway identifiers (EUI + Gateway ID) into the TTGC claimer, enabling downstream operations (notably API key creation) that require the gateway ID.
Changes:
- Update
gateways.Claimerto accept*ttnpb.GatewayIdentifiersforClaim/Unclaiminstead oftypes.EUI64. - Default
TargetGatewayIdto the lower-cased EUI hex string when the client does not provide one. - Adjust TTGC LBS CUPS/LNS API key naming and extend unit test coverage for identifier forwarding/defaulting.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/deviceclaimingserver/util_test.go | Updates gateway-claimer mock to match the new GatewayIdentifiers-based interface. |
| pkg/deviceclaimingserver/grpc_gateways.go | Builds/propagates GatewayIdentifiers (including default gateway ID) into upstream claiming/unclaiming. |
| pkg/deviceclaimingserver/grpc_gateways_test.go | Adds/updates tests to validate identifier forwarding and default gateway ID behavior. |
| pkg/deviceclaimingserver/gateways/ttgc/ttiv1.go | Updates TTGC TTI v1 claim handler to accept gateway identifiers and derive EUI from them. |
| pkg/deviceclaimingserver/gateways/ttgc/ttgc.go | Updates TTGC claimer interface to accept identifiers and forwards them to protocol-specific handlers. |
| pkg/deviceclaimingserver/gateways/ttgc/lbscups.go | Uses full identifiers for API key creation and shortens TTGC-generated key names. |
| pkg/deviceclaimingserver/gateways/gateways.go | Changes the gateways.Claimer interface method signatures to take *ttnpb.GatewayIdentifiers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
johanstokking
approved these changes
May 19, 2026
nicholaspcr
approved these changes
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The TTGC claimer previously only received the gateway EUI and reconstructed the id internally, dropping the gateway ID. Without this ID, the API keys cannot be created
Changes
gateways.Claimerinterface soClaimandUnclaimaccept*ttnpb.GatewayIdentifiersinstead oftypes.EUI64.TargetGatewayIdTesting
Steps
Unit test:
go test ./pkg/deviceclaimingserver/....e2e test:
ec:65:6e:ff:feprefix and 0x1000 capabilities.Results
Unit tests pass locally and e2e testing shows claiming and configuring the gateway successfully.
Regressions
Notes for Reviewers
The signature change to the
Claimerinterface is an internal API; there is a single TTGC implementation. The EUI is still required and is now derived from the identifiers inside the claimer usingtypes.MustEUI64(ids.Eui).OrZero().Checklist
README.mdfor the chosen target branch.CHANGELOG.md.CONTRIBUTING.md, there are no fixup commits left.