Go to file
Max ac8de71ac7 Re-apply changes to trap_helper.py
Due to changes getting out of sync, changes from
I44035323b70f04eb8f5dc12123cb708f53eba188 and
I21ff593be420a374a00073953c9254a013c43164 were overwritten by
I7b59f2dbded9074d15f2d2f40bf5a92ed02601e2 moving code to different
file. Fix this by re-applying those changes in new location.

Change-Id: I811f307ded63e7e1544243921ee07dceae81e295
2018-11-27 13:14:20 +01:00
contrib osmo-ctrl2cgi.service: Fix exec path not absolute 2018-09-25 11:30:19 +02:00
debian ctrl2cgi: Add systemd service file and install with debian 2018-08-29 19:13:53 +02:00
osmopy Re-apply changes to trap_helper.py 2018-11-27 13:14:20 +01:00
scripts Move common Trap-related code into separate file 2018-11-27 11:51:37 +00:00
tests Fix install in the presence of old modules 2018-01-15 14:24:15 +01:00
.gitignore Ignore compilation byproducts 2017-12-20 16:05:49 +00:00
.gitreview Add git-review config 2017-11-23 14:46:07 +01:00
README Move common Trap-related code into separate file 2018-11-27 11:51:37 +00:00
setup.py Introduce script ctrl2cgi.py 2018-07-11 22:47:54 +02:00

README

Building/installation:
sudo python setup.py install
If you prefer to have it cleanly removable, install checkinstall and run
sudo checkinstall python setup.py install
Alternatively, just run 'pip install --user -e ./' or 'pip3 install --user -e ./'
depending on your python version.

Use
There are currently following scripts in this package:
osmotestconfig.py - test that apps start/write with example configs
soap.py - implementation of SOAP <-> Ctrl proxy implemented on top of Twisted
ctrl2cgi.py - implementation of CGI <-> Ctrl proxy implemented on top of Twisted
osmo_rate_ctr2csv.py - rate counter dumper on top of osmo_ipa
osmo_interact_vty.py - pipe stdin/stdout to a VTY session
osmo_interact_ctrl.py - pipe stdin/stdout to a CTRL port
osmo_verify_transcript_vty.py - VTY testing by VTY session screen dumps
osmo_verify_transcript_ctrl.py - CTRL testing by CTRL session script files
twisted_ipa.py - implementation of IPA and Ctrl protocols on top of Twisted framework
osmodumpdoc.py - dump documentation, superseded by osmo_interact_vty.py -X
osmotestvty.py - test vty operations, superseded by osmo_verify_transcript_vty.py

Each of these scripts imports a project-specific osmoappdesc.py,
which provides information about the available apps, configs, vty ports, etc.

Run the scripts with osmoappdesc.py in the current directory (preferred)
or with -p <the directory containing osmoappdesc.py>.
Remember that osmoappdesc.py may contain relative paths.

Example:
After install osmodumpdoc for openbsc's apps can be run by:
cd <your_source_dir>/openbsc/openbsc && osmodumpdoc.py

Libraries:
osmopy/osmoutil.py - code that's shared between the scripts
osmopy/osmo_ipa.py - generic implementation of IPA and Ctrl protocols in python
osmopy/trap_helper.py - generic Trap class and related helpers used by soap.py and ctrl2cgi.py
osmopy/osmo_interact/{vty,ctrl}.py - general interactions with VTY and CTRL ports
osmopy/obscvty.py - connect to a vty, superseded by osmo_interact/vty

obscvty.py may be of general use. osmoutil.py probably isn't.