summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-31 14:16:07 -0500
committerJeff Carr <[email protected]>2024-10-31 14:16:07 -0500
commita1feb086a638ef8380e008f88835567fdc10f44c (patch)
tree3a4961b71810f341573d3e8940a18ab7e575dd28
parentec9d4649976e1a37a474db39bb5943e2f57f9b65 (diff)
runs againv0.0.2
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--argv.go10
-rw-r--r--main.go9
2 files changed, 15 insertions, 4 deletions
diff --git a/argv.go b/argv.go
index 8e86d88..917dffb 100644
--- a/argv.go
+++ b/argv.go
@@ -24,10 +24,12 @@ type CreateCmd struct {
}
type ImportXml struct {
- Xml []string `arg:"--libvirt" help:"import qemu xml files: --libvirt /etc/libvirt/qemu/*.xml"`
- 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"`
- IgnDisk bool `arg:"--xml-ignore-disk" default:"false" help:"ignore duplicate disk names"`
+ Xml []string `arg:"--libvirt" help:"import qemu xml files: --libvirt /etc/libvirt/qemu/*.xml"`
+ 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"`
+ IgnDisk bool `arg:"--xml-ignore-disk" default:"false" help:"ignore duplicate disk names"`
+ DomainName string `arg:"--name" help:"virsh domain name"`
+ Host string `arg:"--host" help:"hypervisor hostname"`
}
type args struct {
diff --git a/main.go b/main.go
index 366687e..0ae2a4d 100644
--- a/main.go
+++ b/main.go
@@ -48,6 +48,7 @@ func main() {
log.Info("dump something here")
os.Exit(0)
}
+
if argv.Create != nil {
dir := filepath.Dir(argv.Create.Filename)
filename := filepath.Base(argv.Create.Filename)
@@ -58,10 +59,18 @@ func main() {
log.Info("virtigoctl create end")
os.Exit(0)
}
+
if argv.Start != nil {
log.Info("start the vm's here:", argv.Start)
os.Exit(0)
}
+
+ if argv.Import != nil {
+ log.Info("should import here", argv.Start)
+ log.Info("virtigoctl import --host farm04 --name grafana")
+ log.Info("import", argv.Import.Host, argv.Import.DomainName)
+ os.Exit(0)
+ }
}
func dumpDroplets(full bool) error {