From a8aed0d96e495c71b1cde9b1116c248ed4fe5690 Mon Sep 17 00:00:00 2001 From: simonzhangsz Date: Tue, 12 Sep 2023 15:55:07 +0800 Subject: [PATCH] remove RJ --- config/etc/default/crontask.yaml | 8 +++---- config/etc/default/restconf.yaml | 6 +++--- crontask/etc/crontask.yaml | 6 +++--- features/ue/ue.go | 36 +++++++++++++++++--------------- restagent/etc/restconf-t.yaml | 6 +++--- restagent/etc/restconf.yaml | 6 +++--- 6 files changed, 35 insertions(+), 33 deletions(-) diff --git a/config/etc/default/crontask.yaml b/config/etc/default/crontask.yaml index 60064c17..ea37744e 100644 --- a/config/etc/default/crontask.yaml +++ b/config/etc/default/crontask.yaml @@ -8,12 +8,12 @@ logger: count: 90 omc: - name: BJ_OMC01 + name: OMC01 hosturi: http://127.0.0.1:3030 - hostno: R001 - province: BJ + hostno: A001 + province: GD netabbr: HX - vendor: RJ + vendor: - tasks: file: /usr/local/omc/etc/tasks.yaml diff --git a/config/etc/default/restconf.yaml b/config/etc/default/restconf.yaml index 8e8d60f0..80076778 100644 --- a/config/etc/default/restconf.yaml +++ b/config/etc/default/restconf.yaml @@ -69,10 +69,10 @@ omc: uriPrefix: /api/rest/oam neType: OMC neId: 001 - rmUID: 1100RJHX1OMC001 + rmUID: 4400HX101 neName: OMC - province: BJ - vendor: RJ + province: GD + vendor: - dn: 4600 chk2ne: false sn: 13750650 diff --git a/crontask/etc/crontask.yaml b/crontask/etc/crontask.yaml index 5f242f77..aa08054e 100644 --- a/crontask/etc/crontask.yaml +++ b/crontask/etc/crontask.yaml @@ -8,12 +8,12 @@ logger: count: 10 omc: - name: BJ_OMC01 + name: OMC01 hosturi: http://127.0.0.1:3040 hostno: R001 - province: BJ + province: GD netabbr: HX - vendor: RJ + vendor: tasks: file: ./etc/tasks.yaml diff --git a/features/ue/ue.go b/features/ue/ue.go index 5a4707c3..b27bb1d7 100644 --- a/features/ue/ue.go +++ b/features/ue/ue.go @@ -30,17 +30,19 @@ type SmfUENum struct { // SmfUEInfo SMF在线用户信息 type SmfUEInfo struct { - IMSI string `json:"imsi"` - MSISDN string `json:"msisdn"` - IPv4 []string `json:"ipv4"` - Dnn []string `json:"dnn"` - Tai []string `json:"tai"` - PduSessionID []int `json:"pduSessionID"` - IPv6 []string `json:"ipv6"` - SstSD []string `json:"sstSD"` - UpfN3IP []string `json:"upfN3IP"` - RanN3IP []string `json:"ranN3IP"` - Activetime []string `json:"activeTime"` + IMSI string `json:"imsi"` + MSISDN string `json:"msisdn"` + PduSessionInfo []struct { + PduSessionID int `json:"pduSessionID"` + IPv4 string `json:"ipv4"` + IPv6 string `json:"ipv6"` + Dnn string `json:"dnn"` + Tai string `json:"tai"` + SstSD string `json:"sstSD"` + UpfN3IP string `json:"upfN3IP"` + RanN3IP string `json:"ranN3IP"` + Activetime string `json:"activeTime"` + } `json:"pduSessionInfo"` } // ImsUEInfo IMS在线用户信息 @@ -120,7 +122,7 @@ func GetUEInfoFromNF(w http.ResponseWriter, r *http.Request) { log.Trace("neInfo:", neInfo) hostUri := fmt.Sprintf("http://%s:%v", neInfo.Ip, neInfo.Port) - requestURI2NF := fmt.Sprintf("%s/%s", hostUri, r.RequestURI) + requestURI2NF := fmt.Sprintf("%s%s", hostUri, r.RequestURI) log.Debug("requestURI2NF:", requestURI2NF) @@ -137,7 +139,7 @@ func GetUEInfoFromNF(w http.ResponseWriter, r *http.Request) { } else { var response services.DataResponse _ = json.Unmarshal(resp.Body(), &response) - services.ResponseWithJson(w, http.StatusOK, response) + services.ResponseWithJson(w, resp.StatusCode(), response) return } } @@ -183,7 +185,7 @@ func GetUENumFromNF(w http.ResponseWriter, r *http.Request) { log.Trace("neInfo:", neInfo) hostUri := fmt.Sprintf("http://%s:%v", neInfo.Ip, neInfo.Port) - requestURI2NF := fmt.Sprintf("%s/%s", hostUri, r.RequestURI) + requestURI2NF := fmt.Sprintf("%s%s", hostUri, r.RequestURI) log.Debug("requestURI2NF:", requestURI2NF) @@ -200,7 +202,7 @@ func GetUENumFromNF(w http.ResponseWriter, r *http.Request) { } else { var response services.DataResponse _ = json.Unmarshal(resp.Body(), &response) - services.ResponseWithJson(w, http.StatusOK, response) + services.ResponseWithJson(w, resp.StatusCode(), response) return } } @@ -246,7 +248,7 @@ func GetNBInfoFromNF(w http.ResponseWriter, r *http.Request) { log.Trace("neInfo:", neInfo) hostUri := fmt.Sprintf("http://%s:%v", neInfo.Ip, neInfo.Port) - requestURI2NF := fmt.Sprintf("%s/%s", hostUri, r.RequestURI) + requestURI2NF := fmt.Sprintf("%s%s", hostUri, r.RequestURI) log.Debug("requestURI2NF:", requestURI2NF) @@ -263,7 +265,7 @@ func GetNBInfoFromNF(w http.ResponseWriter, r *http.Request) { } else { var response services.DataResponse _ = json.Unmarshal(resp.Body(), &response) - services.ResponseWithJson(w, http.StatusOK, response) + services.ResponseWithJson(w, resp.StatusCode(), response) return } } diff --git a/restagent/etc/restconf-t.yaml b/restagent/etc/restconf-t.yaml index bcb66aad..274f1ea6 100644 --- a/restagent/etc/restconf-t.yaml +++ b/restagent/etc/restconf-t.yaml @@ -53,10 +53,10 @@ omc: uriPrefix: /api/rest neType: OMC neId: 001 - rmUID: 1100RJHX1OMC001 + rmUID: 4400HX101 neName: OMC - province: BJ - vendor: RJ + province: GD + vendor: - dn: 4600 chk2ne: false sn: 13750650 diff --git a/restagent/etc/restconf.yaml b/restagent/etc/restconf.yaml index 875cf460..d06a3f8e 100644 --- a/restagent/etc/restconf.yaml +++ b/restagent/etc/restconf.yaml @@ -69,10 +69,10 @@ omc: uriPrefix: /api/rest neType: OMC neId: 001 - rmUID: 1100RJHX1OMC001 + rmUID: 4400HX101 neName: OMC - province: BJ - vendor: RJ + province: GD + vendor: - dn: 4600 chk2ne: false sn: 13750650