From 05a8db89ab6d39089a5d2d46b1a5c21cc21e6187 Mon Sep 17 00:00:00 2001 From: Fabian Seidl <fabian.seidl@h-da.de> Date: Wed, 2 Oct 2024 08:14:44 +0000 Subject: [PATCH] get sub options before reset and re-use --- controller/northbound/server/submanagement.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/controller/northbound/server/submanagement.go b/controller/northbound/server/submanagement.go index a59a4fef0..bdc67e4e1 100644 --- a/controller/northbound/server/submanagement.go +++ b/controller/northbound/server/submanagement.go @@ -23,11 +23,12 @@ func NewSubManagementServer(networkElementWatchter *nucleus.NetworkElementWatche // ResetAllSubscriptions stops all running subscriptions and restarts them the same way they ran before. func (s *SubManagementServer) ResetAllSubscriptions(ctx context.Context, request *subpb.ResetAllSubscriptionsRequest) (*subpb.ResetAllSubscriptionsResponse, error) { + subscriptions := s.networkElementWatchter.GetAllSubscriptionInformations() + s.networkElementWatchter.StopAndRemoveAllNetworkElementSubscriptions() - //TODO: first get all relevant sub information and then provide the options here. // Requires some rework of current way how paths/options are provided to the watcher. - s.networkElementWatchter.SubscribeToNetworkElements(nil) + s.networkElementWatchter.SubscribeToNetworkElements(subscriptions[0].Opts) return &subpb.ResetAllSubscriptionsResponse{ Timestamp: time.Now().UnixNano(), -- GitLab