Description
When we create a subscriber X (POST), the following tables are created:
subscriptionData.authenticationData.authenticationSubscription
subscriptionData.provisionedData.amData
When subscriber X is associated to a DG that belongs to a NS, the following tables are created:
subscriptionData.provisionedData.smData
subscriptionData.provisionedData.smfSelectionSubscriptionData
policyData.ues.amData
policyData.ues.smData
policyData.ues.flowRule
- AND
subscriptionData.provisionedData.amData is updated to add PlmnID, Nssai, Gpsis, SubscribedUeAmbr
When we DELETE a DG or a NS, the following tables are deleted:
subscriptionData.provisionedData.smData
subscriptionData.provisionedData.smfSelectionSubscriptionData
policyData.ues.amData
policyData.ues.smData
policyData.ues.flowRule
-
INCLUDING subscriptionData.provisionedData.amData
The Issue
When we retrieve all subcribers GET /api/subscriber, the information returned is based on subscriptionData.provisionedData.amData table. Which mean that if we try to retrieve all the subscribers, the subscriber X will no longer be on the list. And we'll have "orphan" information in the subscriptionData.authenticationData.authenticationSubscription table.
If we retrieve the subscriber by name (GET /api/subscriber/X) you'll see that the authenticationSubscription is filled but the rest of the fields are empty.
Expected behavior
I would have expected that when I delete a DG/NS, the subscribers associated to it are not removed. The same way a DG is not removed when you delete a NS that contains it.
So I would expect that GET /api/subscriber contains this subscriber
How to reproduce
- Create a Subcriber
- Create a DG and associate the subscriber to it
- Create a NS and associate the the DG to it.
Check the DB tables.
- Delete the DG.
Only the subscriptionData.authenticationData.authenticationSubscription should exist.
And when try to GET /api/subscriber the subscriber does not exist anymore.
If you GET /api/subscriber/X you'll see that the authenticationSubscription is filled but the rest of the fields are empty.
Solution attempts
I tried to fix this issue by only deleting PlmnID, Nssai, Gpsis, SubscribedUeAmbr from the subscriptionData.provisionedData.amData table when deleting a DG / NS. However, if a subscriber belongs to multiple NS, and you delete all of them we'll end up with multiple entries in the subscriptionData.provisionedData.amData looking like this:
at the same time, it's not clear if a subscriber may belong to multiple dg/ ns.
Maybe we should base the GET /api/subscriber on the subscriptionData.authenticationData.authenticationSubscription table instead? (just brainstorming)
Description
When we create a subscriber X (POST), the following tables are created:
subscriptionData.authenticationData.authenticationSubscriptionsubscriptionData.provisionedData.amDataWhen subscriber X is associated to a DG that belongs to a NS, the following tables are created:
subscriptionData.provisionedData.smDatasubscriptionData.provisionedData.smfSelectionSubscriptionDatapolicyData.ues.amDatapolicyData.ues.smDatapolicyData.ues.flowRulesubscriptionData.provisionedData.amDatais updated to add PlmnID, Nssai, Gpsis, SubscribedUeAmbrWhen we DELETE a DG or a NS, the following tables are deleted:
subscriptionData.provisionedData.smDatasubscriptionData.provisionedData.smfSelectionSubscriptionDatapolicyData.ues.amDatapolicyData.ues.smDatapolicyData.ues.flowRuleINCLUDING
subscriptionData.provisionedData.amDataThe Issue
When we retrieve all subcribers
GET /api/subscriber, the information returned is based onsubscriptionData.provisionedData.amDatatable. Which mean that if we try to retrieve all the subscribers, the subscriber X will no longer be on the list. And we'll have "orphan" information in thesubscriptionData.authenticationData.authenticationSubscriptiontable.If we retrieve the subscriber by name (
GET /api/subscriber/X) you'll see that theauthenticationSubscriptionis filled but the rest of the fields are empty.Expected behavior
I would have expected that when I delete a DG/NS, the subscribers associated to it are not removed. The same way a DG is not removed when you delete a NS that contains it.
So I would expect that
GET /api/subscribercontains this subscriberHow to reproduce
Check the DB tables.
Only the
subscriptionData.authenticationData.authenticationSubscriptionshould exist.And when try to
GET /api/subscriberthe subscriber does not exist anymore.If you
GET /api/subscriber/Xyou'll see that theauthenticationSubscriptionis filled but the rest of the fields are empty.Solution attempts
I tried to fix this issue by only deleting
PlmnID, Nssai, Gpsis, SubscribedUeAmbrfrom thesubscriptionData.provisionedData.amDatatable when deleting a DG / NS. However, if a subscriber belongs to multiple NS, and you delete all of them we'll end up with multiple entries in thesubscriptionData.provisionedData.amDatalooking like this:at the same time, it's not clear if a subscriber may belong to multiple dg/ ns.
Maybe we should base the
GET /api/subscriberon thesubscriptionData.authenticationData.authenticationSubscriptiontable instead? (just brainstorming)