2015-10-22 17:39 GMT+02:00 Jan Willem Janssen <[email protected]> :
> > > On 22 Oct 2015, at 16:59, Daan Veldhof <[email protected]> wrote: > > > > I want to create a distribution2target where the leftEndpoint = > (name=rand) > > and the rightEndpoint = (target.tag1 = foo)&(target.tag2 = bar). From > what > > I understand the filtering works with an LDAP filter. So I tried to > create > > a distribution2target using the REST API. I send a POST to > > /client/work/{id}/distribution2target and in the body is this > > { > > attributes : { > > "leftEndpoint" : "(name=rand)", > > "rightEndpoint" : "(&(target.tag1=foo)(target.tag2=bar))" > > "leftCardinality" : 5, > > "rightCardinality" : 100 > > } > > tags: {} > > } > > You’re trying to create an association that should match up to 5 > distributions and up to 100 targets, which is valid, but a little bit > strange > given that you specify a distribution that is named exactly to “rand”. > > Anyway, you might want to take a look at your rightEndpoint filter, IIRC it > is not necessary to prefix it with `target.`... > Changed my attributes so it only filters on one tag and it works with the 'target' prefix. { attributes : { "leftEndpoint" : "(name=rand)", "rightEndpoint" : "(target.tag1=foo)" "leftCardinality" : 1, "rightCardinality" : 100 } tags: {} } For some reason the "&" doesn't seem to work. Am I missing something? BTW, when I create the distribution2target the targets aren't known by ACE, I add them afterwards. Regards Daan Veldhof
