Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add locality in config and NF Profile of SMF #25

Merged
merged 2 commits into from
Jul 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions consumer/nnrf.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ func SendNFRegistration() error {
SNssais: &sNssais,
PlmnList: smfProfile.PLMNList,
}
if smf_context.SMF_Self().Locality != "" {
profile.Locality = smf_context.SMF_Self().Locality
}
var rep models.NfProfile
var res *http.Response
var err error
Expand Down
3 changes: 3 additions & 0 deletions context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type SMFContext struct {
NFManagementClient *Nnrf_NFManagement.APIClient
NFDiscoveryClient *Nnrf_NFDiscovery.APIClient
SubscriberDataManagementClient *Nudm_SubscriberDataManagement.APIClient
Locality string

UserPlaneInformation *UserPlaneInformation

Expand Down Expand Up @@ -191,6 +192,8 @@ func InitSmfContext(config *factory.Config) {
smfContext.UserPlaneInformation = NewUserPlaneInformation(&configuration.UserPlaneInformation)

SetupNFProfile(config)

smfContext.Locality = configuration.Locality
}

func InitSMFUERouting(routingConfig *factory.RoutingConfig) {
Expand Down
1 change: 1 addition & 0 deletions factory/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type Configuration struct {
SNssaiInfo []SnssaiInfoItem `yaml:"snssaiInfos,omitempty"`
ULCL bool `yaml:"ulcl,omitempty"`
PLMNList []PLMNID `yaml:"plmnList,omitempty"`
Locality string `yaml:"locality,omitempty"`
}

type SnssaiInfoItem struct {
Expand Down