fix: 网元信息新增更新同步操作版本和授权信息

This commit is contained in:
TsMask
2024-04-11 17:13:54 +08:00
parent ca0f047f22
commit bc599ec5b0
5 changed files with 209 additions and 90 deletions

View File

@@ -1,6 +1,9 @@
package service
import "be.ems/src/modules/network_element/model"
import (
"be.ems/src/framework/utils/ssh"
"be.ems/src/modules/network_element/model"
)
// 网元信息 服务层接口
type INeInfo interface {
@@ -46,9 +49,12 @@ type INeInfo interface {
// NeRunCMD 向网元发送cmd命令
NeRunCMD(neType, neId, cmd string) (string, error)
// NeRunSSHclient 网元主机的SSH客户端-为创建相关连接
NeRunSSHclient(neType, neId string) (*ssh.ConnSSH, error)
// NeConfigFileRead 网元配置文件读取 网元配置yaml文件复制到本地后通过filePath读取
NeConfigFileRead(neInfo model.NeInfo, filePath string) []string
NeConfigFileRead(neInfo model.NeInfo, filePath, fileType string) any
// NeConfigFileWirte 网元配置文件写入 content内容 sync同步到网元端
NeConfigFileWirte(neInfo model.NeInfo, filePath, content string, sync bool) error
NeConfigFileWirte(neInfo model.NeInfo, filePath, fileType string, content any, sync bool) error
}