// Read subscriptions from db
c.ReadE2Subscriptions()
c.ReadRESTSubscriptions()
-
- /*
- xapp.Logger.Info("Reading subscriptions from db")
- subIds, register, err := c.ReadAllSubscriptionsFromSdl()
- if err != nil {
- xapp.Logger.Error("%v", err)
- } else {
- c.registry.subIds = subIds
- c.registry.register = register
- c.HandleUncompletedSubscriptions(register)
- }
-
- restSubscriptions, err := c.ReadAllRESTSubscriptionsFromSdl()
- if err != nil {
- xapp.Logger.Error("%v", err)
- } else {
- c.registry.restSubscriptions = restSubscriptions
- }
- */
return c
}
)
type RESTSubscriptionInfo struct {
- xAppRmrEndPoint string
+ XAppRmrEndPoint string
Meid string
InstanceIds []uint32
- xAppIdToE2Id map[int64]int64
+ XAppIdToE2Id map[int64]int64
SubReqOngoing bool
SubDelReqOngoing bool
Md5sum string
func (c *Control) WriteRESTSubscriptionToSdl(restSubId string, restSubs *RESTSubscription) error {
var restSubscriptionInfo RESTSubscriptionInfo
- restSubscriptionInfo.xAppRmrEndPoint = restSubs.xAppRmrEndPoint
+ restSubscriptionInfo.XAppRmrEndPoint = restSubs.xAppRmrEndPoint
restSubscriptionInfo.Meid = restSubs.Meid
restSubscriptionInfo.InstanceIds = restSubs.InstanceIds
- restSubscriptionInfo.xAppIdToE2Id = restSubs.xAppIdToE2Id
+ restSubscriptionInfo.XAppIdToE2Id = restSubs.xAppIdToE2Id
restSubscriptionInfo.SubReqOngoing = restSubs.SubReqOngoing
restSubscriptionInfo.SubDelReqOngoing = restSubs.SubDelReqOngoing
restSubscriptionInfo.Md5sum = restSubs.lastReqMd5sum
func (c *Control) CreateRESTSubscription(restSubscriptionInfo *RESTSubscriptionInfo, jsonSubscriptionInfo *string) *RESTSubscription {
restSubs := &RESTSubscription{}
- restSubs.xAppRmrEndPoint = restSubscriptionInfo.xAppRmrEndPoint
+ restSubs.xAppRmrEndPoint = restSubscriptionInfo.XAppRmrEndPoint
restSubs.Meid = restSubscriptionInfo.Meid
restSubs.InstanceIds = restSubscriptionInfo.InstanceIds
- restSubs.xAppIdToE2Id = restSubscriptionInfo.xAppIdToE2Id
+ restSubs.xAppIdToE2Id = restSubscriptionInfo.XAppIdToE2Id
restSubs.SubReqOngoing = restSubscriptionInfo.SubReqOngoing
restSubs.SubDelReqOngoing = restSubscriptionInfo.SubDelReqOngoing
restSubs.lastReqMd5sum = restSubscriptionInfo.Md5sum