grouper-dev - RE: [grouper-dev] xmlExport/xmlImport in GSH
Subject: Grouper Developers Forum
List archive
- From: Chris Hyzer <>
- To: "GW Brown, Information Systems and Computing" <>, Grouper Dev <>
- Subject: RE: [grouper-dev] xmlExport/xmlImport in GSH
- Date: Wed, 22 Oct 2008 12:38:10 -0400
- Accept-language: en-US
- Acceptlanguage: en-US
I hope there is a way to do what you want without layering more commands on
top of gsh... I committed a way to pass in a script for gsh to run as a
command line arg (not a file or stdin)... and you can put \n (slash n) for
newlines... if this is acceptable I can make some documentation about it.
Btw, gsh is slow due to invoker, I hope we can speed it up in 1.5 or 1.4.1.
also if it is preferable, we could have an arg to suppress the info at top
(and users can already suppress this in grouper.properties)... regarding
GSH_OPTS, we can add that at some point, in the meantime, lets just edit the
gsh.bat script (which is different than the example)
C:\mchyzer\isc\dev\grouper-qs-1.2.0\grouper\bin>gsh -runarg "subj =
findSubject(\"10021368\")\nsess= GrouperSession.start(subj)\nmember =
MemberFinder.findBySubject(sess, subj)\nmember.getGroups()"
Grouper starting up: version: 1.4.0 build date: 2008/10/22 12:23:16
...more startup output...
Type help() for instructions
Running command(s):
subj = findSubject("10021368")
sess = GrouperSession.start(subj)
member = MemberFinder.findBySubject(sess, subj)
member.getGroups()
subject: id='10021368' type='person' source='pennperson' name='Michael
Christopher Hyzer'
edu.internet2.middleware.grouper.GrouperSession:
50fbb784-2617-49fb-b928-ff541efc9a17,'10021368','pe
rson'
member: id='10021368' type='person' source='pennperson'
uuid='10be24bf-0d5c-470d-8c8f-66267de1e8da'
group: name='penn:etc:webServiceClientUsers'
displayName='penn:etc:webServiceClientUsers' uuid='9dbc
03f8-734d-4633-8a33-0e94d42a0570'
C:\mchyzer\isc\dev\grouper-qs-1.2.0\grouper\bin>
> -----Original Message-----
> From: GW Brown, Information Systems and Computing
> [mailto:]
> Sent: Wednesday, October 22, 2008 8:01 AM
> To: Chris Hyzer; Grouper Dev
> Subject: Re: [grouper-dev] xmlExport/xmlImport in GSH
>
> Chris,
>
> I've had a quick go importing and exporting and the changes appear to
> work,
> however, I'm concerned we've made things more difficult than they were
> -
> which is the opposite of what was intended with a binary release.
>
> Some of the first things I do after checking out from CVS are running
> schemaexport and then doing an import of the quickstart.xml. These used
> to
> be one liners... I could write GSH scripts but I'd rather not do that -
> especially lots of variants on import/export.
>
> I think we could extend GSH so that we can pass a variable number of
> arguments and have special cases for the main utilities e.g.
>
> gsh -schemaexport [options]
> gsh -usdu [options]
> gsh -xmlimport [options]
> gsh -xmlexport [options]
> gsh <file> [args] - with arguments available in GSH
> gsh - [args]
> gsh -- [args] - no file and no STDIN but allows for args to be passed.
>
> In the meantime, if it is too late to do something along the lines of
> my
> suggestion, I would vote for keeping the ant targets for 1.4 at least.
>
> BTW I'd like for GSH to be more configurable i.e. a GSH_OPTS
> environment
> variable and/or a gsh_opts.bat/sh which, if present, is 'sourced' and
> GSH_OPTS added to the Java invocation. Memory options could be moved
> here
> also. Having GSH_OPTS would make it easier to run GSH with remote
> debugging
> and / or a profiler.
>
> Gary
>
>
>
> --On 15 October 2008 00:05 -0400 Chris Hyzer
> <>
> wrote:
>
> >
> >
> > Hey,
> >
> >
> >
> > With the binary release and other reasons we got rid of
> > xmlImport/xmlExport from ant so we can use it from GSH.
> >
> > I didn't know that the GSH export/import didn't cover everything in
> the
> > ant one.
> >
> >
> >
> > So I added the features from the ant version into gsh. However,
> there
> > are a lot of options etc, so I made it a "chained" object.
> Documentation
> > is here:
> >
> >
> >
> >
> https://wiki.internet2.edu/confluence/display/GrouperWG/GrouperShell+(g
> sh
> > )#GrouperShell(gsh)-XMLexport
> >
> >
> https://wiki.internet2.edu/confluence/display/GrouperWG/GrouperShell+(g
> sh
> > )#GrouperShell(gsh)-XMLimport
> >
> >
> >
> > My questions are:
> >
> >
> >
> > 1. Gary, can you test this and let me know if I am missing
> anything
> > or doing anything wrong?
> >
> > 2. Everyone, can we remove the old GSH xmlImport/xmlExport
> methods
> > (which are not full featured, and which are covered by the new way)?
> >
> >
> >
> > Still need to update docs / tests...
> >
> >
> >
> > Since this wasn't trivial, I added another Jira:
> >
> >
> >
> > https://bugs.internet2.edu/jira/browse/GRP-175
> >
> >
> >
> > Chris
>
>
>
> ----------------------
> GW Brown, Information Systems and Computing
>
- xmlExport/xmlImport in GSH, Chris Hyzer, 10/15/2008
- Re: [grouper-dev] xmlExport/xmlImport in GSH, GW Brown, Information Systems and Computing, 10/22/2008
- RE: [grouper-dev] xmlExport/xmlImport in GSH, Chris Hyzer, 10/22/2008
- Re: [grouper-dev] xmlExport/xmlImport in GSH, GW Brown, Information Systems and Computing, 10/22/2008
Archive powered by MHonArc 2.6.16.