func (s *networkServerRPC) PrepareActivation(ctx context.Context, activation *broker.DeduplicatedDeviceActivationRequest) (*broker.DeduplicatedDeviceActivationRequest, error) { if err := s.ValidateContext(ctx); err != nil { return nil, err } if err := activation.Validate(); err != nil { return nil, errors.Wrap(err, "Invalid Activation Request") } res, err := s.networkServer.HandlePrepareActivation(activation) if err != nil { return nil, err } return res, nil }
func (h *handlerRPC) Activate(ctx context.Context, activation *pb_broker.DeduplicatedDeviceActivationRequest) (*pb.DeviceActivationResponse, error) { _, err := h.handler.ValidateNetworkContext(ctx) if err != nil { return nil, err } if err := activation.Validate(); err != nil { return nil, errors.Wrap(err, "Invalid Activation Request") } res, err := h.handler.HandleActivation(activation) if err != nil { return nil, err } return res, nil }