Skip to content
Snippets Groups Projects
Unverified Commit da274d1b authored by CTFang@WireLab's avatar CTFang@WireLab
Browse files

Remove nrfCertPem and add AfType in NfProfile

parent 828e94c4
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,6 @@ type Configuration struct {
WebServer *WebServer `yaml:"webServer,omitempty" valid:"optional"`
Mongodb *Mongodb `yaml:"mongodb" valid:"required"`
NrfUri string `yaml:"nrfUri" valid:"required"`
NrfCertPem string `yaml:"nrfCertPem,omitempty" valid:"optional"`
BillingServer *BillingServer `yaml:"billingServer,omitempty" valid:"required"`
}
......
......@@ -24,7 +24,6 @@ type WEBUIContext struct {
BillingServer *billing.BillingDomain
NrfUri string
NrfCertPem string
OAuth2Required bool
NFManagementClient *Nnrf_NFManagement.APIClient
......@@ -40,7 +39,6 @@ type NfOamInstance struct {
func Init() {
webuiContext.NfInstanceID = uuid.New().String()
webuiContext.NrfUri = factory.WebuiConfig.Configuration.NrfUri
webuiContext.NrfCertPem = factory.WebuiConfig.Configuration.NrfCertPem
ManagementConfig := Nnrf_NFManagement.NewConfiguration()
ManagementConfig.SetBasePath(GetSelf().NrfUri)
......
......@@ -17,6 +17,9 @@ func SendNFRegistration() error {
NfInstanceId: GetSelf().NfInstanceID,
NfType: models.NfType_AF,
NfStatus: models.NfStatus_REGISTERED,
CustomInfo: map[string]interface{}{
"AfType": "webconsole",
},
}
var nf models.NfProfile
......@@ -57,9 +60,6 @@ func SendNFRegistration() error {
}
}
GetSelf().OAuth2Required = oauth2
if oauth2 && GetSelf().NrfCertPem == "" {
logger.CfgLog.Error("OAuth2 enable but no nrfCertPem provided in config.")
}
break
} else {
logger.ConsumerLog.Infof("handler returned wrong status code %d", status)
......
......@@ -7,7 +7,6 @@ configuration:
name: free5gc # name of the mongodb
url: mongodb://localhost:27017 # a valid URL of the mongodb
nrfUri: http://127.0.0.10:8000 # a valid URI of NRF
nrfCertPem: cert/nrf.pem
webServer:
scheme: http
ipv4Address: 0.0.0.0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment