This repository has been archived by the owner on Apr 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
RegistrationProcedure.go
130 lines (122 loc) · 2.83 KB
/
RegistrationProcedure.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
package TestRegistrationProcedure
import (
"free5gc/lib/openapi/models"
)
const (
FREE5GC_CASE = "free5gc"
)
var TestAmDataTable = make(map[string]models.AccessAndMobilitySubscriptionData)
var TestSmfSelDataTable = make(map[string]models.SmfSelectionSubscriptionData)
var TestSmSelDataTable = make(map[string]models.SessionManagementSubscriptionData)
var TestAmPolicyDataTable = make(map[string]models.AmPolicyData)
var TestSmPolicyDataTable = make(map[string]models.SmPolicyData)
func init() {
TestAmDataTable[FREE5GC_CASE] = models.AccessAndMobilitySubscriptionData{
Gpsis: []string{
"msisdn-0900000000",
},
Nssai: &models.Nssai{
DefaultSingleNssais: []models.Snssai{
{
Sst: 1,
Sd: "010203",
},
{
Sst: 1,
Sd: "112233",
},
},
SingleNssais: []models.Snssai{
{
Sst: 1,
Sd: "010203",
},
{
Sst: 1,
Sd: "112233",
},
},
},
SubscribedUeAmbr: &models.AmbrRm{
Uplink: "1000 Kbps",
Downlink: "1000 Kbps",
},
}
TestSmfSelDataTable[FREE5GC_CASE] = models.SmfSelectionSubscriptionData{
SubscribedSnssaiInfos: map[string]models.SnssaiInfo{
"01010203": { // sst:1, sd:010203
DnnInfos: []models.DnnInfo{
{
Dnn: "internet",
},
},
},
"01112233": { // sst:1, sd:112233
DnnInfos: []models.DnnInfo{
{
Dnn: "internet",
},
},
},
},
}
TestAmPolicyDataTable[FREE5GC_CASE] = models.AmPolicyData{
SubscCats: []string{
"free5gc",
},
}
TestSmPolicyDataTable[FREE5GC_CASE] = models.SmPolicyData{
SmPolicySnssaiData: map[string]models.SmPolicySnssaiData{
"01010203": {
Snssai: &models.Snssai{
Sd: "010203",
Sst: 1,
},
SmPolicyDnnData: map[string]models.SmPolicyDnnData{
"internet": {
Dnn: "internet",
},
},
},
"01112233": {
Snssai: &models.Snssai{
Sd: "112233",
Sst: 1,
},
SmPolicyDnnData: map[string]models.SmPolicyDnnData{
"internet": {
Dnn: "internet",
},
},
},
},
}
TestSmSelDataTable[FREE5GC_CASE] = models.SessionManagementSubscriptionData{
SingleNssai: &models.Snssai{
Sst: 1,
Sd: "010203",
},
DnnConfigurations: map[string]models.DnnConfiguration{
"internet": models.DnnConfiguration{
SscModes: &models.SscModes{
DefaultSscMode: models.SscMode__1,
AllowedSscModes: []models.SscMode{models.SscMode__1, models.SscMode__2, models.SscMode__3},
},
PduSessionTypes: &models.PduSessionTypes{DefaultSessionType: models.PduSessionType_IPV4,
AllowedSessionTypes: []models.PduSessionType{models.PduSessionType_IPV4},
},
SessionAmbr: &models.Ambr{
Uplink: "1000 Kbps",
Downlink: "1000 Kbps",
},
Var5gQosProfile: &models.SubscribedDefaultQos{
Var5qi: 9,
Arp: &models.Arp{
PriorityLevel: 8,
},
PriorityLevel: 8,
},
},
},
}
}