On Wed, 2015-09-16 at 15:00 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [PATCH OSSTEST v2 3/4] Add support for
> selecting resources based on their properties."):
> > On Wed, 2015-09-16 at 14:50 +0100, Ian Jackson wrote:
> > > As a matter of taste, I would have had propname_check throw ra
Ian Campbell writes ("Re: [PATCH OSSTEST v2 3/4] Add support for selecting
resources based on their properties."):
> On Wed, 2015-09-16 at 14:50 +0100, Ian Jackson wrote:
> > As a matter of taste, I would have had propname_check throw rather
> > than making it be a predicate.
>
> I did wonder abo
On Wed, 2015-09-16 at 14:50 +0100, Ian Jackson wrote:
> Ian Campbell writes ("[PATCH OSSTEST v2 3/4] Add support for selecting
> resources based on their properties."):
> > In particular for allocating hosts based on host properties.
>
> Acked-by: Ian Jackson
>
>
> > +die "propname: $prop?"
Ian Campbell writes ("[PATCH OSSTEST v2 3/4] Add support for selecting
resources based on their properties."):
> In particular for allocating hosts based on host properties.
Acked-by: Ian Jackson
> +die "propname: $prop?" unless propname_check($prop);
...
> +sub propname_check ($) {
> +
In particular for allocating hosts based on host properties.
To do this we extend the hostflags syntax with "condition:arg1:arg2".
This specifies that the candidate host must pass the condition given
the arguments.
Each "condition" is a new module in the Osstest::ResourceCondition
namespace. For