Skip to content

Commit dd0a6e4

Browse files
authored
Merge pull request #56 from free5gc/release/r17
Release/r17
2 parents 354e6dc + 2649b9e commit dd0a6e4

16 files changed

+345
-923
lines changed

go.mod

+14-9
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,38 @@ go 1.21
44

55
require (
66
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d
7-
github.com/free5gc/openapi v1.0.9-0.20240730084323-449098e08462
7+
github.com/free5gc/openapi v1.0.9-0.20250102055216-bb5814d1e736
88
github.com/free5gc/util v1.0.6
99
github.com/gin-gonic/gin v1.9.1
1010
github.com/golang-jwt/jwt/v5 v5.2.1
1111
github.com/google/uuid v1.3.0
12-
github.com/mitchellh/mapstructure v1.4.2
12+
github.com/mitchellh/mapstructure v1.5.0
1313
github.com/pkg/errors v0.9.1
14-
github.com/sirupsen/logrus v1.8.1
15-
github.com/stretchr/testify v1.8.3
14+
github.com/sirupsen/logrus v1.9.3
15+
github.com/stretchr/testify v1.9.0
1616
github.com/urfave/cli v1.22.5
1717
go.mongodb.org/mongo-driver v1.8.4
1818
gopkg.in/yaml.v2 v2.4.0
1919
)
2020

2121
require (
22-
github.com/antihax/optional v1.0.0 // indirect
2322
github.com/bytedance/sonic v1.9.1 // indirect
2423
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
2524
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d // indirect
2625
github.com/davecgh/go-spew v1.1.1 // indirect
2726
github.com/evanphx/json-patch v0.5.2 // indirect
27+
github.com/felixge/httpsnoop v1.0.4 // indirect
2828
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
2929
github.com/gin-contrib/sse v0.1.0 // indirect
30+
github.com/go-logr/logr v1.4.1 // indirect
31+
github.com/go-logr/stdr v1.2.2 // indirect
3032
github.com/go-playground/locales v0.14.1 // indirect
3133
github.com/go-playground/universal-translator v0.18.1 // indirect
3234
github.com/go-playground/validator/v10 v10.14.0 // indirect
3335
github.com/go-stack/stack v1.8.0 // indirect
3436
github.com/goccy/go-json v0.10.2 // indirect
35-
github.com/golang/protobuf v1.5.0 // indirect
3637
github.com/golang/snappy v0.0.1 // indirect
38+
github.com/h2non/gock v1.2.0 // indirect
3739
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 // indirect
3840
github.com/json-iterator/go v1.1.12 // indirect
3941
github.com/klauspost/compress v1.13.6 // indirect
@@ -53,15 +55,18 @@ require (
5355
github.com/xdg-go/scram v1.0.2 // indirect
5456
github.com/xdg-go/stringprep v1.0.2 // indirect
5557
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
58+
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.49.0 // indirect
59+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
60+
go.opentelemetry.io/otel v1.24.0 // indirect
61+
go.opentelemetry.io/otel/metric v1.24.0 // indirect
62+
go.opentelemetry.io/otel/trace v1.24.0 // indirect
5663
golang.org/x/arch v0.3.0 // indirect
5764
golang.org/x/crypto v0.31.0 // indirect
5865
golang.org/x/net v0.33.0 // indirect
59-
golang.org/x/oauth2 v0.0.0-20210810183815-faf39c7919d5 // indirect
66+
golang.org/x/oauth2 v0.21.0 // indirect
6067
golang.org/x/sync v0.10.0 // indirect
6168
golang.org/x/sys v0.28.0 // indirect
6269
golang.org/x/text v0.21.0 // indirect
63-
google.golang.org/appengine v1.6.6 // indirect
6470
google.golang.org/protobuf v1.33.0 // indirect
65-
gopkg.in/h2non/gock.v1 v1.1.2 // indirect
6671
gopkg.in/yaml.v3 v3.0.1 // indirect
6772
)

go.sum

+32-356
Large diffs are not rendered by default.

internal/context/context.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
)
2020

2121
type NRFContext struct {
22-
NrfNfProfile models.NfProfile
22+
NrfNfProfile models.NrfNfManagementNfProfile
2323
Nrf_NfInstanceID string
2424
RootPrivKey *rsa.PrivateKey
2525
RootCert *x509.Certificate
@@ -49,8 +49,8 @@ func InitNrfContext() error {
4949
configuration := config.Configuration
5050

5151
nrfContext.NrfNfProfile.NfInstanceId = uuid.New().String()
52-
nrfContext.NrfNfProfile.NfType = models.NfType_NRF
53-
nrfContext.NrfNfProfile.NfStatus = models.NfStatus_REGISTERED
52+
nrfContext.NrfNfProfile.NfType = models.NrfNfManagementNfType_NRF
53+
nrfContext.NrfNfProfile.NfStatus = models.NrfNfManagementNfStatus_REGISTERED
5454
nrfContext.NfRegistNum = 0
5555

5656
serviceNameList := configuration.ServiceNameList
@@ -107,20 +107,20 @@ func InitNrfContext() error {
107107
}
108108

109109
NFServices := InitNFService(serviceNameList, config.Info.Version)
110-
nrfContext.NrfNfProfile.NfServices = &NFServices
110+
nrfContext.NrfNfProfile.NfServices = NFServices
111111
return nil
112112
}
113113

114-
func InitNFService(srvNameList []string, version string) []models.NfService {
114+
func InitNFService(srvNameList []string, version string) []models.NrfNfManagementNfService {
115115
tmpVersion := strings.Split(version, ".")
116116
versionUri := "v" + tmpVersion[0]
117-
NFServices := make([]models.NfService, len(srvNameList))
117+
NFServices := make([]models.NrfNfManagementNfService, len(srvNameList))
118118
for index, nameString := range srvNameList {
119119
name := models.ServiceName(nameString)
120-
NFServices[index] = models.NfService{
120+
NFServices[index] = models.NrfNfManagementNfService{
121121
ServiceInstanceId: strconv.Itoa(index),
122122
ServiceName: name,
123-
Versions: &[]models.NfServiceVersion{
123+
Versions: []models.NfServiceVersion{
124124
{
125125
ApiFullVersion: version,
126126
ApiVersionInUri: versionUri,
@@ -129,10 +129,10 @@ func InitNFService(srvNameList []string, version string) []models.NfService {
129129
Scheme: models.UriScheme(factory.NrfConfig.GetSbiScheme()),
130130
NfServiceStatus: models.NfServiceStatus_REGISTERED,
131131
ApiPrefix: factory.NrfConfig.GetSbiUri(),
132-
IpEndPoints: &[]models.IpEndPoint{
132+
IpEndPoints: []models.IpEndPoint{
133133
{
134134
Ipv4Address: factory.NrfConfig.GetSbiRegisterIP(),
135-
Transport: models.TransportProtocol_TCP,
135+
Transport: models.NrfNfManagementTransportProtocol_TCP,
136136
Port: int32(factory.NrfConfig.GetSbiPort()),
137137
},
138138
},

0 commit comments

Comments
 (0)