Re: [classad-users] Constraint Question


Date: Wed, 18 Jan 2006 11:54:41 -0600
From: Alain Roy <roy@xxxxxxxxxxx>
Subject: Re: [classad-users] Constraint Question
At 10:30 AM 1/18/2006 -0600, Matthew Farrellee wrote:
ad1 = [A=1]
ad2 = [A=2; B=3]
ad3 = [A=4; C=5]

It's possible to create a constraint that matches ad1 but not ad2: A=!
=UNDEF && B==UNDEF, right?

You're mixing syntax for old and new ClassAds, but yes. In new ClassAds, you can write:

Requirements = A isnt defined && B is undefined;

In old classAds, you'll use =!= and =?= (not ==).

What about a constraint matching ads that have only an A attribute.
Can I do that without knowing about all possible attributes that
might be in an ad?

There is no way to do that in the language--you'd have to have a code solution for that. It *might* be possible to write a user-defined function in the C++ implementation to do that, but I'm not sure off the top of my head.

-alain


[← Prev in Thread] Current Thread [Next in Thread→]