From 70634ec66e657623588093b996fcf18194f58652 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 1 Nov 2024 06:12:12 -0500 Subject: [PATCH] import closer to working Signed-off-by: Jeff Carr --- importDomain.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/importDomain.go b/importDomain.go index 1091b4e..0f8432b 100644 --- a/importDomain.go +++ b/importDomain.go @@ -73,7 +73,6 @@ func importDomain(w http.ResponseWriter, r *http.Request) (string, error) { result := fmt.Sprintln("marshal worked", domcfg.Name, domcfg.UUID) log.Log(WARN, result) fmt.Fprintln(w, result) - return result, nil } @@ -109,11 +108,11 @@ func (h *HyperT) importDomain(d *pb.Droplet) (bool, string) { return true, result } -func postImportDomain(hostname string, name string) ([]byte, error) { - url := "http://" + hostname + ":2520/import?domain=" + hostname +func postImportDomain(hypervisor string, domain string) ([]byte, error) { + url := "http://" + hypervisor + ":2520/import?domain=" + domain var msg string var data []byte - msg = "import " + name + msg = "import " + domain data = []byte(msg) // Convert the string to []byte req, err := httpPost(url, data) if err != nil {