kalnagy | 4511475 | 2019-06-18 14:40:39 +0200 | [diff] [blame] | 1 | /* |
| 2 | ================================================================================== |
| 3 | Copyright (c) 2019 AT&T Intellectual Property. |
| 4 | Copyright (c) 2019 Nokia |
| 5 | |
| 6 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | you may not use this file except in compliance with the License. |
| 8 | You may obtain a copy of the License at |
| 9 | |
| 10 | http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | |
| 12 | Unless required by applicable law or agreed to in writing, software |
| 13 | distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | See the License for the specific language governing permissions and |
| 16 | limitations under the License. |
| 17 | ================================================================================== |
| 18 | */ |
| 19 | |
| 20 | package control |
| 21 | |
Anssi Mannila | 2e99e2f | 2019-12-05 13:57:06 +0200 | [diff] [blame] | 22 | import ( |
Juha Hyttinen | 0388dd9 | 2020-01-09 14:14:16 +0200 | [diff] [blame] | 23 | "fmt" |
Juha Hyttinen | 422d018 | 2020-01-17 13:37:05 +0200 | [diff] [blame] | 24 | "gerrit.o-ran-sc.org/r/ric-plt/e2ap/pkg/e2ap" |
Juha Hyttinen | b31b13f | 2020-03-18 10:25:30 +0200 | [diff] [blame] | 25 | "gerrit.o-ran-sc.org/r/ric-plt/submgr/pkg/xapptweaks" |
Juha Hyttinen | c9eb08a | 2020-02-28 08:53:33 +0200 | [diff] [blame] | 26 | "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/models" |
Anssi Mannila | 2e99e2f | 2019-12-05 13:57:06 +0200 | [diff] [blame] | 27 | "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp" |
| 28 | "sync" |
Juha Hyttinen | 12d31af | 2020-01-22 12:59:01 +0200 | [diff] [blame] | 29 | "time" |
Anssi Mannila | 2e99e2f | 2019-12-05 13:57:06 +0200 | [diff] [blame] | 30 | ) |
| 31 | |
Juha Hyttinen | 0d064ec | 2020-01-09 09:08:53 +0200 | [diff] [blame] | 32 | //----------------------------------------------------------------------------- |
| 33 | // |
| 34 | //----------------------------------------------------------------------------- |
Juha Hyttinen | 83ada00 | 2020-01-30 10:36:33 +0200 | [diff] [blame] | 35 | |
kalnagy | 4511475 | 2019-06-18 14:40:39 +0200 | [diff] [blame] | 36 | type Registry struct { |
Juha Hyttinen | 0388dd9 | 2020-01-09 14:14:16 +0200 | [diff] [blame] | 37 | mutex sync.Mutex |
Juha Hyttinen | 83ada00 | 2020-01-30 10:36:33 +0200 | [diff] [blame] | 38 | register map[uint32]*Subscription |
| 39 | subIds []uint32 |
Juha Hyttinen | 0388dd9 | 2020-01-09 14:14:16 +0200 | [diff] [blame] | 40 | rtmgrClient *RtmgrClient |
kalnagy | 4511475 | 2019-06-18 14:40:39 +0200 | [diff] [blame] | 41 | } |
| 42 | |
Anssi Mannila | 5c161a9 | 2020-01-15 15:40:57 +0200 | [diff] [blame] | 43 | func (r *Registry) Initialize() { |
Juha Hyttinen | 83ada00 | 2020-01-30 10:36:33 +0200 | [diff] [blame] | 44 | r.register = make(map[uint32]*Subscription) |
| 45 | var i uint32 |
Anssi Mannila | 5c161a9 | 2020-01-15 15:40:57 +0200 | [diff] [blame] | 46 | for i = 0; i < 65535; i++ { |
| 47 | r.subIds = append(r.subIds, i+1) |
| 48 | } |
kalnagy | 4511475 | 2019-06-18 14:40:39 +0200 | [diff] [blame] | 49 | } |
| 50 | |
Juha Hyttinen | c9eb08a | 2020-02-28 08:53:33 +0200 | [diff] [blame] | 51 | func (r *Registry) QueryHandler() (models.SubscriptionList, error) { |
| 52 | r.mutex.Lock() |
| 53 | defer r.mutex.Unlock() |
| 54 | |
| 55 | resp := models.SubscriptionList{} |
| 56 | for _, subs := range r.register { |
| 57 | subs.mutex.Lock() |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 58 | resp = append(resp, &models.SubscriptionData{SubscriptionID: int64(subs.ReqId.InstanceId), Meid: subs.Meid.RanName, Endpoint: subs.EpList.StringList()}) |
Juha Hyttinen | c9eb08a | 2020-02-28 08:53:33 +0200 | [diff] [blame] | 59 | subs.mutex.Unlock() |
| 60 | } |
| 61 | return resp, nil |
| 62 | } |
| 63 | |
Juha Hyttinen | 83ada00 | 2020-01-30 10:36:33 +0200 | [diff] [blame] | 64 | func (r *Registry) allocateSubs(trans *TransactionXapp, subReqMsg *e2ap.E2APSubscriptionRequest) (*Subscription, error) { |
Juha Hyttinen | 12d31af | 2020-01-22 12:59:01 +0200 | [diff] [blame] | 65 | if len(r.subIds) > 0 { |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 66 | subId := r.subIds[0] |
Juha Hyttinen | 12d31af | 2020-01-22 12:59:01 +0200 | [diff] [blame] | 67 | r.subIds = r.subIds[1:] |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 68 | if _, ok := r.register[subId]; ok == true { |
| 69 | r.subIds = append(r.subIds, subId) |
Juha Hyttinen | 3944a22 | 2020-01-24 11:51:46 +0200 | [diff] [blame] | 70 | return nil, fmt.Errorf("Registry: Failed to reserve subscription exists") |
Juha Hyttinen | 12d31af | 2020-01-22 12:59:01 +0200 | [diff] [blame] | 71 | } |
Juha Hyttinen | 3944a22 | 2020-01-24 11:51:46 +0200 | [diff] [blame] | 72 | subs := &Subscription{ |
| 73 | registry: r, |
Juha Hyttinen | 3944a22 | 2020-01-24 11:51:46 +0200 | [diff] [blame] | 74 | Meid: trans.Meid, |
| 75 | SubReqMsg: subReqMsg, |
| 76 | valid: true, |
| 77 | } |
Juha Hyttinen | 83ada00 | 2020-01-30 10:36:33 +0200 | [diff] [blame] | 78 | subs.ReqId.Id = 123 |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 79 | subs.ReqId.InstanceId = subId |
Juha Hyttinen | 3944a22 | 2020-01-24 11:51:46 +0200 | [diff] [blame] | 80 | |
| 81 | if subs.EpList.AddEndpoint(trans.GetEndpoint()) == false { |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 82 | r.subIds = append(r.subIds, subs.ReqId.InstanceId) |
Juha Hyttinen | 3944a22 | 2020-01-24 11:51:46 +0200 | [diff] [blame] | 83 | return nil, fmt.Errorf("Registry: Endpoint existing already in subscription") |
| 84 | } |
| 85 | |
| 86 | return subs, nil |
Juha Hyttinen | 12d31af | 2020-01-22 12:59:01 +0200 | [diff] [blame] | 87 | } |
Juha Hyttinen | 3944a22 | 2020-01-24 11:51:46 +0200 | [diff] [blame] | 88 | return nil, fmt.Errorf("Registry: Failed to reserve subscription no free ids") |
| 89 | } |
| 90 | |
Juha Hyttinen | 83ada00 | 2020-01-30 10:36:33 +0200 | [diff] [blame] | 91 | func (r *Registry) findExistingSubs(trans *TransactionXapp, subReqMsg *e2ap.E2APSubscriptionRequest) *Subscription { |
| 92 | |
Juha Hyttinen | 3944a22 | 2020-01-24 11:51:46 +0200 | [diff] [blame] | 93 | for _, subs := range r.register { |
Juha Hyttinen | 83ada00 | 2020-01-30 10:36:33 +0200 | [diff] [blame] | 94 | if subs.IsMergeable(trans, subReqMsg) { |
Juha Hyttinen | 3944a22 | 2020-01-24 11:51:46 +0200 | [diff] [blame] | 95 | |
| 96 | // |
| 97 | // check if there has been race conditions |
| 98 | // |
| 99 | subs.mutex.Lock() |
| 100 | //subs has been set to invalid |
| 101 | if subs.valid == false { |
| 102 | subs.mutex.Unlock() |
| 103 | continue |
| 104 | } |
Juha Hyttinen | 83ada00 | 2020-01-30 10:36:33 +0200 | [diff] [blame] | 105 | // If size is zero, entry is to be deleted |
| 106 | if subs.EpList.Size() == 0 { |
| 107 | subs.mutex.Unlock() |
| 108 | continue |
| 109 | } |
Juha Hyttinen | 3944a22 | 2020-01-24 11:51:46 +0200 | [diff] [blame] | 110 | // try to add to endpointlist. |
| 111 | if subs.EpList.AddEndpoint(trans.GetEndpoint()) == false { |
| 112 | subs.mutex.Unlock() |
| 113 | continue |
| 114 | } |
| 115 | subs.mutex.Unlock() |
| 116 | |
Juha Hyttinen | 83ada00 | 2020-01-30 10:36:33 +0200 | [diff] [blame] | 117 | xapp.Logger.Debug("Registry: Mergeable subs found %s for %s", subs.String(), trans.String()) |
Juha Hyttinen | 3944a22 | 2020-01-24 11:51:46 +0200 | [diff] [blame] | 118 | return subs |
| 119 | } |
| 120 | } |
| 121 | return nil |
| 122 | } |
| 123 | |
Juha Hyttinen | 83ada00 | 2020-01-30 10:36:33 +0200 | [diff] [blame] | 124 | func (r *Registry) AssignToSubscription(trans *TransactionXapp, subReqMsg *e2ap.E2APSubscriptionRequest) (*Subscription, error) { |
Juha Hyttinen | 3944a22 | 2020-01-24 11:51:46 +0200 | [diff] [blame] | 125 | var err error |
| 126 | var newAlloc bool |
| 127 | r.mutex.Lock() |
| 128 | defer r.mutex.Unlock() |
| 129 | |
Anssi Mannila | 9bcb0a4 | 2020-02-11 11:30:44 +0200 | [diff] [blame] | 130 | // |
| 131 | // Check validity of subscription action types |
| 132 | // |
| 133 | actionType, err := r.CheckActionTypes(subReqMsg) |
| 134 | if err != nil { |
| 135 | xapp.Logger.Debug("CREATE %s", err) |
| 136 | return nil, err |
| 137 | } |
Juha Hyttinen | 3944a22 | 2020-01-24 11:51:46 +0200 | [diff] [blame] | 138 | |
Anssi Mannila | 9bcb0a4 | 2020-02-11 11:30:44 +0200 | [diff] [blame] | 139 | // |
| 140 | // Find possible existing Policy subscription |
| 141 | // |
| 142 | if actionType == e2ap.E2AP_ActionTypePolicy { |
Juha Hyttinen | 47942b4 | 2020-02-27 10:41:43 +0200 | [diff] [blame] | 143 | if subs, ok := r.register[trans.GetSubId()]; ok { |
Anssi Mannila | 9bcb0a4 | 2020-02-11 11:30:44 +0200 | [diff] [blame] | 144 | xapp.Logger.Debug("CREATE %s. Existing subscription for Policy found", subs.String()) |
Anssi Mannila | cc7d9e0 | 2020-04-08 12:58:53 +0300 | [diff] [blame^] | 145 | // Update message data to subscription |
| 146 | subs.SubReqMsg = subReqMsg |
Anssi Mannila | 9bcb0a4 | 2020-02-11 11:30:44 +0200 | [diff] [blame] | 147 | subs.SetCachedResponse(nil, true) |
| 148 | return subs, nil |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | subs := r.findExistingSubs(trans, subReqMsg) |
Juha Hyttinen | 3944a22 | 2020-01-24 11:51:46 +0200 | [diff] [blame] | 153 | if subs == nil { |
| 154 | subs, err = r.allocateSubs(trans, subReqMsg) |
| 155 | if err != nil { |
| 156 | return nil, err |
| 157 | } |
| 158 | newAlloc = true |
Juha Hyttinen | 12d31af | 2020-01-22 12:59:01 +0200 | [diff] [blame] | 159 | } |
| 160 | |
| 161 | // |
| 162 | // Add to subscription |
| 163 | // |
| 164 | subs.mutex.Lock() |
| 165 | defer subs.mutex.Unlock() |
| 166 | |
Juha Hyttinen | 12d31af | 2020-01-22 12:59:01 +0200 | [diff] [blame] | 167 | epamount := subs.EpList.Size() |
| 168 | |
| 169 | r.mutex.Unlock() |
| 170 | // |
| 171 | // Subscription route updates |
| 172 | // |
Juha Hyttinen | 12d31af | 2020-01-22 12:59:01 +0200 | [diff] [blame] | 173 | if epamount == 1 { |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 174 | subRouteAction := SubRouteInfo{subs.EpList, uint16(subs.ReqId.InstanceId)} |
Juha Hyttinen | 83ada00 | 2020-01-30 10:36:33 +0200 | [diff] [blame] | 175 | err = r.rtmgrClient.SubscriptionRequestCreate(subRouteAction) |
Juha Hyttinen | 12d31af | 2020-01-22 12:59:01 +0200 | [diff] [blame] | 176 | } else { |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 177 | subRouteAction := SubRouteInfo{subs.EpList, uint16(subs.ReqId.InstanceId)} |
Juha Hyttinen | 12d31af | 2020-01-22 12:59:01 +0200 | [diff] [blame] | 178 | err = r.rtmgrClient.SubscriptionRequestUpdate(subRouteAction) |
| 179 | } |
| 180 | r.mutex.Lock() |
| 181 | |
| 182 | if err != nil { |
Juha Hyttinen | 3944a22 | 2020-01-24 11:51:46 +0200 | [diff] [blame] | 183 | if newAlloc { |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 184 | r.subIds = append(r.subIds, subs.ReqId.InstanceId) |
Juha Hyttinen | 3944a22 | 2020-01-24 11:51:46 +0200 | [diff] [blame] | 185 | } |
Juha Hyttinen | 12d31af | 2020-01-22 12:59:01 +0200 | [diff] [blame] | 186 | return nil, err |
| 187 | } |
Juha Hyttinen | 12d31af | 2020-01-22 12:59:01 +0200 | [diff] [blame] | 188 | |
Juha Hyttinen | 3944a22 | 2020-01-24 11:51:46 +0200 | [diff] [blame] | 189 | if newAlloc { |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 190 | r.register[subs.ReqId.InstanceId] = subs |
Juha Hyttinen | 3944a22 | 2020-01-24 11:51:46 +0200 | [diff] [blame] | 191 | } |
Juha Hyttinen | 83ada00 | 2020-01-30 10:36:33 +0200 | [diff] [blame] | 192 | xapp.Logger.Debug("CREATE %s", subs.String()) |
Juha Hyttinen | 12d31af | 2020-01-22 12:59:01 +0200 | [diff] [blame] | 193 | xapp.Logger.Debug("Registry: substable=%v", r.register) |
| 194 | return subs, nil |
| 195 | } |
| 196 | |
Anssi Mannila | 9bcb0a4 | 2020-02-11 11:30:44 +0200 | [diff] [blame] | 197 | func (r *Registry) CheckActionTypes(subReqMsg *e2ap.E2APSubscriptionRequest) (uint64, error) { |
| 198 | var reportFound bool = false |
| 199 | var policyFound bool = false |
| 200 | |
| 201 | for _, acts := range subReqMsg.ActionSetups { |
| 202 | if acts.ActionType == e2ap.E2AP_ActionTypeReport { |
| 203 | reportFound = true |
| 204 | } |
| 205 | if acts.ActionType == e2ap.E2AP_ActionTypePolicy { |
| 206 | policyFound = true |
| 207 | } |
| 208 | } |
| 209 | if reportFound == true && policyFound == true { |
| 210 | return e2ap.E2AP_ActionTypeInvalid, fmt.Errorf("Report and Policy in same RICactions-ToBeSetup-List") |
| 211 | } |
| 212 | if reportFound == true { |
| 213 | return e2ap.E2AP_ActionTypeReport, nil |
| 214 | } |
| 215 | if policyFound == true { |
| 216 | return e2ap.E2AP_ActionTypePolicy, nil |
| 217 | } |
| 218 | return e2ap.E2AP_ActionTypeInvalid, fmt.Errorf("Invalid action type in RICactions-ToBeSetup-List") |
| 219 | } |
| 220 | |
Juha Hyttinen | 83ada00 | 2020-01-30 10:36:33 +0200 | [diff] [blame] | 221 | // TODO: Works with concurrent calls, but check if can be improved |
| 222 | func (r *Registry) RemoveFromSubscription(subs *Subscription, trans *TransactionXapp, waitRouteClean time.Duration) error { |
Juha Hyttinen | 3944a22 | 2020-01-24 11:51:46 +0200 | [diff] [blame] | 223 | |
Juha Hyttinen | 12d31af | 2020-01-22 12:59:01 +0200 | [diff] [blame] | 224 | r.mutex.Lock() |
| 225 | defer r.mutex.Unlock() |
| 226 | subs.mutex.Lock() |
| 227 | defer subs.mutex.Unlock() |
| 228 | |
| 229 | delStatus := subs.EpList.DelEndpoint(trans.GetEndpoint()) |
| 230 | epamount := subs.EpList.Size() |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 231 | subId := subs.ReqId.InstanceId |
Juha Hyttinen | 12d31af | 2020-01-22 12:59:01 +0200 | [diff] [blame] | 232 | |
Juha Hyttinen | 83ada00 | 2020-01-30 10:36:33 +0200 | [diff] [blame] | 233 | if delStatus == false { |
| 234 | return nil |
Anssi Mannila | 2e99e2f | 2019-12-05 13:57:06 +0200 | [diff] [blame] | 235 | } |
Juha Hyttinen | 83ada00 | 2020-01-30 10:36:33 +0200 | [diff] [blame] | 236 | |
Juha Hyttinen | f44377d | 2020-02-12 10:18:40 +0200 | [diff] [blame] | 237 | go func() { |
| 238 | if waitRouteClean > 0 { |
| 239 | time.Sleep(waitRouteClean) |
Juha Hyttinen | 83ada00 | 2020-01-30 10:36:33 +0200 | [diff] [blame] | 240 | } |
Juha Hyttinen | f44377d | 2020-02-12 10:18:40 +0200 | [diff] [blame] | 241 | |
| 242 | subs.mutex.Lock() |
| 243 | defer subs.mutex.Unlock() |
| 244 | xapp.Logger.Info("CLEAN %s", subs.String()) |
| 245 | |
| 246 | if epamount == 0 { |
| 247 | // |
| 248 | // Subscription route delete |
| 249 | // |
Juha Hyttinen | b31b13f | 2020-03-18 10:25:30 +0200 | [diff] [blame] | 250 | tmpList := xapptweaks.RmrEndpointList{} |
Juha Hyttinen | f44377d | 2020-02-12 10:18:40 +0200 | [diff] [blame] | 251 | tmpList.AddEndpoint(trans.GetEndpoint()) |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 252 | subRouteAction := SubRouteInfo{tmpList, uint16(subId)} |
Juha Hyttinen | f44377d | 2020-02-12 10:18:40 +0200 | [diff] [blame] | 253 | r.rtmgrClient.SubscriptionRequestDelete(subRouteAction) |
| 254 | |
| 255 | // |
| 256 | // Subscription release |
| 257 | // |
| 258 | r.mutex.Lock() |
| 259 | defer r.mutex.Unlock() |
| 260 | |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 261 | if _, ok := r.register[subId]; ok { |
Juha Hyttinen | f44377d | 2020-02-12 10:18:40 +0200 | [diff] [blame] | 262 | xapp.Logger.Debug("RELEASE %s", subs.String()) |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 263 | delete(r.register, subId) |
Juha Hyttinen | f44377d | 2020-02-12 10:18:40 +0200 | [diff] [blame] | 264 | xapp.Logger.Debug("Registry: substable=%v", r.register) |
| 265 | } |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 266 | r.subIds = append(r.subIds, subId) |
Juha Hyttinen | f44377d | 2020-02-12 10:18:40 +0200 | [diff] [blame] | 267 | |
| 268 | } else if subs.EpList.Size() > 0 { |
| 269 | // |
| 270 | // Subscription route updates |
| 271 | // |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 272 | subRouteAction := SubRouteInfo{subs.EpList, uint16(subId)} |
Juha Hyttinen | f44377d | 2020-02-12 10:18:40 +0200 | [diff] [blame] | 273 | r.rtmgrClient.SubscriptionRequestUpdate(subRouteAction) |
| 274 | } |
| 275 | |
| 276 | }() |
Juha Hyttinen | 12d31af | 2020-01-22 12:59:01 +0200 | [diff] [blame] | 277 | |
| 278 | return nil |
Juha Hyttinen | 47b842b | 2020-01-08 13:01:52 +0200 | [diff] [blame] | 279 | } |
Anssi Mannila | 2e99e2f | 2019-12-05 13:57:06 +0200 | [diff] [blame] | 280 | |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 281 | func (r *Registry) GetSubscription(subId uint32) *Subscription { |
Juha Hyttinen | 47b842b | 2020-01-08 13:01:52 +0200 | [diff] [blame] | 282 | r.mutex.Lock() |
| 283 | defer r.mutex.Unlock() |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 284 | if _, ok := r.register[subId]; ok { |
| 285 | return r.register[subId] |
Anssi Mannila | 2e99e2f | 2019-12-05 13:57:06 +0200 | [diff] [blame] | 286 | } |
Juha Hyttinen | 47b842b | 2020-01-08 13:01:52 +0200 | [diff] [blame] | 287 | return nil |
Peter Szilagyi | fbc56f9 | 2019-07-23 19:29:46 +0000 | [diff] [blame] | 288 | } |
| 289 | |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 290 | func (r *Registry) GetSubscriptionFirstMatch(subIds []uint32) (*Subscription, error) { |
Juha Hyttinen | 422d018 | 2020-01-17 13:37:05 +0200 | [diff] [blame] | 291 | r.mutex.Lock() |
| 292 | defer r.mutex.Unlock() |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 293 | for _, subId := range subIds { |
| 294 | if _, ok := r.register[subId]; ok { |
| 295 | return r.register[subId], nil |
Juha Hyttinen | 422d018 | 2020-01-17 13:37:05 +0200 | [diff] [blame] | 296 | } |
| 297 | } |
Juha Hyttinen | aada645 | 2020-04-07 08:47:58 +0300 | [diff] [blame] | 298 | return nil, fmt.Errorf("No valid subscription found with subIds %v", subIds) |
Juha Hyttinen | 422d018 | 2020-01-17 13:37:05 +0200 | [diff] [blame] | 299 | } |