Ewen Cumming
2007-Jan-03 20:33 UTC
[Fedora-directory-users] Virtual Views entries only as leaves?
Hi all, We''ve recently been migrating our data from an OpenLDAP server to FDS. The data import went smoothly, very impressed. However, I am currently experimenting with using a virtual view to allow a flat directory structure to be displayed as a hierachical view. Through experimentation I''ve only found it possible to add virtual entries as leaves. Is it possible to have virtual entries in an organizational unit that contains another organizational unit with other virtual entries. I''m sure that makes no sense so I''ve attempted to draw the tree stucture I''m trying to achieve. ou=view contains the virtual view and ou=entries contains the actual entries. dc=root - ou=view - - ou=group - - - ou=subgroup - - - - o=org1 - - - - o=org2 - - - o=org3 - ou=entries - - o=org1 - - o=org2 - - o=org3 In the virtual view ou=group contains both ou=subgroup (with it''s own virtual entries org1&2) and a virtual entry (org3) of its own. At the moment I only seem able to get the deepest OU to display virtual entries (ou=subgroup in this example). Does anyone know if what I am trying is possible or are virtual entries only able to be added at the deepest container?
Pete Rowley
2007-Jan-05 18:48 UTC
Re: [Fedora-directory-users] Virtual Views entries only as leaves?
Ewen Cumming wrote:> > dc=root > - ou=view > - - ou=group > - - - ou=subgroup > - - - - o=org1 > - - - - o=org2 > - - - o=org3 > - ou=entries > - - o=org1 > - - o=org2 > - - o=org3 > > In the virtual view ou=group contains both ou=subgroup (with it''s own > virtual entries org1&2) and a virtual entry (org3) of its own. At the > moment I only seem able to get the deepest OU to display virtual > entries (ou=subgroup in this example). > > Does anyone know if what I am trying is possible or are virtual > entries only able to be added at the deepest container? >You should be able to do that. Are you sure that the o=org3 entry doesn''t match the filter in ou=subgroup? Also, do all three entries ou=view, ou=group, ou=subgroup have the objectclass nsview? -- Pete
Ewen Cumming
2007-Jan-08 04:06 UTC
Re: [Fedora-directory-users] Virtual Views entries only as leaves?
Hi Pete, Thanks for the reply, here is the LDIF of my test tree: dn: dc=test dc: test objectClass: top objectClass: dcobject dn: ou=view,dc=test objectClass: top objectClass: organizationalunit objectClass: nsview ou: view dn: ou=entries,dc=test ou: entries objectClass: top objectClass: organizationalunit dn: o=org1,ou=entries,dc=test o: org1 objectClass: top objectClass: organization dn: o=org2,ou=entries,dc=test o: org2 objectClass: top objectClass: organization dn: o=org3,ou=entries,dc=test o: org3 objectClass: top objectClass: organization dn: ou=group,ou=view,dc=test ou: group objectClass: top objectClass: organizationalunit objectClass: nsview dn: ou=subgroup,ou=group,ou=view,dc=test ou: subgroup objectClass: top objectClass: organizationalunit objectClass: nsview nsViewFilter: (|(o=org1)(o=org2)) That works OK, however when I add an ''nsViewFilter: (o=org3)'' attribute to ou=group, org3 displays correctly as a virtual entry under ou=group but ou=subgroup stops displaying org1 and org2 as virtual entries. Any ideas? Thanks, Ewen On 1/6/07, Pete Rowley <prowley@redhat.com> wrote:> Ewen Cumming wrote: > > > > dc=root > > - ou=view > > - - ou=group > > - - - ou=subgroup > > - - - - o=org1 > > - - - - o=org2 > > - - - o=org3 > > - ou=entries > > - - o=org1 > > - - o=org2 > > - - o=org3 > > > > In the virtual view ou=group contains both ou=subgroup (with it''s own > > virtual entries org1&2) and a virtual entry (org3) of its own. At the > > moment I only seem able to get the deepest OU to display virtual > > entries (ou=subgroup in this example). > > > > Does anyone know if what I am trying is possible or are virtual > > entries only able to be added at the deepest container? > > > You should be able to do that. Are you sure that the o=org3 entry > doesn''t match the filter in ou=subgroup? Also, do all three entries > ou=view, ou=group, ou=subgroup have the objectclass nsview? > > -- > Pete > > > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users > > > >
Pete Rowley
2007-Jan-08 18:56 UTC
Re: [Fedora-directory-users] Virtual Views entries only as leaves?
Ewen Cumming wrote:> That works OK, however when I add an ''nsViewFilter: (o=org3)'' > attribute to ou=group, org3 displays correctly as a virtual entry > under ou=group but ou=subgroup stops displaying org1 and org2 as > virtual entries. > > Any ideas?Yes :) You have misunderstood how views work a little. Each view with a filter restricts the descendant entries that may exist in the hierarchy, so the higher view filters should be general like o=finance, then the next level might be (o=Purchasing) with a peer (o=Sales), a third level under the latter might contain (o=USA Sales) and (o=Canada Sales). Each time you add a sub-view with a view filter it will remove those entries that match from the parent and begin displaying them in the sub-view. To get what you are after you would need to add something like (o=*) or (|((o=org1)(o=org2)(o=org3))) to the ou=group entry. -- Pete
Ewen Cumming
2007-Jan-08 20:25 UTC
Re: [Fedora-directory-users] Virtual Views entries only as leaves?
Yes! It works :) Big thanks for the help Pete. Ewen On 1/9/07, Pete Rowley <prowley@redhat.com> wrote:> Ewen Cumming wrote: > > That works OK, however when I add an ''nsViewFilter: (o=org3)'' > > attribute to ou=group, org3 displays correctly as a virtual entry > > under ou=group but ou=subgroup stops displaying org1 and org2 as > > virtual entries. > > > > Any ideas? > Yes :) You have misunderstood how views work a little. Each view with a > filter restricts the descendant entries that may exist in the hierarchy, > so the higher view filters should be general like o=finance, then the > next level might be (o=Purchasing) with a peer (o=Sales), a third level > under the latter might contain (o=USA Sales) and (o=Canada Sales). Each > time you add a sub-view with a view filter it will remove those entries > that match from the parent and begin displaying them in the sub-view. To > get what you are after you would need to add something like (o=*) or > (|((o=org1)(o=org2)(o=org3))) to the ou=group entry. > > -- > Pete > > > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users > > > >