Skip to Content.
Sympa Menu

grouper-users - [grouper-users] xmlExport: how to export groups without any uuid reference?

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] xmlExport: how to export groups without any uuid reference?


Chronological Thread 
  • From: Dominique Petitpierre <>
  • To: "" <>
  • Subject: [grouper-users] xmlExport: how to export groups without any uuid reference?
  • Date: Mon, 11 Mar 2013 20:43:43 +0100
  • Authentication-results: sfpop-ironport02.merit.edu; dkim=neutral (message not signed) header.i=none
  • Organization: University of Geneva

Hello,

- Is it possible to export groups to an xml file without reference to
any uuid?

When setting the property export.uuids to false, while it does remove
the uuid from the definition of a group, the exported file still
contains uuid for referenced groups.

In a simple test where test:t:g1 is member of test:t:g2, after
exporting test:t to t.xml with a gsh script using xmlExport, one gets:

egrep 'subject.*test:t:g1|export.uuids' /tmp/t.xml
<subject identifier='test:t:g1' type='group' source='g:gsa'
immediate='true' id='ada0da3b60ab43dbb2ca364101e47df2'
<option key='export.uuids'>false</option>

I would like to use xmlExport and xmlImport to copy groups between
instances of Grouper (test to production or 1.6.3 to 2.1.3). With
this behavior, when using xmlImport with t.xml there is an error for
the group subject:

grep 'ERROR.*test:t:g2' logs/grouper_error.log
2013-03-11 20:09:57,241: [main] ERROR
XmlImporter._processMembershipListAddMember(1387) - - Could not add
member to field members of test:t:g2 for subject
id=ada0da3b60ab43dbb2ca364101e47df2

If the reference (id='ada0da3b60ab43dbb2ca364101e47df2') is removed
by hand from the xml file, then the group subject test:t:g1 is
successfully imported as a member.


The API doc says

export.uuids
If true group and stem uuids will be exported
cf. e.g.:
http://www.internet2.edu/grouper/release/1.6.0/doc/api/edu/internet2/middleware/grouper/xml/XmlExporter.html#XmlExporter%28edu.internet2.middleware.grouper.GrouperSession,%20java.util.Properties%29

This behavior occurs with both 1.6.3 and 2.1.3.


By the way
- What would you advise as properties and parameters for xmlExport and
xmlImport to copy the entire hierarchy of groups between two
instances of Grouper?

This is what I am considering:

export.metadata=false
export.data=true
export.privs.naming=true
export.privs.access=true
export.privs.immediate-only=true
export.group.members=true
export.group.members.immediate-only=true
export.group.lists=true
export.group.lists.immediate-only=true
export.uuids=false
export.group.internal-attributes=true
export.group.custom-attributes=true
export.stem.internal-attributes=true
export.privs.for-parents=false
export.data.fail-on-unresolvable-subject=false

import.metadata.group-types=false
import.metadata.group-type-attributes=false
import.data.ignore-internal-attributes-and-uuids=false
import.data.apply-new-group-types=false
import.data.update-attributes=false
import.data.fail-on-unresolvable-subject=false
import.data.lists=replace
import.data.privileges=replace


Best regards,
Dominique
--
Mr Dominique Petitpierre, user=Dominique.Petitpierre domain=unige.ch
IT Division, University of Geneva, Switzerland



Archive powered by MHonArc 2.6.16.

Top of Page