Skip to content

Commit

Permalink
ns: Add RelayConfigurationService WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
adriansmares committed Dec 6, 2023
1 parent 72559ec commit 2d9a83a
Show file tree
Hide file tree
Showing 8 changed files with 948 additions and 16 deletions.
59 changes: 52 additions & 7 deletions config/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -7874,6 +7874,15 @@
"file": "grpc_gsns.go"
}
},
"error:pkg/networkserver:relay_already_exists": {
"translations": {
"en": "relay already exists"
},
"description": {
"package": "pkg/networkserver",
"file": "grpc_relay.go"
}
},
"error:pkg/networkserver:relay_full_f_cnt": {
"translations": {
"en": "invalid full FCnt"
Expand All @@ -7892,6 +7901,33 @@
"file": "relay.go"
}
},
"error:pkg/networkserver:relay_not_found": {
"translations": {
"en": "relay not found"
},
"description": {
"package": "pkg/networkserver",
"file": "grpc_relay.go"
}
},
"error:pkg/networkserver:relay_not_served": {
"translations": {
"en": "relay not served"
},
"description": {
"package": "pkg/networkserver",
"file": "grpc_relay.go"
}
},
"error:pkg/networkserver:relay_not_serving": {
"translations": {
"en": "relay not serving"
},
"description": {
"package": "pkg/networkserver",
"file": "grpc_relay.go"
}
},
"error:pkg/networkserver:relay_recent_uplinks": {
"translations": {
"en": "recent uplinks not found"
Expand Down Expand Up @@ -7919,31 +7955,40 @@
"file": "relay.go"
}
},
"error:pkg/networkserver:relay_serving": {
"error:pkg/networkserver:relay_session": {
"translations": {
"en": "relay not serving"
"en": "relay session not found"
},
"description": {
"package": "pkg/networkserver",
"file": "relay.go"
}
},
"error:pkg/networkserver:relay_session": {
"error:pkg/networkserver:relay_session_key_id": {
"translations": {
"en": "relay session not found"
"en": "relay session key ID not found"
},
"description": {
"package": "pkg/networkserver",
"file": "relay.go"
}
},
"error:pkg/networkserver:relay_session_key_id": {
"error:pkg/networkserver:relay_uplink_forwarding_rule_already_exists": {
"translations": {
"en": "relay session key ID not found"
"en": "relay uplink forwarding rule already exists"
},
"description": {
"package": "pkg/networkserver",
"file": "relay.go"
"file": "grpc_relay.go"
}
},
"error:pkg/networkserver:relay_uplink_forwarding_rule_not_found": {
"translations": {
"en": "relay uplink forwarding rule not found"
},
"description": {
"package": "pkg/networkserver",
"file": "grpc_relay.go"
}
},
"error:pkg/networkserver:relay_uplink_token": {
Expand Down
4 changes: 2 additions & 2 deletions pkg/networkserver/grpc_deviceregistry.go
Original file line number Diff line number Diff line change
Expand Up @@ -3565,7 +3565,7 @@ func (ns *NetworkServer) Delete(ctx context.Context, req *ttnpb.EndDeviceIdentif
type nsEndDeviceBatchRegistry struct {
ttnpb.UnimplementedNsEndDeviceBatchRegistryServer

NS *NetworkServer
devices DeviceRegistry
}

// Delete implements ttipb.NsEndDeviceBatchRegistryServer.
Expand All @@ -3581,7 +3581,7 @@ func (srv *nsEndDeviceBatchRegistry) Delete(
); err != nil {
return nil, err
}
deleted, err := srv.NS.devices.BatchDelete(ctx, req.ApplicationIds, req.DeviceIds)
deleted, err := srv.devices.BatchDelete(ctx, req.ApplicationIds, req.DeviceIds)
if err != nil {
logRegistryRPCError(ctx, err, "Failed to delete device from registry")
return nil, err
Expand Down
Loading

0 comments on commit 2d9a83a

Please sign in to comment.