It's all about the answers!

Ask a question

how to add a file into RTC (EWM) Stream/workspace using SCM ?


Quentin Guyot (152) | asked Apr 29, 3:59 a.m.

Hi,
I am still developing a tool in python that spimplify RTC usage.
In this context, I am searching a better solution for the use case where the user want to add a file to the project (existing or new file).

For now, I saw that you can't share (SCM share) a file that is the child of a sandbox directory. So I think you have to create a file in a random directory, then share into the workspace and after reload the workspace in order to have the new file in the local sandbox, in order to be able to work on it.

Speaking of that, if you load your workspace with a loadrule, I guess you have to update the loadrule at the same time... Otherwise the new file will not be loaded.

Is there a more elegant solution to this use case ?
(I can only use python)

One answer



permanent link
Ralph Schoon (63.2k33646) | answered Apr 29, 8:56 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

There is no Python API for EWM.

For EWM SCM operations you can either use the SCM command line or the JAVA APIs.

Just because the EWM Client or the SCM command line does things in certain ways, does not mean the Java API would be limited to this.


Some things you can do are used here: https://github.com/jazz-community/ewm-scm-utils


Comments
Quentin Guyot commented Apr 30, 4:40 a.m.
I already know that "There is no Python API for EWM." I am just using SCM Command line with python, because it is my only solution available since I can only use Python as I said. So there is no point to mention Java here.

In addition, I don't see the link between your "ewm-scm-utils" and my use case.

I just want the user to be able to add file easily and push it as a change into the workspace / stream, using SCM command line. Since it seems that you cant just add a new file to the sandbox (because it is not detected by "scm show status"), I mentionned my non elegant solution, searching for a better one.

Ralph Schoon commented Apr 30, 5:56 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

There is code in ewm-scm-utils that would allow to upload the files to other locations than supported by the scm command line. If you can run SCM command line from Python, you can also run Plain Java Client Libraries based Java code. 

Anyway, I will no longer continue to bother you with my thoughts.


Quentin Guyot commented Apr 30, 8:33 a.m. | edited Apr 30, 8:36 a.m.

Sorry I think EWM makes me bitter, more than 2 months working on it I feel like I don't understand anything sometimes.
Thanks for your answers anyway.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.