Skip to content

Commit

Permalink
Merge pull request #140 from donald1218/feat/amf-openapi
Browse files Browse the repository at this point in the history
feat: update to R17 openapi
  • Loading branch information
ianchen0119 authored Dec 25, 2024
2 parents ce90b7b + 8f151e5 commit e737358
Show file tree
Hide file tree
Showing 41 changed files with 1,395 additions and 1,078 deletions.
20 changes: 13 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ module github.com/free5gc/amf
go 1.21

require (
github.com/antihax/optional v1.0.0
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
github.com/davecgh/go-spew v1.1.1
github.com/free5gc/aper v1.0.5
github.com/free5gc/nas v1.1.4-0.20240807053650-6775d72a73b6
github.com/free5gc/ngap v1.0.9-0.20240414165820-453b0aa37228
github.com/free5gc/openapi v1.0.9-0.20240730084323-449098e08462
github.com/free5gc/aper v1.0.6-0.20240503143507-2c4c4780b98f
github.com/free5gc/nas v1.1.4-0.20241107083120-4605e0d39ece
github.com/free5gc/ngap v1.0.9-0.20241107082718-d359a67ebfa2
github.com/free5gc/openapi v1.0.9-0.20241116070448-943255152229
github.com/free5gc/sctp v1.0.1
github.com/free5gc/util v1.0.6
github.com/gin-gonic/gin v1.9.1
Expand All @@ -27,20 +26,23 @@ require (

require (
github.com/aead/cmac v0.0.0-20160719120800-7af84192f0b1 // indirect
github.com/antonfisher/nested-logrus-formatter v1.3.1 // indirect
github.com/bytedance/sonic v1.11.5 // indirect
github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/cloudwego/base64x v0.1.3 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.19.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/gopherjs/gopherjs v1.17.2 // indirect
github.com/h2non/gock v1.2.0 // indirect
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
Expand All @@ -58,6 +60,11 @@ require (
github.com/tim-ywliu/nested-logrus-formatter v1.3.2 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.49.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
golang.org/x/arch v0.7.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/net v0.24.0 // indirect
Expand All @@ -66,6 +73,5 @@ require (
golang.org/x/text v0.14.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/h2non/gock.v1 v1.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
45 changes: 29 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/aead/cmac v0.0.0-20160719120800-7af84192f0b1 h1:+JkXLHME8vLJafGhOH4aoV2Iu8bR55nU6iKMVfYVLjY=
github.com/aead/cmac v0.0.0-20160719120800-7af84192f0b1/go.mod h1:nuudZmJhzWtx2212z+pkuy7B6nkBqa+xwNXZHL1j8cg=
github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/antonfisher/nested-logrus-formatter v1.3.1 h1:NFJIr+pzwv5QLHTPyKz9UMEoHck02Q9L0FP13b/xSbQ=
github.com/antonfisher/nested-logrus-formatter v1.3.1/go.mod h1:6WTfyWFkBc9+zyBaKIqRrg/KwMqBbodBjgbHjDz7zjA=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
github.com/bytedance/sonic v1.11.5 h1:G00FYjjqll5iQ1PYXynbg/hyzqBqavH8Mo9/oTopd9k=
Expand All @@ -23,14 +19,16 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/free5gc/aper v1.0.5 h1:sUYFFmOXDLjyL4rU6zFnq81M4YluqP90Pso5e/J4UhA=
github.com/free5gc/aper v1.0.5/go.mod h1:ybHxhYnRqQ9wD4yB9r/3MZdbCYCjtqUyfLpSnJpwWd4=
github.com/free5gc/nas v1.1.4-0.20240807053650-6775d72a73b6 h1:c8Z+AlgG6CPlOKTpoDhEnTtpOWW+clCr+88Ybe0hyog=
github.com/free5gc/nas v1.1.4-0.20240807053650-6775d72a73b6/go.mod h1:uhfoCLa/HKa975hKfob3wmdUiFMU2omTIWiRtYgn6XQ=
github.com/free5gc/ngap v1.0.9-0.20240414165820-453b0aa37228 h1:47Wa0ZdDI1r+IXbU6sVnMxRd9zZ4sQjXZxIQPXpitDg=
github.com/free5gc/ngap v1.0.9-0.20240414165820-453b0aa37228/go.mod h1:d5u7tYsBwxmLr3zw7wyBruRjc/gbdsHVhmdGFnVmfBU=
github.com/free5gc/openapi v1.0.9-0.20240730084323-449098e08462 h1:bK9UWqOhoddpAW9RfZRp4DPZNnPfEUeHvo4I86YAuzA=
github.com/free5gc/openapi v1.0.9-0.20240730084323-449098e08462/go.mod h1:afeuEQ21QCQDxZHnFjCmYrq3gBi+cd/WDNSUbaMcILo=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/free5gc/aper v1.0.6-0.20240503143507-2c4c4780b98f h1:sO8FFwAq7feSw/vKN9ioY+fX1gNTXd6/xQOqaeclzsA=
github.com/free5gc/aper v1.0.6-0.20240503143507-2c4c4780b98f/go.mod h1:oh3dtNsje2W4/q3pfidMWQKXbXIehXK3t6CD9tXmHx0=
github.com/free5gc/nas v1.1.4-0.20241107083120-4605e0d39ece h1:IC+OGynaXwurS2RIfno+2aKjlaFRQ6koZrC2QQu5yJ0=
github.com/free5gc/nas v1.1.4-0.20241107083120-4605e0d39ece/go.mod h1:/k8oW94r7D+lKAIFSIxZz0Qg/0tod/+oCJbsVZ2E7SU=
github.com/free5gc/ngap v1.0.9-0.20241107082718-d359a67ebfa2 h1:LMqqxvoDZAoG9xtfd5hhOiIDnPawSVcYof1nb6IkoWE=
github.com/free5gc/ngap v1.0.9-0.20241107082718-d359a67ebfa2/go.mod h1:uw13NF8Zdqp9LXlQCn9Xp2Ju3LSyki0GTyWEUAbUDbk=
github.com/free5gc/openapi v1.0.9-0.20241116070448-943255152229 h1:w3pvwFI5XABoj2J22Hrnn5rIbe0hJFzvsJCIsv8AX44=
github.com/free5gc/openapi v1.0.9-0.20241116070448-943255152229/go.mod h1:aKw6uGzEibGDrn9++w4/JpWxaaUBo7GaqsvuFKU9fl4=
github.com/free5gc/sctp v1.0.1 h1:g8WDO97r8B9ubkT5Hyk9b4I1fZUOii9Z39gQ2eRaASo=
github.com/free5gc/sctp v1.0.1/go.mod h1:7QXfRWCmlkBGD0EIu3qL5o71bslfIakydz4h2QDZdjQ=
github.com/free5gc/util v1.0.6 h1:dBt9drcXtYKE/cY5XuQcuffgsYclPIpIArhSeS6M+DQ=
Expand All @@ -41,6 +39,11 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
Expand All @@ -53,13 +56,15 @@ github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=
github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g=
github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k=
github.com/h2non/gock v1.2.0 h1:K6ol8rfrRkUOefooBC8elXoaNGYkpp7y2qcxGG6BzUE=
github.com/h2non/gock v1.2.0/go.mod h1:tNhoxHYW2W42cYkYb1WqzdbYIieALC99kpYr7rH/BQk=
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw=
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
Expand Down Expand Up @@ -131,6 +136,16 @@ github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65E
github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk=
github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.49.0 h1:RtcvQ4iw3w9NBB5yRwgA4sSa82rfId7n4atVpvKx3bY=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.49.0/go.mod h1:f/PbKbRd4cdUICWell6DmzvVJ7QrmBgFrRHjXmAXbK4=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
Expand All @@ -156,8 +171,6 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY=
gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaDva0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
Expand Down
2 changes: 1 addition & 1 deletion internal/context/3gpp_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const (
)

type CauseAll struct {
Cause *models.Cause
Cause *models.SmfPduSessionCause
NgapCause *models.NgApCause
Var5GmmCause *int32
}
57 changes: 33 additions & 24 deletions internal/context/amf_ue.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type AmfUe struct {
RetransmissionOfInitialNASMsg bool
RequestIdentityType uint8
/* Used for AMF relocation */
TargetAmfProfile *models.NfProfile
TargetAmfProfile *models.NrfNfDiscoveryNfProfile
TargetAmfUri string
/* Ue Identity */
PlmnId models.PlmnId
Expand All @@ -97,7 +97,6 @@ type AmfUe struct {
NudmSDMUri string
ContextValid bool
Reachability models.UeReachability
SubscribedData models.SubscribedData
SmfSelectionData *models.SmfSelectionSubscriptionData
UeContextInSmfData *models.UeContextInSmfData
TraceData *models.TraceData
Expand All @@ -121,7 +120,7 @@ type AmfUe struct {
PcfUri string
PolicyAssociationId string
AmPolicyUri string
AmPolicyAssociation *models.PolicyAssociation
AmPolicyAssociation *models.PcfAmPolicyControlPolicyAssociation
RequestTriggerLocationChange bool // true if AmPolicyAssociation.Trigger contains RequestTrigger_LOC_CH
/* UeContextForHandover */
HandoverNotifyUri string
Expand Down Expand Up @@ -204,7 +203,7 @@ type AmfUeEventSubscription struct {
Timestamp time.Time
AnyUe bool
RemainReports *int32
EventSubscription *models.AmfEventSubscription
EventSubscription *models.ExtAmfEventSubscription
}

type N1N2Message struct {
Expand Down Expand Up @@ -658,7 +657,7 @@ func (ue *AmfUe) RemoveAmPolicyAssociation() {
ue.PolicyAssociationId = ""
}

func (ue *AmfUe) CopyDataFromUeContextModel(ueContext models.UeContext) {
func (ue *AmfUe) CopyDataFromUeContextModel(ueContext *models.UeContext) {
if ueContext.Supi != "" {
ue.Supi = ueContext.Supi
ue.UnauthenticatedSupi = ueContext.SupiUnauthInd
Expand Down Expand Up @@ -751,35 +750,45 @@ func (ue *AmfUe) CopyDataFromUeContextModel(ueContext models.UeContext) {

if len(ueContext.AmPolicyReqTriggerList) > 0 {
if ue.AmPolicyAssociation == nil {
ue.AmPolicyAssociation = new(models.PolicyAssociation)
ue.AmPolicyAssociation = new(models.PcfAmPolicyControlPolicyAssociation)
}
for _, trigger := range ueContext.AmPolicyReqTriggerList {
switch trigger {
case models.AmPolicyReqTrigger_LOCATION_CHANGE:
ue.AmPolicyAssociation.Triggers = append(ue.AmPolicyAssociation.Triggers, models.RequestTrigger_LOC_CH)
case models.AmPolicyReqTrigger_PRA_CHANGE:
ue.AmPolicyAssociation.Triggers = append(ue.AmPolicyAssociation.Triggers, models.RequestTrigger_PRA_CH)
case models.AmPolicyReqTrigger_SARI_CHANGE:
ue.AmPolicyAssociation.Triggers = append(ue.AmPolicyAssociation.Triggers, models.RequestTrigger_SERV_AREA_CH)
case models.AmPolicyReqTrigger_RFSP_INDEX_CHANGE:
ue.AmPolicyAssociation.Triggers = append(ue.AmPolicyAssociation.Triggers, models.RequestTrigger_RFSP_CH)
case models.PolicyReqTrigger_LOCATION_CHANGE:
ue.AmPolicyAssociation.Triggers = append(ue.AmPolicyAssociation.Triggers,
models.PcfAmPolicyControlRequestTrigger_LOC_CH)
case models.PolicyReqTrigger_PRA_CHANGE:
ue.AmPolicyAssociation.Triggers = append(ue.AmPolicyAssociation.Triggers,
models.PcfAmPolicyControlRequestTrigger_PRA_CH)
case models.PolicyReqTrigger_ALLOWED_NSSAI_CHANGE:
ue.AmPolicyAssociation.Triggers = append(ue.AmPolicyAssociation.Triggers,
models.PcfAmPolicyControlRequestTrigger_ALLOWED_NSSAI_CH)
case models.PolicyReqTrigger_NWDAF_DATA_CHANGE:
ue.AmPolicyAssociation.Triggers = append(ue.AmPolicyAssociation.Triggers,
models.PcfAmPolicyControlRequestTrigger_NWDAF_DATA_CH)
case models.PolicyReqTrigger_SMF_SELECT_CHANGE:
ue.AmPolicyAssociation.Triggers = append(ue.AmPolicyAssociation.Triggers,
models.PcfAmPolicyControlRequestTrigger_SMF_SELECT_CH)
case models.PolicyReqTrigger_ACCESS_TYPE_CHANGE:
ue.AmPolicyAssociation.Triggers = append(ue.AmPolicyAssociation.Triggers,
models.PcfAmPolicyControlRequestTrigger_ACCESS_TYPE_CH)
}
}
}

if len(ueContext.SessionContextList) > 0 {
for _, pduSessionContext := range ueContext.SessionContextList {
for index := range ueContext.SessionContextList {
smContext := SmContext{
pduSessionID: pduSessionContext.PduSessionId,
smContextRef: pduSessionContext.SmContextRef,
snssai: *pduSessionContext.SNssai,
dnn: pduSessionContext.Dnn,
accessType: pduSessionContext.AccessType,
hSmfID: pduSessionContext.HsmfId,
vSmfID: pduSessionContext.VsmfId,
nsInstance: pduSessionContext.NsInstance,
pduSessionID: ueContext.SessionContextList[index].PduSessionId,
smContextRef: ueContext.SessionContextList[index].SmContextRef,
snssai: *ueContext.SessionContextList[index].SNssai,
dnn: ueContext.SessionContextList[index].Dnn,
accessType: ueContext.SessionContextList[index].AccessType,
hSmfID: ueContext.SessionContextList[index].HsmfId,
vSmfID: ueContext.SessionContextList[index].VsmfId,
nsInstance: ueContext.SessionContextList[index].NsInstance,
}
ue.StoreSmContext(pduSessionContext.PduSessionId, &smContext)
ue.StoreSmContext(ueContext.SessionContextList[index].PduSessionId, &smContext)
}
}

Expand Down
Loading

0 comments on commit e737358

Please sign in to comment.