Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
ArielBravo
Active Participant
A few weeks ago I set myself the challenge of learning Python and, as I am firmly convinced that the best way to learn is by doing, I started a side project to create a command line interface for CPI.

I don't have anything against UI5 or Fiori, but sometimes I think it's not the best UI for handling systems like CPI. (Maybe I have spent too much time working on PO). Very simple activities take a lot of clicks and scrolls. It is not possible to export lists or take general snapshots of contents, nor is there a simple way to mechanize processes. Eclipse was somewhat compliant with this, but as we know, it is going out of use.

On the other hand, a command line interface is very different as it has no visual effects, nor the "wow" effect, however it can be very efficient and can be complemented with many other powerful programs that are able to interact with the STDIN and STDOUT (such us "grep" and "more"). It also lets you write small scripts that allow you to mechanize processes or execute them "en masse".

Regarding my adventure learning Python, I've learned a lot along the way, but I don't go from being a novice. This is why I still don't want to release the code to the community as I still want to incorporate some points and polish my skills before doing so. However, I want to share with the community the first alpha version of this interface.

You can download it for windows and linux from here: http://bit.ly/CPI-CLI-001

  • Windows (Unsigned Installer -> Warning of "Unknown publisher")

  • Windows (Portable)

  • Linux (OpenSuse)


Please, remember this is only for demos and a alpha release. In other words, use it at your own risk. The CLI is prompt to errors and nasty things like "odata injection" (if that's a thing) are not controlled.

This first version, only has some very simple features:
- Login / Logout
- List of nodes
- Listing and filtering of messages
- List of contents (Iflows, Odata Services, Value Mappings)
- Content download

In the roadmap I have:
- List of credentials (and perhaps their content)
- Download of: tail logs, http and node traces
- iFlow parameter Maintenance
- Backup and Snapshots of integration contents
- Push and Commits to GIT repositories
- I accept suggestions!


Your constructive feedback would be very welcome. Feel free to reach out if you have any questions or ideas to implement.

 

Ariel Bravo Ayala

 

Basic examples


 

Help: (You can use the --help in all the commands)


cpi --help



 

Command "login":


cpi login -u ariel.bravo@xxxxxxxx -h yyyyy-tmn.hci.zzz.hana.ondemand.com



 

Command "list"



  • List first 10 error messages:


cpi list messages -e -top 10



 

  • List messages from the 2019-01-23 15:15 to the 2019-01-23 15:25


cpi list messages -f 2019-01-23T15:15:00 -t 2019-01-23T15:30:00



 

  • List all the integration content


cpi list content


Command "download"



  • Download an iFlow


cpi download -id <SymbolicNameOfTheArtefact>



 

 
9 Comments
Labels in this area