fix: 将restagent改为omc
This commit is contained in:
@@ -370,7 +370,7 @@ func ReadTestConfigYaml(pfile string) (ret error) {
|
||||
}
|
||||
|
||||
func GetDefaultUserAgent() string {
|
||||
return "OMC-restagent/" + global.Version
|
||||
return "OMC/" + global.Version
|
||||
}
|
||||
|
||||
func GetOMCHostUrl() string {
|
||||
@@ -389,34 +389,3 @@ func GetOMCHostUrl() string {
|
||||
|
||||
return fmt.Sprintf("%s://%s:%d", scheme, omcip, port)
|
||||
}
|
||||
|
||||
// const defaultConfigFile = "./etc/restconf.yaml"
|
||||
|
||||
// func init() {
|
||||
// cfile := flag.String("c", defaultConfigFile, "config file")
|
||||
// pv := flag.Bool("version", false, "print version")
|
||||
// ph := flag.Bool("help", false, "print help")
|
||||
|
||||
// //global.BuildTime = "Wed May 31 18:24:04 CST 2023"
|
||||
// //global.GoVer = "go version go1.15.7 linux/arm64"
|
||||
// flag.Parse()
|
||||
// if *pv {
|
||||
// fmt.Printf("OMC restagent version: %s\n%s\n%s\n\n", global.Version, global.BuildTime, global.GoVer)
|
||||
// os.Exit(0)
|
||||
// }
|
||||
// if *ph {
|
||||
// flag.Usage()
|
||||
// os.Exit(0)
|
||||
// }
|
||||
|
||||
// // 使用viper读取配置
|
||||
// conf.InitConfig(*cfile)
|
||||
|
||||
// ReadConfig(*cfile)
|
||||
// if GetYamlConfig().OMC.UriPrefix != "" {
|
||||
// UriPrefix = GetYamlConfig().OMC.UriPrefix
|
||||
// }
|
||||
// if GetYamlConfig().TestConfig.Enabled {
|
||||
// ReadTestConfigYaml(GetYamlConfig().TestConfig.File)
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -155,9 +155,9 @@ func main() {
|
||||
}
|
||||
|
||||
log.InitLogger(conf.Logger.File, conf.Logger.Duration, conf.Logger.Count, "omc:", config.GetLogLevel())
|
||||
fmt.Printf("OMC restagent version: %s\n", global.Version)
|
||||
fmt.Printf("OMC version: %s\n", global.Version)
|
||||
log.Infof("========================= OMC startup =========================")
|
||||
log.Infof("OMC restagent version: %s %s %s", global.Version, global.BuildTime, global.GoVer)
|
||||
log.Infof("OMC version: %s %s %s", global.Version, global.BuildTime, global.GoVer)
|
||||
|
||||
err := dborm.InitDbClient(conf.Database.Type, conf.Database.User, conf.Database.Password,
|
||||
conf.Database.Host, conf.Database.Port, conf.Database.Name, conf.Database.ConnParam)
|
||||
|
||||
Reference in New Issue
Block a user