[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 07/10] network: Fix reading 'forwardDelay' attribute.



On 10/13/2009 10:54 AM, Daniel Veillard wrote:
> On Tue, Oct 13, 2009 at 02:27:09PM +0100, Daniel P. Berrange wrote:
>> On Mon, Oct 12, 2009 at 10:46:51AM -0400, Cole Robinson wrote:
>>> When reading network XML, we were looking for a 'delay' attribute, but this
>>> value was being dumped as 'forwardDelay'. Support reading both names on
>>> input, but continue to only dump 'forwardDelay'
>>
>> Rather a no-win situation, but the schema still says 'delay', so I'd
>> be more inclined to just fix the XML printing code to s/forwardDelay/delay/
>> and leave the parsing as is.
> 
>   Agreed, it tends to prove people were either not using the option or
> not dumping the XML to reimport it. I would stick to the original
> syntax.
>   This should turn into a trivial fix, and I'm fine with pushing it now.
> 
> Daniel
> 

Okay, I've pushed this change:

diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 14eb543..40f5fdd 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -632,7 +632,7 @@ char *virNetworkDefFormat(virConnectPtr conn,
     virBufferAddLit(&buf, "  <bridge");
     if (def->bridge)
         virBufferEscapeString(&buf, " name='%s'", def->bridge);
-    virBufferVSprintf(&buf, " stp='%s' forwardDelay='%ld' />\n",
+    virBufferVSprintf(&buf, " stp='%s' delay='%ld' />\n",
                       def->stp ? "on" : "off",
                       def->delay);

Thanks,
Cole


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]