diff --git a/src/framework/utils/ssh/files.go b/src/framework/utils/ssh/files.go index d38a62d5..e681ee99 100644 --- a/src/framework/utils/ssh/files.go +++ b/src/framework/utils/ssh/files.go @@ -11,7 +11,7 @@ import ( // FileListRow 文件列表行数据 type FileListRow struct { - FileType string `json:"fileType"` // 文件类型 + FileType string `json:"fileType"` // 文件类型 dir, file, symlink FileMode string `json:"fileMode"` // 文件的权限 LinkCount int64 `json:"linkCount"` // 硬链接数目 Owner string `json:"owner"` // 所属用户 diff --git a/src/framework/utils/ssh/ssh.go b/src/framework/utils/ssh/ssh.go index 6a4a526a..f412b718 100644 --- a/src/framework/utils/ssh/ssh.go +++ b/src/framework/utils/ssh/ssh.go @@ -165,7 +165,6 @@ func (c *ConnSSH) NewClientSFTP() (*SSHClientSFTP, error) { // Port: body.Port, // } func (c *ConnSSH) NewClientByLocalPrivate() (*ConnSSH, error) { - c.Port = 22 c.AuthMode = "1" privateKey, err := c.CurrentUserRsaKey(false) if err != nil { diff --git a/src/modules/monitor/controller/monitor.go b/src/modules/monitor/controller/monitor.go index b1e90d34..bc18a66a 100644 --- a/src/modules/monitor/controller/monitor.go +++ b/src/modules/monitor/controller/monitor.go @@ -28,7 +28,13 @@ type MonitorController struct { // @Tags monitor // @Accept json // @Produce json -// @Success 200 {object} object "Response Results" +// @Param type query string true "Data Type" Enums(all,load,cpu,memory,io,network) default(all) +// @Param startTime query number true "StartTime, timestamp milliseconds" default(1738771200000) +// @Param endTime query number true "EndTime, timestamp milliseconds" default(1738810051253) +// @Param neType query string false "NE Type, Currently none Default #" default(#) +// @Param neId query string false "NE ID, Currently none Default #" default(#) +// @Param name query string false "Name, Data Type valid for networ and io" +// @Success 200 {object} object "Response Results" // @Security TokenAuth // @Summary Resource monitoring information loading // @Description Resource monitoring information loading diff --git a/src/modules/monitor/monitor.go b/src/modules/monitor/monitor.go index b71bbfa4..751716a9 100644 --- a/src/modules/monitor/monitor.go +++ b/src/modules/monitor/monitor.go @@ -23,14 +23,15 @@ func Setup(router *gin.Engine) { monitorGroup := router.Group("/monitor") { monitorGroup.GET("/load", - // middleware.PreAuthorize(nil), + middleware.PreAuthorize(nil), controller.NewMonitor.Load, ) } // 服务器服务信息 router.GET("/monitor/system-info", - middleware.PreAuthorize(map[string][]string{"hasPerms": {"monitor:system:info"}}), + // middleware.PreAuthorize(map[string][]string{"hasPerms": {"monitor:system:info"}}), + middleware.PreAuthorize(nil), controller.NewSystemInfo.Info, ) @@ -38,7 +39,8 @@ func Setup(router *gin.Engine) { sysCacheGroup := router.Group("/monitor/cache") { sysCacheGroup.GET("", - middleware.PreAuthorize(map[string][]string{"hasPerms": {"monitor:cache:info"}}), + // middleware.PreAuthorize(map[string][]string{"hasPerms": {"monitor:cache:info"}}), + middleware.PreAuthorize(nil), controller.NewSysCache.Info, ) sysCacheGroup.GET("/getNames", diff --git a/src/modules/network_data/controller/all_kpi.go b/src/modules/network_data/controller/all_kpi.go index 2a29e9fd..935c4568 100644 --- a/src/modules/network_data/controller/all_kpi.go +++ b/src/modules/network_data/controller/all_kpi.go @@ -36,11 +36,11 @@ type PerfKPIController struct { // @Tags network_data/kpi // @Accept json // @Produce json -// @Param neType query string true "NE Type" Enums(IMS,AMF,AUSF,UDM,SMF,PCF,NSSF,NRF,UPF,MME,CBC,OMC,SGWC) +// @Param neType query string true "NE Type" Enums(IMS,AMF,AUSF,UDM,SMF,PCF,NSSF,NRF,UPF,MME,CBC,OMC,SGWC) default(AMF) // @Param neId query string true "NE ID" default(001) -// @Param startTime query number true "Start time (timestamped milliseconds)" default(1737453599059) -// @Param endTime query number true "End time (timestamped milliseconds)" default(1737453599059) -// @Param interval query number true "interval" Enums(5,10,15,30,60,300,600,900,1800,3600) +// @Param startTime query number true "Start time (timestamped milliseconds)" default(1729162507596) +// @Param endTime query number true "End time (timestamped milliseconds)" default(1729164187611) +// @Param interval query number true "interval" Enums(5,10,15,30,60,300,600,900,1800,3600) default(60) // @Success 200 {object} object "Response Results" // @Security TokenAuth // @Summary Access to statistical data @@ -102,7 +102,7 @@ func (s *PerfKPIController) GoldKPI(c *gin.Context) { // @Tags network_data/kpi // @Accept json // @Produce json -// @Param neType query string true "NE Type" Enums(IMS,AMF,AUSF,UDM,SMF,PCF,NSSF,NRF,UPF,MME,CBC,OMC,SGWC) +// @Param neType query string true "NE Type" Enums(IMS,AMF,AUSF,UDM,SMF,PCF,NSSF,NRF,UPF,MME,CBC,OMC,SGWC) default(AMF) // @Success 200 {object} object "Response Results" // @Security TokenAuth // @Summary Get Statistical Headings diff --git a/src/modules/network_data/controller/udm_auth.go b/src/modules/network_data/controller/udm_auth.go index 5c855265..852f2ccb 100644 --- a/src/modules/network_data/controller/udm_auth.go +++ b/src/modules/network_data/controller/udm_auth.go @@ -205,7 +205,7 @@ func (s *UDMAuthController) Add(c *gin.Context) { // @Accept json // @Produce json // @Param neId path string true "NE ID" default(001) -// @Param value path number true "Number includes starting imsi" +// @Param value path number true "Number of releases, value includes start imsi" // @Param data body object true "Request Param" // @Success 200 {object} object "Response Results" // @Security TokenAuth @@ -390,7 +390,7 @@ func (s *UDMAuthController) Remove(c *gin.Context) { // @Produce json // @Param neId path string true "NE ID" default(001) // @Param imsi path string true "IMSI" -// @Param num path number true "Number includes starting imsi" +// @Param num path number true "Number of releases, value includes start imsi" // @Success 200 {object} object "Response Results" // @Security TokenAuth // @Summary UDM Authentication User Batch Deletion diff --git a/src/modules/network_data/controller/udm_sub.go b/src/modules/network_data/controller/udm_sub.go index 7e28f96a..4114ff87 100644 --- a/src/modules/network_data/controller/udm_sub.go +++ b/src/modules/network_data/controller/udm_sub.go @@ -216,8 +216,8 @@ func (s *UDMSubController) Add(c *gin.Context) { // @Tags network_data/udm/sub // @Accept json // @Produce json -// @Param neId path string true "NE ID" default(001) -// @Param value path number true "Number includes starting imsi" default(1) +// @Param neId path string true "NE ID" default(001) +// @Param value path number true "Number of releases, value includes start imsi" default(1) // @Param data body object true "Request Param" // @Success 200 {object} object "Response Results" // @Security TokenAuth @@ -406,7 +406,7 @@ func (s *UDMSubController) Remove(c *gin.Context) { // @Produce json // @Param neId path string true "NE ID" default(001) // @Param imsi path string true "IMSI" -// @Param num path number true "Number includes starting imsi" +// @Param num path number true "Number of releases, value includes start imsi" // @Success 200 {object} object "Response Results" // @Security TokenAuth // @Summary UDM Subscriber User Batch Deletion diff --git a/src/modules/network_data/service/cdr_event_ims.go b/src/modules/network_data/service/cdr_event_ims.go index 071177f6..225196fb 100644 --- a/src/modules/network_data/service/cdr_event_ims.go +++ b/src/modules/network_data/service/cdr_event_ims.go @@ -58,11 +58,12 @@ func (r CDREventIMS) ExportXlsx(rows []model.CDREventIMS, fileName, language str "A1": "ID", "B1": "Record Behavior", "C1": "Type", - "D1": "Caller", - "E1": "Called", - "F1": "Duration", - "G1": "Result", - "H1": "Time", + "D1": "Called", + "E1": "Result", + "F1": "Caller", + "G1": "Duration", + "H1": "Call Start Time", + "I1": "Hangup Time", } // 读取字典数据 CDR SIP响应代码类别类型 dictCDRSipCode := sysService.NewSysDictData.SelectDictDataByType("cdr_sip_code") @@ -122,13 +123,22 @@ func (r CDREventIMS) ExportXlsx(rows []model.CDREventIMS, fileName, language str } } } - // 取时间 - timeStr := "" + // 呼叫时间 + seizureTimeStr := "" + if v, ok := cdrJSON["seizureTime"]; ok && v != nil { + if seizureTime := parse.Number(v); seizureTime > 0 { + seizureTimeStr = date.ParseDateToStr(seizureTime, date.YYYY_MM_DDTHH_MM_SSZ) + } else { + seizureTimeStr = v.(string) + } + } + // 挂断时间 + releaseTimeStr := "" if v, ok := cdrJSON["releaseTime"]; ok && v != nil { if releaseTime := parse.Number(v); releaseTime > 0 { - timeStr = date.ParseDateToStr(releaseTime, date.YYYY_MM_DDTHH_MM_SSZ) + releaseTimeStr = date.ParseDateToStr(releaseTime, date.YYYY_MM_DDTHH_MM_SSZ) } else { - timeStr = v.(string) + releaseTimeStr = v.(string) } } @@ -136,11 +146,12 @@ func (r CDREventIMS) ExportXlsx(rows []model.CDREventIMS, fileName, language str "A" + idx: row.ID, "B" + idx: recordType, "C" + idx: callTypeLable, - "D" + idx: caller, - "E" + idx: called, - "F" + idx: duration, - "G" + idx: callResult, - "H" + idx: timeStr, + "D" + idx: called, + "E" + idx: callResult, + "F" + idx: caller, + "G" + idx: duration, + "H" + idx: seizureTimeStr, + "I" + idx: releaseTimeStr, }) } diff --git a/src/modules/network_element/controller/action.go b/src/modules/network_element/controller/action.go index 6fcaadd7..14273c8f 100644 --- a/src/modules/network_element/controller/action.go +++ b/src/modules/network_element/controller/action.go @@ -38,7 +38,8 @@ type NeActionController struct { // @Tags network_element/action // @Accept json // @Produce json -// @Success 200 {object} object "Response Results" +// @Param data body object true "Request Param" +// @Success 200 {object} object "Response Results" // @Security TokenAuth // @Summary Sending files from local to network elements // @Description Sending files from local to network elements @@ -104,7 +105,12 @@ func (s *NeActionController) PushFile(c *gin.Context) { // @Tags network_element/action // @Accept json // @Produce json -// @Success 200 {object} object "Response Results" +// @Param neType query string true "NE Type" Enums(IMS,AMF,AUSF,UDM,SMF,PCF,NSSF,NRF,UPF,MME,CBC,OMC,SGWC) default(UPF) +// @Param neId query string true "NE ID" default(001) +// @Param path query string true "dir path" default(/var/log) +// @Param fileName query string true "file name" +// @Param delTemp query boolean false "Delete Temp File" default(false) +// @Success 200 {object} object "Response Results" // @Security TokenAuth // @Summary Getting files from the network element to the local // @Description Getting files from the network element to the local @@ -172,7 +178,11 @@ func (s *NeActionController) PullFile(c *gin.Context) { // @Tags network_element/action // @Accept json // @Produce json -// @Success 200 {object} object "Response Results" +// @Param neType query string true "NE Type" Enums(IMS,AMF,AUSF,UDM,SMF,PCF,NSSF,NRF,UPF,MME,CBC,OMC,SGWC) default(UPF) +// @Param neId query string true "NE ID" default(001) +// @Param path query string true "dir path" default(/var/log) +// @Param delTemp query boolean false "Delete Temp File" default(false) +// @Success 200 {object} object "Response Results" // @Security TokenAuth // @Summary Get directories compressed to ZIP from the network element to the local area // @Description Get directories compressed to ZIP from the network element to the local area @@ -248,7 +258,11 @@ func (s *NeActionController) PullDirZip(c *gin.Context) { // @Tags network_element/action // @Accept json // @Produce json -// @Success 200 {object} object "Response Results" +// @Param neType query string true "NE Type" Enums(IMS,AMF,AUSF,UDM,SMF,PCF,NSSF,NRF,UPF,MME,CBC,OMC,SGWC) default(UPF) +// @Param neId query string true "NE ID" default(001) +// @Param path query string true "file path" default(/var/log) +// @Param fileName query string true "file name" +// @Success 200 {object} object "Response Results" // @Security TokenAuth // @Summary Viewing the contents of a file on the network element side // @Description Viewing the contents of a file on the network element side @@ -300,7 +314,13 @@ func (s *NeActionController) ViewFile(c *gin.Context) { // @Tags network_element/action // @Accept json // @Produce json -// @Success 200 {object} object "Response Results" +// @Param neType query string true "NE Type" Enums(IMS,AMF,AUSF,UDM,SMF,PCF,NSSF,NRF,UPF,MME,CBC,OMC,SGWC) default(UPF) +// @Param neId query string true "NE ID" default(001) +// @Param path query string true "file path" default(/var/log) +// @Param pageNum query number true "pageNum" default(1) +// @Param pageSize query number true "pageSize" default(10) +// @Param search query string false "search prefix" default(upf) +// @Success 200 {object} object "Response Results" // @Security TokenAuth // @Summary List of files on the network element side // @Description List of files on the network element side @@ -373,7 +393,8 @@ func (s *NeActionController) Files(c *gin.Context) { // @Tags network_element/action // @Accept json // @Produce json -// @Success 200 {object} object "Response Results" +// @Param data body object true "Request Param" +// @Success 200 {object} object "Response Results" // @Security TokenAuth // @Summary Network element service operation // @Description Network element service operation diff --git a/src/modules/network_element/ne_config_test.go b/src/modules/network_element/ne_config_test.go index 1324d58c..1a601365 100644 --- a/src/modules/network_element/ne_config_test.go +++ b/src/modules/network_element/ne_config_test.go @@ -21,15 +21,15 @@ import ( const ( // 数据库 - DbHost = "127.0.0.1" - DbPort = 33066 + DbHost = "192.168.9.58" + DbPort = 13306 DbUser = "root" DbPassswd = "1000omc@kp!" DbName = "omc_db" // 配置文件路径 configParamDir = "../../../config/param" // configParamFile = "*" // 目录下全部更新 - configParamFile = "omc_param_config.yaml" // 单文件更新 + configParamFile = "mme_param_config.yaml" // 单文件更新 ) func TestConfig(t *testing.T) { diff --git a/swagger2docs/docs.go b/swagger2docs/docs.go index 9e94c773..91a80138 100644 --- a/swagger2docs/docs.go +++ b/swagger2docs/docs.go @@ -560,6 +560,60 @@ const docTemplate = `{ "monitor" ], "summary": "Resource monitoring information loading", + "parameters": [ + { + "enum": [ + "all", + "load", + "cpu", + "memory", + "io", + "network" + ], + "type": "string", + "default": "all", + "description": "Data Type", + "name": "type", + "in": "query", + "required": true + }, + { + "type": "number", + "default": 1738771200000, + "description": "StartTime, timestamp milliseconds", + "name": "startTime", + "in": "query", + "required": true + }, + { + "type": "number", + "default": 1738810051253, + "description": "EndTime, timestamp milliseconds", + "name": "endTime", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "#", + "description": "NE Type, Currently none Default #", + "name": "neType", + "in": "query" + }, + { + "type": "string", + "default": "#", + "description": "NE ID, Currently none Default #", + "name": "neId", + "in": "query" + }, + { + "type": "string", + "description": "Name, Data Type valid for networ and io", + "name": "name", + "in": "query" + } + ], "responses": { "200": { "description": "Response Results", @@ -644,6 +698,70 @@ const docTemplate = `{ "network_element/action" ], "summary": "List of files on the network element side", + "parameters": [ + { + "enum": [ + "IMS", + "AMF", + "AUSF", + "UDM", + "SMF", + "PCF", + "NSSF", + "NRF", + "UPF", + "MME", + "CBC", + "OMC", + "SGWC" + ], + "type": "string", + "default": "UPF", + "description": "NE Type", + "name": "neType", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "001", + "description": "NE ID", + "name": "neId", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "/var/log", + "description": "file path", + "name": "path", + "in": "query", + "required": true + }, + { + "type": "number", + "default": 1, + "description": "pageNum", + "name": "pageNum", + "in": "query", + "required": true + }, + { + "type": "number", + "default": 10, + "description": "pageSize", + "name": "pageSize", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "upf", + "description": "search prefix", + "name": "search", + "in": "query" + } + ], "responses": { "200": { "description": "Response Results", @@ -672,6 +790,54 @@ const docTemplate = `{ "network_element/action" ], "summary": "Get directories compressed to ZIP from the network element to the local area", + "parameters": [ + { + "enum": [ + "IMS", + "AMF", + "AUSF", + "UDM", + "SMF", + "PCF", + "NSSF", + "NRF", + "UPF", + "MME", + "CBC", + "OMC", + "SGWC" + ], + "type": "string", + "default": "UPF", + "description": "NE Type", + "name": "neType", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "001", + "description": "NE ID", + "name": "neId", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "/var/log", + "description": "dir path", + "name": "path", + "in": "query", + "required": true + }, + { + "type": "boolean", + "default": false, + "description": "Delete Temp File", + "name": "delTemp", + "in": "query" + } + ], "responses": { "200": { "description": "Response Results", @@ -700,6 +866,61 @@ const docTemplate = `{ "network_element/action" ], "summary": "Getting files from the network element to the local", + "parameters": [ + { + "enum": [ + "IMS", + "AMF", + "AUSF", + "UDM", + "SMF", + "PCF", + "NSSF", + "NRF", + "UPF", + "MME", + "CBC", + "OMC", + "SGWC" + ], + "type": "string", + "default": "UPF", + "description": "NE Type", + "name": "neType", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "001", + "description": "NE ID", + "name": "neId", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "/var/log", + "description": "dir path", + "name": "path", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "file name", + "name": "fileName", + "in": "query", + "required": true + }, + { + "type": "boolean", + "default": false, + "description": "Delete Temp File", + "name": "delTemp", + "in": "query" + } + ], "responses": { "200": { "description": "Response Results", @@ -728,6 +949,17 @@ const docTemplate = `{ "network_element/action" ], "summary": "Sending files from local to network elements", + "parameters": [ + { + "description": "Request Param", + "name": "data", + "in": "body", + "required": true, + "schema": { + "type": "object" + } + } + ], "responses": { "200": { "description": "Response Results", @@ -756,6 +988,17 @@ const docTemplate = `{ "network_element/action" ], "summary": "Network element service operation", + "parameters": [ + { + "description": "Request Param", + "name": "data", + "in": "body", + "required": true, + "schema": { + "type": "object" + } + } + ], "responses": { "200": { "description": "Response Results", @@ -784,6 +1027,54 @@ const docTemplate = `{ "network_element/action" ], "summary": "Viewing the contents of a file on the network element side", + "parameters": [ + { + "enum": [ + "IMS", + "AMF", + "AUSF", + "UDM", + "SMF", + "PCF", + "NSSF", + "NRF", + "UPF", + "MME", + "CBC", + "OMC", + "SGWC" + ], + "type": "string", + "default": "UPF", + "description": "NE Type", + "name": "neType", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "001", + "description": "NE ID", + "name": "neId", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "/var/log", + "description": "file path", + "name": "path", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "file name", + "name": "fileName", + "in": "query", + "required": true + } + ], "responses": { "200": { "description": "Response Results", @@ -2527,6 +2818,7 @@ const docTemplate = `{ "SGWC" ], "type": "string", + "default": "AMF", "description": "NE Type", "name": "neType", "in": "query", @@ -2542,7 +2834,7 @@ const docTemplate = `{ }, { "type": "number", - "default": 1737453599059, + "default": 1729162507596, "description": "Start time (timestamped milliseconds)", "name": "startTime", "in": "query", @@ -2550,7 +2842,7 @@ const docTemplate = `{ }, { "type": "number", - "default": 1737453599059, + "default": 1729164187611, "description": "End time (timestamped milliseconds)", "name": "endTime", "in": "query", @@ -2570,6 +2862,7 @@ const docTemplate = `{ 3600 ], "type": "number", + "default": 60, "description": "interval", "name": "interval", "in": "query", @@ -2622,6 +2915,7 @@ const docTemplate = `{ "SGWC" ], "type": "string", + "default": "AMF", "description": "NE Type", "name": "neType", "in": "query", @@ -3722,7 +4016,7 @@ const docTemplate = `{ }, { "type": "number", - "description": "Number includes starting imsi", + "description": "Number of releases, value includes start imsi", "name": "num", "in": "path", "required": true @@ -3810,7 +4104,7 @@ const docTemplate = `{ }, { "type": "number", - "description": "Number includes starting imsi", + "description": "Number of releases, value includes start imsi", "name": "value", "in": "path", "required": true @@ -4188,7 +4482,7 @@ const docTemplate = `{ }, { "type": "number", - "description": "Number includes starting imsi", + "description": "Number of releases, value includes start imsi", "name": "num", "in": "path", "required": true @@ -4277,7 +4571,7 @@ const docTemplate = `{ { "type": "number", "default": 1, - "description": "Number includes starting imsi", + "description": "Number of releases, value includes start imsi", "name": "value", "in": "path", "required": true diff --git a/swagger2docs/swagger.json b/swagger2docs/swagger.json index 463c588c..9316faae 100644 --- a/swagger2docs/swagger.json +++ b/swagger2docs/swagger.json @@ -558,6 +558,60 @@ "monitor" ], "summary": "Resource monitoring information loading", + "parameters": [ + { + "enum": [ + "all", + "load", + "cpu", + "memory", + "io", + "network" + ], + "type": "string", + "default": "all", + "description": "Data Type", + "name": "type", + "in": "query", + "required": true + }, + { + "type": "number", + "default": 1738771200000, + "description": "StartTime, timestamp milliseconds", + "name": "startTime", + "in": "query", + "required": true + }, + { + "type": "number", + "default": 1738810051253, + "description": "EndTime, timestamp milliseconds", + "name": "endTime", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "#", + "description": "NE Type, Currently none Default #", + "name": "neType", + "in": "query" + }, + { + "type": "string", + "default": "#", + "description": "NE ID, Currently none Default #", + "name": "neId", + "in": "query" + }, + { + "type": "string", + "description": "Name, Data Type valid for networ and io", + "name": "name", + "in": "query" + } + ], "responses": { "200": { "description": "Response Results", @@ -642,6 +696,70 @@ "network_element/action" ], "summary": "List of files on the network element side", + "parameters": [ + { + "enum": [ + "IMS", + "AMF", + "AUSF", + "UDM", + "SMF", + "PCF", + "NSSF", + "NRF", + "UPF", + "MME", + "CBC", + "OMC", + "SGWC" + ], + "type": "string", + "default": "UPF", + "description": "NE Type", + "name": "neType", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "001", + "description": "NE ID", + "name": "neId", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "/var/log", + "description": "file path", + "name": "path", + "in": "query", + "required": true + }, + { + "type": "number", + "default": 1, + "description": "pageNum", + "name": "pageNum", + "in": "query", + "required": true + }, + { + "type": "number", + "default": 10, + "description": "pageSize", + "name": "pageSize", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "upf", + "description": "search prefix", + "name": "search", + "in": "query" + } + ], "responses": { "200": { "description": "Response Results", @@ -670,6 +788,54 @@ "network_element/action" ], "summary": "Get directories compressed to ZIP from the network element to the local area", + "parameters": [ + { + "enum": [ + "IMS", + "AMF", + "AUSF", + "UDM", + "SMF", + "PCF", + "NSSF", + "NRF", + "UPF", + "MME", + "CBC", + "OMC", + "SGWC" + ], + "type": "string", + "default": "UPF", + "description": "NE Type", + "name": "neType", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "001", + "description": "NE ID", + "name": "neId", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "/var/log", + "description": "dir path", + "name": "path", + "in": "query", + "required": true + }, + { + "type": "boolean", + "default": false, + "description": "Delete Temp File", + "name": "delTemp", + "in": "query" + } + ], "responses": { "200": { "description": "Response Results", @@ -698,6 +864,61 @@ "network_element/action" ], "summary": "Getting files from the network element to the local", + "parameters": [ + { + "enum": [ + "IMS", + "AMF", + "AUSF", + "UDM", + "SMF", + "PCF", + "NSSF", + "NRF", + "UPF", + "MME", + "CBC", + "OMC", + "SGWC" + ], + "type": "string", + "default": "UPF", + "description": "NE Type", + "name": "neType", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "001", + "description": "NE ID", + "name": "neId", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "/var/log", + "description": "dir path", + "name": "path", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "file name", + "name": "fileName", + "in": "query", + "required": true + }, + { + "type": "boolean", + "default": false, + "description": "Delete Temp File", + "name": "delTemp", + "in": "query" + } + ], "responses": { "200": { "description": "Response Results", @@ -726,6 +947,17 @@ "network_element/action" ], "summary": "Sending files from local to network elements", + "parameters": [ + { + "description": "Request Param", + "name": "data", + "in": "body", + "required": true, + "schema": { + "type": "object" + } + } + ], "responses": { "200": { "description": "Response Results", @@ -754,6 +986,17 @@ "network_element/action" ], "summary": "Network element service operation", + "parameters": [ + { + "description": "Request Param", + "name": "data", + "in": "body", + "required": true, + "schema": { + "type": "object" + } + } + ], "responses": { "200": { "description": "Response Results", @@ -782,6 +1025,54 @@ "network_element/action" ], "summary": "Viewing the contents of a file on the network element side", + "parameters": [ + { + "enum": [ + "IMS", + "AMF", + "AUSF", + "UDM", + "SMF", + "PCF", + "NSSF", + "NRF", + "UPF", + "MME", + "CBC", + "OMC", + "SGWC" + ], + "type": "string", + "default": "UPF", + "description": "NE Type", + "name": "neType", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "001", + "description": "NE ID", + "name": "neId", + "in": "query", + "required": true + }, + { + "type": "string", + "default": "/var/log", + "description": "file path", + "name": "path", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "file name", + "name": "fileName", + "in": "query", + "required": true + } + ], "responses": { "200": { "description": "Response Results", @@ -2525,6 +2816,7 @@ "SGWC" ], "type": "string", + "default": "AMF", "description": "NE Type", "name": "neType", "in": "query", @@ -2540,7 +2832,7 @@ }, { "type": "number", - "default": 1737453599059, + "default": 1729162507596, "description": "Start time (timestamped milliseconds)", "name": "startTime", "in": "query", @@ -2548,7 +2840,7 @@ }, { "type": "number", - "default": 1737453599059, + "default": 1729164187611, "description": "End time (timestamped milliseconds)", "name": "endTime", "in": "query", @@ -2568,6 +2860,7 @@ 3600 ], "type": "number", + "default": 60, "description": "interval", "name": "interval", "in": "query", @@ -2620,6 +2913,7 @@ "SGWC" ], "type": "string", + "default": "AMF", "description": "NE Type", "name": "neType", "in": "query", @@ -3720,7 +4014,7 @@ }, { "type": "number", - "description": "Number includes starting imsi", + "description": "Number of releases, value includes start imsi", "name": "num", "in": "path", "required": true @@ -3808,7 +4102,7 @@ }, { "type": "number", - "description": "Number includes starting imsi", + "description": "Number of releases, value includes start imsi", "name": "value", "in": "path", "required": true @@ -4186,7 +4480,7 @@ }, { "type": "number", - "description": "Number includes starting imsi", + "description": "Number of releases, value includes start imsi", "name": "num", "in": "path", "required": true @@ -4275,7 +4569,7 @@ { "type": "number", "default": 1, - "description": "Number includes starting imsi", + "description": "Number of releases, value includes start imsi", "name": "value", "in": "path", "required": true diff --git a/swagger2docs/swagger.yaml b/swagger2docs/swagger.yaml index 6a364dfb..0ffe19f5 100644 --- a/swagger2docs/swagger.yaml +++ b/swagger2docs/swagger.yaml @@ -341,6 +341,46 @@ paths: consumes: - application/json description: Resource monitoring information loading + parameters: + - default: all + description: Data Type + enum: + - all + - load + - cpu + - memory + - io + - network + in: query + name: type + required: true + type: string + - default: 1738771200000 + description: StartTime, timestamp milliseconds + in: query + name: startTime + required: true + type: number + - default: 1738810051253 + description: EndTime, timestamp milliseconds + in: query + name: endTime + required: true + type: number + - default: '#' + description: 'NE Type, Currently none Default #' + in: query + name: neType + type: string + - default: '#' + description: 'NE ID, Currently none Default #' + in: query + name: neId + type: string + - description: Name, Data Type valid for networ and io + in: query + name: name + type: string produces: - application/json responses: @@ -392,6 +432,56 @@ paths: consumes: - application/json description: List of files on the network element side + parameters: + - default: UPF + description: NE Type + enum: + - IMS + - AMF + - AUSF + - UDM + - SMF + - PCF + - NSSF + - NRF + - UPF + - MME + - CBC + - OMC + - SGWC + in: query + name: neType + required: true + type: string + - default: "001" + description: NE ID + in: query + name: neId + required: true + type: string + - default: /var/log + description: file path + in: query + name: path + required: true + type: string + - default: 1 + description: pageNum + in: query + name: pageNum + required: true + type: number + - default: 10 + description: pageSize + in: query + name: pageSize + required: true + type: number + - default: upf + description: search prefix + in: query + name: search + type: string produces: - application/json responses: @@ -410,6 +500,44 @@ paths: - application/json description: Get directories compressed to ZIP from the network element to the local area + parameters: + - default: UPF + description: NE Type + enum: + - IMS + - AMF + - AUSF + - UDM + - SMF + - PCF + - NSSF + - NRF + - UPF + - MME + - CBC + - OMC + - SGWC + in: query + name: neType + required: true + type: string + - default: "001" + description: NE ID + in: query + name: neId + required: true + type: string + - default: /var/log + description: dir path + in: query + name: path + required: true + type: string + - default: false + description: Delete Temp File + in: query + name: delTemp + type: boolean produces: - application/json responses: @@ -428,6 +556,49 @@ paths: consumes: - application/json description: Getting files from the network element to the local + parameters: + - default: UPF + description: NE Type + enum: + - IMS + - AMF + - AUSF + - UDM + - SMF + - PCF + - NSSF + - NRF + - UPF + - MME + - CBC + - OMC + - SGWC + in: query + name: neType + required: true + type: string + - default: "001" + description: NE ID + in: query + name: neId + required: true + type: string + - default: /var/log + description: dir path + in: query + name: path + required: true + type: string + - description: file name + in: query + name: fileName + required: true + type: string + - default: false + description: Delete Temp File + in: query + name: delTemp + type: boolean produces: - application/json responses: @@ -445,6 +616,13 @@ paths: consumes: - application/json description: Sending files from local to network elements + parameters: + - description: Request Param + in: body + name: data + required: true + schema: + type: object produces: - application/json responses: @@ -462,6 +640,13 @@ paths: consumes: - application/json description: Network element service operation + parameters: + - description: Request Param + in: body + name: data + required: true + schema: + type: object produces: - application/json responses: @@ -479,6 +664,44 @@ paths: consumes: - application/json description: Viewing the contents of a file on the network element side + parameters: + - default: UPF + description: NE Type + enum: + - IMS + - AMF + - AUSF + - UDM + - SMF + - PCF + - NSSF + - NRF + - UPF + - MME + - CBC + - OMC + - SGWC + in: query + name: neType + required: true + type: string + - default: "001" + description: NE ID + in: query + name: neId + required: true + type: string + - default: /var/log + description: file path + in: query + name: path + required: true + type: string + - description: file name + in: query + name: fileName + required: true + type: string produces: - application/json responses: @@ -1626,7 +1849,8 @@ paths: - application/json description: Access to statistical data parameters: - - description: NE Type + - default: AMF + description: NE Type enum: - IMS - AMF @@ -1651,19 +1875,20 @@ paths: name: neId required: true type: string - - default: 1737453599059 + - default: 1729162507596 description: Start time (timestamped milliseconds) in: query name: startTime required: true type: number - - default: 1737453599059 + - default: 1729164187611 description: End time (timestamped milliseconds) in: query name: endTime required: true type: number - - description: interval + - default: 60 + description: interval enum: - 5 - 10 @@ -1697,7 +1922,8 @@ paths: - application/json description: Get Statistical Headings parameters: - - description: NE Type + - default: AMF + description: NE Type enum: - IMS - AMF @@ -2306,7 +2532,7 @@ paths: name: imsi required: true type: string - - description: Number includes starting imsi + - description: Number of releases, value includes start imsi in: path name: num required: true @@ -2391,7 +2617,7 @@ paths: name: neId required: true type: string - - description: Number includes starting imsi + - description: Number of releases, value includes start imsi in: path name: value required: true @@ -2602,7 +2828,7 @@ paths: name: imsi required: true type: string - - description: Number includes starting imsi + - description: Number of releases, value includes start imsi in: path name: num required: true @@ -2688,7 +2914,7 @@ paths: required: true type: string - default: 1 - description: Number includes starting imsi + description: Number of releases, value includes start imsi in: path name: value required: true