ref: 网元信息RunSSH客户端实例复用连接

This commit is contained in:
TsMask
2024-04-11 19:43:50 +08:00
parent 63595e1981
commit 390eaae94d
2 changed files with 59 additions and 37 deletions

View File

@@ -46,13 +46,15 @@ type INeInfo interface {
// CheckUniqueNeTypeAndNeId 校验同类型下标识是否唯一
CheckUniqueNeTypeAndNeId(neType, neId, infoId string) bool
// NeRunCMD 向网元发送cmd命令
NeRunCMD(neType, neId, cmd string) (string, error)
// NeRunSSHclient 网元主机的SSH客户端-为创建相关连接
NeRunSSHclient(neType, neId string) (*ssh.ConnSSH, error)
// NeRunCMD 向网元发送cmd命令
NeRunCMD(neType, neId, cmd string) (string, error)
// NeConfigFileRead 网元配置文件读取 网元配置yaml文件复制到本地后通过filePath读取
//
// 返回 string string[] map[string]any
NeConfigFileRead(neInfo model.NeInfo, filePath, fileType string) any
// NeConfigFileWirte 网元配置文件写入 content内容 sync同步到网元端