Skip to content
Snippets Groups Projects
Commit 80a14eb3 authored by Fabian Seidl's avatar Fabian Seidl
Browse files

get sub options before reset and re-use

parent 38101525
Branches
Tags
1 merge request!1037Resolve "Implement gNMI subscription management"
This commit is part of merge request !1037. Comments created here will be created in the context of that merge request.
......@@ -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(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment