- tc.Error("UNKONWN REST notification received SubscriptionID=%s<>%s, InstanceID=%v, RequestorID=%v (%v)",
- tc.subscriptionId, *resp.SubscriptionID, *resp.SubscriptionInstances[0].InstanceID, *resp.SubscriptionInstances[0].RequestorID, tc)
+ tc.Error("UNKONWN REST notification received SubscriptionID=%s<>%s, InstanceID=%v, XappEventInstanceID=%v (%v)",
+ tc.subscriptionId, *resp.SubscriptionID, *resp.SubscriptionInstances[0].E2EventInstanceID, *resp.SubscriptionInstances[0].XappEventInstanceID, tc)
+ }
+}
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+func (tc *E2Stub) GetE2RestIds(resp *clientmodel.SubscriptionResponse) *E2RestIds {
+
+ e2RestIds := &E2RestIds{}
+ if resp != nil {
+ if resp.SubscriptionID != nil {
+ e2RestIds.RestSubsId = *resp.SubscriptionID
+ }
+ if resp.SubscriptionInstances != nil {
+ if resp.SubscriptionInstances[0].E2EventInstanceID != nil {
+ e2RestIds.E2SubsId = uint32(*resp.SubscriptionInstances[0].E2EventInstanceID)
+ }
+ if resp.SubscriptionInstances[0].ErrorCause != nil {
+ e2RestIds.ErrorCause = *resp.SubscriptionInstances[0].ErrorCause
+ } else {
+ e2RestIds.ErrorCause = "nil"
+ }
+ if resp.SubscriptionInstances[0].ErrorSource != nil {
+ e2RestIds.ErrorSource = *resp.SubscriptionInstances[0].ErrorSource
+ } else {
+ e2RestIds.ErrorSource = "nil"
+ }
+ if resp.SubscriptionInstances[0].TimeoutType != nil {
+ e2RestIds.TimeoutType = *resp.SubscriptionInstances[0].TimeoutType
+ } else {
+ e2RestIds.TimeoutType = "nil"
+ }
+ }