I have pushed a v3 with all the fixes for v2, clearly v2 was kind of
half baked, sorry about that.
On Mon, Jul 7, 2025 at 5:02 PM Peter Krempa <pkrempa(a)redhat.com> wrote:
On Mon, Jul 07, 2025 at 15:51:51 +0200, Peter Krempa via Devel wrote:
> On Mon, Jul 07, 2025 at 14:52:09 +0200, Enrique Llorente via Devel wrote:
One additional thing ...
> > @@ -24926,6 +24992,7 @@ virDomainNetBackendFormat(virBuffer *buf,
> > virDomainNetBackend *backend)
> > {
> > g_auto(virBuffer) attrBuf = VIR_BUFFER_INITIALIZER;
> > + g_auto(virBuffer) childBuf = VIR_BUFFER_INITIALIZER;
.. for child element buffers (where autoindentation is to be used such
as with [1]) you need to use VIR_BUFFER_INIT_CHILD, which propagates the
current autoindent level.
Otherwise autoindent will start at the topmost level.
> >
> > if (backend->type) {
> > virBufferAsprintf(&attrBuf, " type='%s'",
> > @@ -24934,7 +25001,22 @@ virDomainNetBackendFormat(virBuffer *buf,
> > virBufferEscapeString(&attrBuf, " tap='%s'",
backend->tap);
> > virBufferEscapeString(&attrBuf, " vhost='%s'",
backend->vhost);
> > virBufferEscapeString(&attrBuf, " logFile='%s'",
backend->logFile);
> > - virXMLFormatElement(buf, "backend", &attrBuf, NULL);
> > +
> > + /* Format passt commandline with namespace */
> > + if (backend->passtCommandline &&
backend->passtCommandline->args) {
> > + virBufferAddLit(&childBuf, "<passt:commandline
xmlns:passt='http://libvirt.org/schemas/domain/passt/1.0'>\n&q...);
> > + virBufferAdjustIndent(&childBuf, 2);
[1]
--
Quique Llorente
CNV networking Senior Software Engineer
Red Hat EMEA
ellorent(a)redhat.com
@RedHat Red Hat Red Hat