things work again
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
fb9f42285d
commit
4fbd3ed518
1
argv.go
1
argv.go
|
@ -31,6 +31,7 @@ type ImportXml struct {
|
||||||
DomainName string `arg:"--domain" help:"the virsh domain name"`
|
DomainName string `arg:"--domain" help:"the virsh domain name"`
|
||||||
Host string `arg:"--host" help:"the hypervisor hostname (optional)"`
|
Host string `arg:"--host" help:"the hypervisor hostname (optional)"`
|
||||||
Delete bool `arg:"--delete" default:"false" help:"delete the old xml after import"`
|
Delete bool `arg:"--delete" default:"false" help:"delete the old xml after import"`
|
||||||
|
Force bool `arg:"--force" default:"false" help:"attempts to merge xml with existing protobuf"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type args struct {
|
type args struct {
|
||||||
|
|
3
main.go
3
main.go
|
@ -78,6 +78,9 @@ func main() {
|
||||||
log.Info("\n\nshould import here", argv.Start, "\n")
|
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)
|
||||||
url := "/import?domainName=" + argv.Import.DomainName
|
url := "/import?domainName=" + argv.Import.DomainName
|
||||||
|
if argv.Import.Force {
|
||||||
|
url += "&force=true"
|
||||||
|
}
|
||||||
dumpStdout(url)
|
dumpStdout(url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue