My first Python Script for IBM Connections

I will do a session on administration of IBM Connections and how scripts can help you doing this next week at BCCON in Hamburg with my good friend Christoph Stöttner. He is THE man on this topic and I managed to convince him that he needs me as a co-speaker. His only request was that I had to create a brand new python script, so here we go.
I created a script (cnxCommunitiesReparenting.py) which helps you to move/reparent Communties (requires Connections 4.5CR3).
You can find it in the ibmcnxscripting repository on Github.

Following screenshots show you how you can use it, first start the script:

Screen Shot 2014-03-13 at 09.44.00

Type ‘C’ to move a Community, in this example I just type part of the Community name and press ‘Enter’, the script will automatically do a Wildcard search:

Screen Shot 2014-03-13 at 09.47.40

All Communities with ‘Con’ in the name are displayed and I have to choose which one should be moved (2):

Screen Shot 2014-03-13 at 09.52.10

Connect 15 isn’t a Subcommunity, so it will be moved into a parent Community. The script asks for the parent Community name, we choose ‘IBM Connect 14′ as parent Community:

Screen Shot 2014-03-13 at 09.53.18

The script now checks the access rights on both Communities and gives feedback if  changes will be made:

Screen Shot 2014-03-13 at 09.58.49

Now I just have to type ‘y’ and ‘Connect 15′ will be moved into ‘IBM Connect 14′

Isn’t it easy to be an IBM Connections admin :-)

Please leave a comment if you have further suggestions for scripts.

Last but not least some words on the ibmcnxscripting project.
A BIG thank you to Christoph, he did an awesome job and created many, many really useful scripts!
And don’t forget that everyone can contribute to this project and help others to save some time.

Comments

Anuj
Reply

Many Thanks :)

Anuj
Reply

Hi Klaus,

i am getting a below Exception while running the script, sorry i am a beginner if you help me in understanding this then it will be very beneficial.

Exception – com.ibm.ws.scripting.ScriptingException com.ibm.ws.scripting.Scripti
ngException: javax.management.RuntimeMBeanException: java.lang.RuntimeException:
[wasadmin]

Thanks in Advance :)
Anuj

Klaus Bild
Reply

Is wsadmin working at all, i.e. does loading of Community admin python scripts work? -> execfile(“communitiesAdmin.py”)
Are you using Connections 4.5 CR3?

Anuj
Reply

Thanks for you reply.

Yes..! wsadmin is working fine, i can execute admin python scripts i.e. “communitiesAdmin.py” etc.
Currently, i am at 4.5 CR3.
FYI, i get the same Run Time Exception while following the IBM wiki document for re-parenting community.

Many Thanks.
Anuj

Leave a Reply

%d bloggers like this: