diff --git a/cmd/xc/main.go b/cmd/xc/main.go index e6bb7c7..f164dca 100644 --- a/cmd/xc/main.go +++ b/cmd/xc/main.go @@ -9,6 +9,7 @@ import ( "github.com/viert/xc/backend/conductor" "github.com/viert/xc/backend/inventoree" "github.com/viert/xc/backend/localini" + "github.com/viert/xc/backend/yanductor" _ "net/http/pprof" @@ -64,6 +65,19 @@ func main() { return } + tool, err = cli.New(xccfg, be) + if err != nil { + term.Errorf("%s\n", err) + return + } + + case config.BTYanductor: + be, err := yanductor.New(xccfg) + if err != nil { + term.Errorf("Error creating conductor backend: %s\n", err) + return + } + tool, err = cli.New(xccfg, be) if err != nil { term.Errorf("%s\n", err) diff --git a/config/config.go b/config/config.go index 7c7f8a8..503b4ef 100644 --- a/config/config.go +++ b/config/config.go @@ -12,13 +12,13 @@ import ( ) const defaultConfigContents = `[main] -user = +user = mode = parallel history_file = ~/.xc_history cache_dir = ~/.xc_cache cache_ttl = 336 # 24 * 7 * 2 rc_file = ~/.xcrc -log_file = +log_file = raise = none exit_confirm = true exec_confirm = true @@ -51,7 +51,7 @@ ServerAliveInterval = 5 [backend] type = conductor url = http://c.inventoree.ru -work_groups = +work_groups = [passmgr] path = @@ -64,6 +64,7 @@ type BackendType int const ( BTIni BackendType = iota BTConductor + BTYanductor BTInventoree ) @@ -358,6 +359,8 @@ func read(filename string, secondPass bool) (*XCConfig, error) { cfg.BackendCfg.Type = BTIni case "conductor": cfg.BackendCfg.Type = BTConductor + case "yanductor": + cfg.BackendCfg.Type = BTYanductor case "inventoree": cfg.BackendCfg.Type = BTInventoree default: