1

I would like to get a list of all change requests that exist in a IBM Rational Change (CM) database, actually I would like to get a list of

  • Change request ID
  • Change request Synopsis
  • Change request Description

I'm familiar with python (2.7) to do things like get data from traditional SQL databases, I am unclear how I can get data from IBM Rational Change (CM). I am reading about Open Services for Lifecycle Collaboration But I am struggling to understand how to make use of it. Is there a python library that implements OSLC? Is there a python friendly way to interact with IBM Rational Change (CM)

Are there python friendly APIs that work well with IBM Rational Change (CM)

or alternatively a python friendly tutorial on how OSLC and Python can work together to query IBM Rational Change (CM)

Machavity
  • 30,841
  • 27
  • 92
  • 100

2 Answers2

0

There is none so far (there are abandoned https://github.com/sgwilbur/oslcclient-py and https://github.com/argeualcantara/rtc_client, see https://github.com/search?l=Python&q=oslc&type=Repositories&utf8=%E2%9C%93 for a complete list).

I wrote a quick Service Provider Catalog parser in 15 minutes: https://gist.github.com/berezovskyi/0fc83585f9c1074062a35422f9b09349

If you are interested in helping develop some kind of OSS library, you can write on the lyo-dev list (where most of the OSLC development happens): https://dev.eclipse.org/mailman/listinfo/lyo-dev. I will be happy to put in dev time into such library if there will be others contributing their development time as well.

berezovskyi
  • 3,133
  • 2
  • 25
  • 30
0

AFAIK there is no python library to access CM. The solution worked pretty well for me was to write wrappers to exec ccm commands and then parse their output.

If you need just these 3 fields then probably it would be simpler to run ccm commands from the shell and store results somewhere.

  1. Get all IDs with their Synopses (can take some time):

    ccm query -u -f "%name-%version:%type:%instance\t%change_request_synopsis" -t problem

  2. Repeat the next command for every problemID obtained in the previous query to get descriptions:

    ccm attribute -show problem_description problemID

r0mk
  • 16
  • 2
  • Thanks how do I get the output piped to a file? can it write output as CSV? Just to make it easier to parse – Man Wa kileleshwa Apr 25 '17 at 20:17
  • Just redirect it with **>**. You can set any separator in the format string instead of \t. I'd suggest to get the ccm documentation from the ibm site and learn the basics of shell scripting if you want to go this way. – r0mk Apr 27 '17 at 07:46