parent
a1feb086a6
commit
fb9f42285d
5
argv.go
5
argv.go
|
@ -28,8 +28,9 @@ type ImportXml struct {
|
||||||
IgnoreCpu bool `arg:"--xml-ignore-cpu" default:"true" help:"ignore non-standard libvirt xml cpus"`
|
IgnoreCpu bool `arg:"--xml-ignore-cpu" default:"true" help:"ignore non-standard libvirt xml cpus"`
|
||||||
IgnoreBr bool `arg:"--xml-ignore-net" default:"true" help:"ignore network bridge name changes"`
|
IgnoreBr bool `arg:"--xml-ignore-net" default:"true" help:"ignore network bridge name changes"`
|
||||||
IgnDisk bool `arg:"--xml-ignore-disk" default:"false" help:"ignore duplicate disk names"`
|
IgnDisk bool `arg:"--xml-ignore-disk" default:"false" help:"ignore duplicate disk names"`
|
||||||
DomainName string `arg:"--name" help:"virsh domain name"`
|
DomainName string `arg:"--domain" help:"the virsh domain name"`
|
||||||
Host string `arg:"--host" help:"hypervisor hostname"`
|
Host string `arg:"--host" help:"the hypervisor hostname (optional)"`
|
||||||
|
Delete bool `arg:"--delete" default:"false" help:"delete the old xml after import"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type args struct {
|
type args struct {
|
||||||
|
|
15
main.go
15
main.go
|
@ -66,10 +66,19 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if argv.Import != nil {
|
if argv.Import != nil {
|
||||||
log.Info("should import here", argv.Start)
|
if argv.Import.DomainName == "" {
|
||||||
log.Info("virtigoctl import --host farm04 --name grafana")
|
pp.WriteHelp(os.Stdout)
|
||||||
|
log.DaemonMode(true)
|
||||||
|
log.Info("Example:")
|
||||||
|
log.Info("")
|
||||||
|
log.Info(" virtigoctl import --domain grafana # will look for an existing libvirt domain")
|
||||||
|
log.Info("")
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
|
log.Info("\n\nshould import here", argv.Start, "\n")
|
||||||
log.Info("import", argv.Import.Host, argv.Import.DomainName)
|
log.Info("import", argv.Import.Host, argv.Import.DomainName)
|
||||||
os.Exit(0)
|
url := "/import?domainName=" + argv.Import.DomainName
|
||||||
|
dumpStdout(url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue