feat: 新增oam配置文件读写接口

This commit is contained in:
TsMask
2024-04-25 17:19:05 +08:00
parent 4629ef28ff
commit 68fbc45b7c
2 changed files with 336 additions and 8 deletions

View File

@@ -99,7 +99,7 @@ export function stateNeInfo(neType: string, neId: string) {
* @param neId 网元ID
* @returns object
*/
export function getTypeAndIDNeInfo(neType: string, neId: string) {
export function getNeInfoByTypeAndIDNe(neType: string, neId: string) {
return request({
url: '/ne/info/byTypeAndID',
method: 'get',
@@ -142,23 +142,48 @@ export function saveConfigFile(data: Record<string, any>) {
}
/**
* 网元端公共配置文件读取
* @param fileType oam_manager.yaml '' txt json yaml yml 根据指定文件类型进行解析序列出map->json
* 网元端OAM配置文件读取
* @param neType 网元类型
* @param neId 网元ID
* @returns object
*/
export function getPara5GFilee(fileType: string) {
export function getOAMFile(neType: string, neId: string) {
return request({
url: '/ne/info/oamFile',
method: 'get',
params: { neType, neId },
});
}
/**
* 网元端配置文件写入
* @param neType 网元类型
* @param neId 网元ID
* @param content txt内容为字符串 其他文件格式都用json对象
* @param sync 同步到网元
* @returns object
*/
export function saveOAMFile(data: Record<string, any>) {
return request({
url: `/ne/info/oamFile`,
method: 'put',
data: data,
});
}
/**
* 网元端公共配置文件读取
* @returns object
*/
export function getPara5GFilee() {
return request({
url: '/ne/info/para5GFile',
method: 'get',
params: {
fileType,
},
});
}
/**
* 网元端公共配置文件写入
* @param fileType yaml 解析内容数据到对应文件类型
* @param content txt内容为字符串 其他文件格式都用json对象
* @param syncNe 同步到网元端 NeType@ NeId
* @returns object