argh. still not working
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
70634ec66e
commit
7fa6c2e2de
|
@ -7,6 +7,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
pb "go.wit.com/lib/protobuf/virtbuf"
|
pb "go.wit.com/lib/protobuf/virtbuf"
|
||||||
|
"go.wit.com/lib/virtigolib"
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
"libvirt.org/go/libvirtxml"
|
"libvirt.org/go/libvirtxml"
|
||||||
)
|
)
|
||||||
|
@ -69,6 +70,19 @@ func importDomain(w http.ResponseWriter, r *http.Request) (string, error) {
|
||||||
fmt.Fprintln(w, string(xml))
|
fmt.Fprintln(w, string(xml))
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
// func ImportXML(domcfg *libvirtxml.Domain) (*pb.Droplet, []*pb.Event, error) {
|
||||||
|
d, alle, err := virtigolib.ImportXML(domcfg)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintln(w, "ImportXML failed with", name, err)
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
if d == nil {
|
||||||
|
fmt.Fprintln(w, "ImportXML d == nil for", name, err)
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
for _, e := range alle {
|
||||||
|
me.cluster.AddEvent(e)
|
||||||
|
}
|
||||||
|
|
||||||
result := fmt.Sprintln("marshal worked", domcfg.Name, domcfg.UUID)
|
result := fmt.Sprintln("marshal worked", domcfg.Name, domcfg.UUID)
|
||||||
log.Log(WARN, result)
|
log.Log(WARN, result)
|
||||||
|
|
Loading…
Reference in New Issue