Unverified Commit b94fb3cc authored by Kevin Di Lallo's avatar Kevin Di Lallo Committed by GitHub
Browse files

Merge pull request #113 from pastorsx/sp_dev_rnis_est_rel

RNIS RAB establishment and RAB release UT and fixes
parents 903c89dd 42205337
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -353,7 +353,7 @@ paths:
    get:
      tags:
      - "subscriptions"
      description: "This operation is used for updating an individual subscription\
      description: "This operation is used for retrieving an individual subscription\
        \ to zonal traffic change notification."
      operationId: "zonalTrafficSubGetById"
      produces:
@@ -566,8 +566,8 @@ paths:
    delete:
      tags:
      - "subscriptions"
      description: "This operation is used for retrieving an individual subscription\
        \ to user tracking change notification."
      description: "This operation is used for cancelling a subscription and stopping\
        \ corresponding notifications."
      operationId: "userTrackingSubDelById"
      produces:
      - "application/json"
@@ -585,8 +585,8 @@ paths:
    get:
      tags:
      - "subscriptions"
      description: "This operation is used for creating a new subscription to zone\
        \ status change notification."
      description: "This operation is used for retrieving all active subscriptions\
        \ to zone status change notifications."
      operationId: "zoneStatusGet"
      produces:
      - "application/json"
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ To see how to make this your own, look here:
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)

- API version: 1.1.1
- Build date: 2020-07-16T13:21:19.006-04:00
- Build date: 2020-07-27T13:41:42.509-04:00


### Running the server
+8 −9
Original line number Diff line number Diff line
@@ -188,7 +188,7 @@ func createClient(notifyPath string) (*clientNotifOMA.APIClient, error) {

func deregisterZoneStatus(subsIdStr string) {
	subsId, _ := strconv.Atoi(subsIdStr)
	zonalSubscriptionMap[subsId] = ""
	zoneStatusSubscriptionMap[subsId] = nil
}

func registerZoneStatus(zoneId string, nbOfUsersZoneThreshold int32, nbOfUsersAPThreshold int32, opStatus []OperationStatus, subsIdStr string) {
@@ -336,14 +336,13 @@ func checkNotificationRegisteredZoneStatus(zoneId string, apId string, nbUsersIn
					zoneStatusNotif.NumberOfUsersInZone = (int32)(nbUsersInZone)
				}
				zoneStatusNotif.Timestamp = time.Now()
				go sendStatusNotification(subscription.CallbackReference.NotifyURL, context.TODO(), subsIdStr, zoneStatusNotif)
				sendStatusNotification(subscription.CallbackReference.NotifyURL, context.TODO(), subsIdStr, zoneStatusNotif)
				if apWarning {
					log.Info("Zone Status Notification" + "(" + subsIdStr + "): " + "For event in zone " + zoneId + " which has " + nbUsersInAPStr + " users in AP " + apId)
				} else {
					log.Info("Zone Status Notification" + "(" + subsIdStr + "): " + "For event in zone " + zoneId + " which has " + nbUsersInZoneStr + " users in total")
				}
			}

		}
	}
}
@@ -375,7 +374,7 @@ func checkNotificationRegisteredUsers(oldZoneId string, newZoneId string, oldApI
					event := new(clientNotifOMA.UserEventType)
					*event = clientNotifOMA.ENTERING_UserEventType
					zonal.UserEventType = event
					go sendNotification(subscription.CallbackReference.NotifyURL, context.TODO(), subsIdStr, zonal)
					sendNotification(subscription.CallbackReference.NotifyURL, context.TODO(), subsIdStr, zonal)
					log.Info("User Notification" + "(" + subsIdStr + "): " + "Entering event in zone " + newZoneId + " for user " + userId)
				}
				if oldZoneId != "" {
@@ -385,7 +384,7 @@ func checkNotificationRegisteredUsers(oldZoneId string, newZoneId string, oldApI
						event := new(clientNotifOMA.UserEventType)
						*event = clientNotifOMA.LEAVING_UserEventType
						zonal.UserEventType = event
						go sendNotification(subscription.CallbackReference.NotifyURL, context.TODO(), subsIdStr, zonal)
						sendNotification(subscription.CallbackReference.NotifyURL, context.TODO(), subsIdStr, zonal)
						log.Info("User Notification" + "(" + subsIdStr + "): " + "Leaving event in zone " + oldZoneId + " for user " + userId)
					}
				}
@@ -398,7 +397,7 @@ func checkNotificationRegisteredUsers(oldZoneId string, newZoneId string, oldApI
						event := new(clientNotifOMA.UserEventType)
						*event = clientNotifOMA.TRANSFERRING_UserEventType
						zonal.UserEventType = event
						go sendNotification(subscription.CallbackReference.NotifyURL, context.TODO(), subsIdStr, zonal)
						sendNotification(subscription.CallbackReference.NotifyURL, context.TODO(), subsIdStr, zonal)
						log.Info("User Notification" + "(" + subsIdStr + "): " + " Transferring event within zone " + newZoneId + " for user " + userId + " from Ap " + oldApId + " to " + newApId)
					}
				}
@@ -478,7 +477,7 @@ func checkNotificationRegisteredZones(oldZoneId string, newZoneId string, oldApI
						zonal.UserEventType = event
						zonal.Timestamp = time.Now()
						zonal.CallbackData = subscription.ClientCorrelator
						go sendNotification(subscription.CallbackReference.NotifyURL, context.TODO(), subsIdStr, zonal)
						sendNotification(subscription.CallbackReference.NotifyURL, context.TODO(), subsIdStr, zonal)
						log.Info("Zonal Notify Entering event in zone " + newZoneId + " for user " + userId)
					}
				}
@@ -501,7 +500,7 @@ func checkNotificationRegisteredZones(oldZoneId string, newZoneId string, oldApI
							zonal.UserEventType = event
							zonal.Timestamp = time.Now()
							zonal.CallbackData = subscription.ClientCorrelator
							go sendNotification(subscription.CallbackReference.NotifyURL, context.TODO(), subsIdStr, zonal)
							sendNotification(subscription.CallbackReference.NotifyURL, context.TODO(), subsIdStr, zonal)
							log.Info("Zonal Notify Transferring event in zone " + newZoneId + " for user " + userId + " from Ap " + oldApId + " to " + newApId)
						}
					}
@@ -526,7 +525,7 @@ func checkNotificationRegisteredZones(oldZoneId string, newZoneId string, oldApI
						zonal.UserEventType = event
						zonal.Timestamp = time.Now()
						zonal.CallbackData = subscription.ClientCorrelator
						go sendNotification(subscription.CallbackReference.NotifyURL, context.TODO(), subsIdStr, zonal)
						sendNotification(subscription.CallbackReference.NotifyURL, context.TODO(), subsIdStr, zonal)
						log.Info("Zonal Notify Leaving event in zone " + oldZoneId + " for user " + userId)
					}
				}
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ const testScenario string = `
			{
				"id": "4da82f2d-1f44-4945-8fe7-00c0431ef8c7",
				"name": "operator-cell1",
				"type": "OPERATOR-CELL",
				"type": "OPERATOR-CELLULAR",
				"interZoneLatency": 6,
				"interZoneLatencyVariation": 2,
				"interZoneThroughput": 1000,
+14 −5
Original line number Diff line number Diff line
@@ -3067,13 +3067,10 @@ definitions:
      plmn:
        $ref: "#/definitions/Plmn"
      cellId:
        type: "array"
        type: "string"
        example: "0x800000A"
        description: "The E-UTRAN Cell Identity as a bit string (size (28)), as defined\
          \ in 3GPP TS 36.413"
        items:
          type: "string"
          format: "binary"
    description: "E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413"
  Plmn:
    type: "object"
@@ -3105,6 +3102,18 @@ definitions:
      erabInfo:
        type: "array"
        items:
          $ref: "#/definitions/ErabInfo"
    description: "Information on UEs in the specific cell."
  ErabInfo:
    type: "object"
    required:
    - "erabId"
    properties:
      erabId:
        type: "integer"
        description: "Attribute that uniquely identifies a Radio Access bearer for\
          \ specific UE as defined in ETSI TS 136 413"
      erabQosParameters:
        $ref: "#/definitions/ErabQosParameters"
    description: "Information on UEs in the specific cell."
  AssociateId:
Loading