[glue-wg] GlueChunkKey

Burke, S (Stephen) S.Burke at rl.ac.uk
Wed Jan 30 13:54:18 CST 2008


glue-wg-bounces at ogf.org 
> [mailto:glue-wg-bounces at ogf.org] On Behalf Of Paul Millar said:
> for site_dn in $(ldapsearch -LLL -h lcg-bdii.cern.ch -p 2170 
> -x -b o=grid 
> glueSEAccessProtocolType=gsidcap |
> 
> 			perl -p00e 's/\r?\n //g' |
> 
> 			sed -ne 's/^dn: [^,]*,[^,]*,\(.*\)/\1/p' |
> 
> 			sort -u); do
> 
> 	ldapsearch -LLL -h lcg-bdii.cern.ch -p 2170 -x -b 
> $site_dn '(objectClass=GlueSite)' GlueSiteUniqueID |
> 
> 	perl -p00e 's/\r?\n //g' |
> 
> 	sed -ne 's/^GlueSiteUniqueID: \(.*\)/\1/p';
> done

I think you made my point! There's no way I could remember that, and I
don't want to try to reinvent it every time I want to query for
something - constructing ldap queries is hard enough already ... as a
subsidiary point your query is not the same as mine, although it may
happen to give the same result in this case. I assume that your method
could be modified to do the same though, i.e. to only chop the DN back
to the SE and query that for the ForeignKey (which will have to stay in
the schema anyway).

Stephen


More information about the glue-wg mailing list