fg-inet / python-asyncio-taps

A TAPS implementation based on Python asyncio
MIT License
9 stars 4 forks source link

python-asyncio-taps

This is an implementation of a transport system as described by the TAPS (Transport Services) Working Group in the IETF in draft-ietf-taps-interface-04. The full documentation can be found on readthedocs.io

A transport system is a novel way to offer transport layer services to the application layer. It provides an interface on top of multiple different transport protocols, such as TCP, SCTP, UDP, or QUIC. Instead of having to choose a transport protocol itself, the application only provides abstract requirements (Transport Properties), e.g., Reliable Data Transfer. The transport system maps then maps these properties to specific transport protocols, possibly trying out multiple different protocols in parallel. Furthermore, it can select between multiple local interfaces and remote IP addresses.

TAPS is currently being standardized in the IETF TAPS Working Group:

People interested in participating in TAPS can join the mailing list.

Build Dependencies:

Yang and multicast support relies on some shared libraries. Run the script to download, build, and install them (if not in the default location, then in a place where LD_LIBRARY_PATH points).

Requirements:

You should first create and activate a virtual environment:

python3 -m venv pytaps
source pytaps/bin/activate

Build & Install requirements on Linux(Debian):

sudo apt-get update
sudo apt-get install -y libpcre3-dev cmake
sudo apt-get install -y autoconf automake libtool

Build & Install requirements on MacOS:

brew install pcre cmake autoconf automake libtool

At the time of this writing, libyang and libmcrx are not packaged and can either be installed independently, or built with the included convenience script, but they must also be present for the build to succeed:

INSTALL_PATH=${HOME}/local_install \
  ./build_dependencies.sh

Build and install the pytaps package:

INSTALL_PATH=${HOME}/local_install \
  python setup.py build install

Use

You'll need the path to load the dependent dynamic libraries set whenever pytaps is imported:

export LD_LIBRARY_PATH=${HOME}/local_install/lib

To run a server with a yang model specified in examples/yang_example/test-server2.json run

python examples/yang_example/yangServer.py -f examples/yang_example/test-server2.json

For a client with a model specified in examples/yang_example/test-client2.json run

python examples/yang_example/yangClient.py -f examples/yang_example/test-client2.json

Running Tests

Requirements:

Running

cd tests/
./run_tests.sh