[libvirt] [patch 4/5] nwfilter: Extend schema to accept state attribute

Eric Blake eblake at redhat.com
Wed Oct 6 17:39:12 UTC 2010


On 10/06/2010 11:18 AM, Stefan Berger wrote:
>> Hum, we really want to accept something like
>>     NEW,NEW,NEW,NEW
>> ?
>> I understand that we may want to add RELATED to another state, but that
>> regexp could probably be refined, isn't it ?
>
>
> I think the proposed solution is not as 'strict' as it should be but
> compared to the other two
> solutions I think it is 'ok' -- unless there is a fundamentally different
> way of writing this
> type of regex.

I agree with Stefan's point of view: the .rng should be a syntax check 
and outlaw completely unrecognized words, but to be concise, it is 
necessarily loose and requires that we then perform additional semantic 
checks to reject strings like NEW,NEW.  And this is evident in my recent 
<vcpu cpuset=...> patch, where domain.rng accepts strings like 
cpuset='4-3' as syntactically valid (a range of integers) that are later 
rejected by semantic checks (the integer range is backwards).

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org




More information about the libvir-list mailing list