From 62bb5dbb9f639638d3809abade10e85888a4cb48 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 1 Nov 2024 06:21:14 -0500 Subject: [PATCH] closer Signed-off-by: Jeff Carr --- start.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/start.go b/start.go index 19f83ce..e10f25c 100644 --- a/start.go +++ b/start.go @@ -19,22 +19,22 @@ func newStart(start string, d *pb.Droplet) error { log.Info("start droplet here:", d.Hostname) domcfg := &libvirtxml.Domain{} - mergeXML(domcfg, "standard.x86") + mergeXMLresource(domcfg, "standard.x86") // ignore spice if it's not set if d.SpicePort == 0 { log.Info("spice port was not set. spice disabled") } else { - mergeXML(domcfg, "spice") + mergeXMLresource(domcfg, "spice") if err := virtigolib.SetSpicePort(d, domcfg); err != nil { return err } } - mergeXML(domcfg, "qcow") + mergeXMLresource(domcfg, "qcow") return virtigolib.GenerateDropletXml(me.dirs, d, domcfg, start) } -func mergeXML(domcfg *libvirtxml.Domain, filename string) error { +func mergeXMLresource(domcfg *libvirtxml.Domain, filename string) error { fullname := "resources/xml/" + filename + ".xml" pfile, err := resources.ReadFile(fullname) if err != nil { @@ -42,5 +42,5 @@ func mergeXML(domcfg *libvirtxml.Domain, filename string) error { return err } - return virtigolib.AddDefaultXml(domcfg, string(pfile)) + return virtigolib.MergeXml(domcfg, string(pfile)) }