From b426d18ebb079e870983262de1abe2285c7a87e7 Mon Sep 17 00:00:00 2001 From: Patricia Reinoso Date: Tue, 28 May 2024 15:32:03 +0000 Subject: [PATCH] remove mongodb --- factory/config.go | 6 ----- factory/pcfcfg.yaml | 3 --- factory/pcfcfg_with_custom_webui_url.yaml | 3 --- producer/smpolicy.go | 27 ----------------------- 4 files changed, 39 deletions(-) diff --git a/factory/config.go b/factory/config.go index 6d32253..da6c168 100644 --- a/factory/config.go +++ b/factory/config.go @@ -44,7 +44,6 @@ type Configuration struct { NrfUri string `yaml:"nrfUri,omitempty"` WebuiUri string `yaml:"webuiUri"` ServiceList []Service `yaml:"serviceList,omitempty"` - Mongodb *Mongodb `yaml:"mongodb"` // config received from RoC DnnList map[string][]string // sst+sd os key @@ -66,11 +65,6 @@ type Sbi struct { Port int `yaml:"port,omitempty"` } -type Mongodb struct { - Name string `yaml:"name"` - Url string `yaml:"url"` -} - type PlmnSupportItem struct { PlmnId models.PlmnId `yaml:"plmnId"` } diff --git a/factory/pcfcfg.yaml b/factory/pcfcfg.yaml index 33c4c12..9a7392d 100644 --- a/factory/pcfcfg.yaml +++ b/factory/pcfcfg.yaml @@ -3,9 +3,6 @@ configuration: defaultBdtRefId: BdtPolicyId- - mongodb: - name: free5gc - url: http://1.1.1.1 nrfUri: https://nrf:443 pcfName: PCF info: diff --git a/factory/pcfcfg_with_custom_webui_url.yaml b/factory/pcfcfg_with_custom_webui_url.yaml index ec68ce4..869bc6a 100644 --- a/factory/pcfcfg_with_custom_webui_url.yaml +++ b/factory/pcfcfg_with_custom_webui_url.yaml @@ -3,9 +3,6 @@ configuration: defaultBdtRefId: BdtPolicyId- - mongodb: - name: free5gc - url: http://1.1.1.1 nrfUri: https://nrf:443 webuiUri: myspecialwebui:9872 # a valid URI of Webui pcfName: PCF diff --git a/producer/smpolicy.go b/producer/smpolicy.go index 8474735..afa6ee9 100644 --- a/producer/smpolicy.go +++ b/producer/smpolicy.go @@ -237,33 +237,6 @@ func createSMPolicyProcedure(request models.SmPolicyContextData) ( decision.Offline = request.Offline } - // get flow rules from databases - /* filter := bson.M{"ueId": ue.Supi, "snssai": util.SnssaiModelsToHex(*request.SliceInfo), "dnn": request.Dnn} - flowRulesInterface := MongoDBLibrary.RestfulAPIGetMany(flowRuleDataColl, filter) - - for _, flowRule := range flowRulesInterface { - pccRule := util.CreatePccRule(smPolicyData.PccRuleIdGenarator, 33, []models.FlowInformation{ - { - FlowDescription: flowRule["filter"].(string), - FlowDirection: models.FlowDirectionRm_BIDIRECTIONAL, - }, - }, "") - - qosData := &models.QosData{ - QosId: util.GetQosId(smPolicyData.PccRuleIdGenarator), - GbrUl: flowRule["gbrUL"].(string), - GbrDl: flowRule["gbrDL"].(string), - MaxbrUl: flowRule["mbrUL"].(string), - MaxbrDl: flowRule["mbrDL"].(string), - Qnc: false, - Var5qi: int32(flowRule["5qi"].(float64)), - } - util.SetPccRuleRelatedData(&decision, pccRule, nil, qosData, nil, nil) - - smPolicyData.PccRuleIdGenarator++ - } - */ - requestSuppFeat, err := openapi.NewSupportedFeature(request.SuppFeat) if err != nil { logger.SMpolicylog.Errorf("openapi NewSupportedFeature error: %+v", err)