opensubscriber
   Find in this group all groups
 
Unknown more information…

w : wpkg-users@lists.wpkg.org 23 October 2011 • 8:17AM -0400

Re: [wpkg-users] New condition not working as expected
by Rainer Meier

REPLY TO AUTHOR
 
REPLY TO GROUP




Hi Stefan,

On 23.10.2011 01:58, Stefan Pendl wrote:
> <condition>
>      <check type="logical" condition="not">
>          <check type="host" condition="hostname" value="SATELLITE"/>
>      </check>
>      <check type="logical" condition="not">
>          <check type="host" condition="os" value="5\.0\.\d{4}"/>
>      </check>
> </condition>
>
> Now I think that the following simpler construct should give the same result, but it does not.
>
> <condition>
>      <check type="logical" condition="not">
>          <check type="host" condition="hostname" value="SATELLITE"/>
>          <check type="host" condition="os"       value="5\.0\.\d{4}"/>
>      </check>
> </condition>
>
> What do you think?

Looking at the code the logical "not" check allows only one single check
sub-node. However the XSD allows to specify as many check sub-nodes as you want.

Well; I think I am going to extend the code to assume an implicit "and" when
multiple sub-nodes are specified. So if any of the checks fail the result of the
checks will be "false" and due to the "not" condition it will return "true".

Currently you should actually see an error in the log:

Check condition 'not' requires one and only one child check condition. Instead x
childs have been found.


br,
Rainer
-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
_______________________________________________
wpkg-users mailing list
wpkg-users@list...
http://lists.wpkg.org/mailman/listinfo/wpkg-users

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.