fix: mme export etc failure(no yaml)
This commit is contained in:
@@ -449,6 +449,17 @@ func ExportCmFromNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
etcListIMS, config.GetYamlConfig().OMC.Backup, neTypeLower)
|
etcListIMS, config.GetYamlConfig().OMC.Backup, neTypeLower)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case "mme":
|
||||||
|
if ipType == global.IsIPv4 {
|
||||||
|
scpCmd = fmt.Sprintf("scp -r %s@%s:%s/%s/*.conf %s/etc/%s", config.GetYamlConfig().NE.User,
|
||||||
|
neInfo.Ip, config.GetYamlConfig().NE.EtcDir,
|
||||||
|
neTypeLower, config.GetYamlConfig().OMC.Backup, neTypeLower)
|
||||||
|
} else {
|
||||||
|
scpCmd = fmt.Sprintf("scp -r %s@[%s]:%s/%s/*.conf %s/etc/%s", config.GetYamlConfig().NE.User,
|
||||||
|
neInfo.Ip, config.GetYamlConfig().NE.EtcDir,
|
||||||
|
neTypeLower, config.GetYamlConfig().OMC.Backup, neTypeLower)
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if ipType == global.IsIPv4 {
|
if ipType == global.IsIPv4 {
|
||||||
scpCmd = fmt.Sprintf("scp -r %s@%s:%s/%s/*.yaml %s/etc/%s", config.GetYamlConfig().NE.User,
|
scpCmd = fmt.Sprintf("scp -r %s@%s:%s/%s/*.yaml %s/etc/%s", config.GetYamlConfig().NE.User,
|
||||||
|
|||||||
@@ -109,15 +109,16 @@ type YamlConfig struct {
|
|||||||
} `yaml:"mml"`
|
} `yaml:"mml"`
|
||||||
|
|
||||||
NE struct {
|
NE struct {
|
||||||
Addr string `yaml:"addr"`
|
Addr string `yaml:"addr"`
|
||||||
Port uint16 `yaml:"port"`
|
Port uint16 `yaml:"port"`
|
||||||
User string `yaml:"user"`
|
User string `yaml:"user"`
|
||||||
EtcDir string `yaml:"etcdir"`
|
EtcDir string `yaml:"etcdir"`
|
||||||
BinDir string `yaml:"bindir"`
|
BinDir string `yaml:"bindir"`
|
||||||
OmcDir string `yaml:"omcdir"`
|
OmcDir string `yaml:"omcdir"`
|
||||||
ScpDir string `yaml:"scpdir"`
|
ScpDir string `yaml:"scpdir"`
|
||||||
LicenseDir string `yaml:"licensedir"`
|
LicenseDir string `yaml:"licensedir"`
|
||||||
EtcListIMS string `yaml:"etcListIMS"`
|
EtcListIMS string `yaml:"etcListIMS"`
|
||||||
|
EtcListDefault string `yaml:"etcListDefault"`
|
||||||
} `yaml:"ne"`
|
} `yaml:"ne"`
|
||||||
|
|
||||||
Auth struct {
|
Auth struct {
|
||||||
|
|||||||
@@ -108,6 +108,17 @@ func (s *BarProcessor) Execute(data any) (any, error) {
|
|||||||
etcListIMS, config.GetYamlConfig().OMC.Backup, neTypeLower)
|
etcListIMS, config.GetYamlConfig().OMC.Backup, neTypeLower)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case "mme":
|
||||||
|
if ipType == global.IsIPv4 {
|
||||||
|
scpCmd = fmt.Sprintf("scp -r %s@%s:%s/%s/*.conf %s/etc/%s", config.GetYamlConfig().NE.User,
|
||||||
|
neInfo.Ip, config.GetYamlConfig().NE.EtcDir,
|
||||||
|
neTypeLower, config.GetYamlConfig().OMC.Backup, neTypeLower)
|
||||||
|
} else {
|
||||||
|
scpCmd = fmt.Sprintf("scp -r %s@[%s]:%s/%s/*.conf %s/etc/%s", config.GetYamlConfig().NE.User,
|
||||||
|
neInfo.Ip, config.GetYamlConfig().NE.EtcDir,
|
||||||
|
neTypeLower, config.GetYamlConfig().OMC.Backup, neTypeLower)
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if ipType == global.IsIPv4 {
|
if ipType == global.IsIPv4 {
|
||||||
scpCmd = fmt.Sprintf("scp -r %s@%s:%s/%s/*.yaml %s/etc/%s", config.GetYamlConfig().NE.User,
|
scpCmd = fmt.Sprintf("scp -r %s@%s:%s/%s/*.yaml %s/etc/%s", config.GetYamlConfig().NE.User,
|
||||||
|
|||||||
Reference in New Issue
Block a user