Skip to main content

Agent for ioppytest framework

About

Agent (~VPN client) is a component of the ioppytest framework ecosystem which creates tunnels between the IUTs, or between IUT and test system.

The following diagram described the resulting network connection between implementations:

+--------------------------------+                                             +--------------------------------+
|  +--------------------------+  |                                             |  +--------------------------+  |
|  |              |           |  |                                             |  |              |           |  |
|  |     IUT      |   ping    |  |                                             |  |     IUT      |   ping    |  |
|  |              |           |  |                                             |  |              |           |  |
|  |              |           |  | PC 1                                  PC 2  |  |              |           |  |
|  +--------------------------+  |                                             |  +--------------------------+  |
|  |          tun0            |  |                                             |  |          tun0            |  |
|  |                          |  |                                             |  |                          |  |
|  |  virtual ip  10.2.0.1    |  |                                             |  |  virtual ip  10.2.0.2    |  |
|  |  addresses:  bbbb::1     |  |                                             |  |  addresses:  bbbb::2     |  |
|  |                          |  |                                             |  |                          |  |
|  +--------------------------+  |                                             |  +--------------------------+  |
|  |          agent_1         |  | +-----------------------------------------> |  |          agent_2         |  |
|  |        (VPN client)      |  |         transport  (ip over foo)            |  |        (VPN client)      |  |
|  +--------------------------+  | <-----------------------------------------+ |  +--------------------------+  |
+--------------------------------+                                             +--------------------------------+

The agent components needs to run in the user's host. It builds a virtual interface for enabling the communication, same way openVPN does. The previous diagram show a two IUT network build with the agent, but the network can support any number agents.

Error handling

When there is a user interrupt signal (Ctrl-C) the agent should all running threads and should gracefully disconnect.

Running the agent

For running the agent you will need privileges on the machine, basically cause we need to open a virtual interface to tunnel the packets.

The command for executing it will be provided to you by the GUI or AMQP broker sys admin, it should look something like this:

sudo python -m agent connect  --url amqp://someUser:somePassword@f-interop.rennes.inria.fr/sessionXX --name agent_x

for more info

python agent.py --help
python agent.py connect --help

AMQP as IP packet transport

IP packets sent to the virtual interface will be encapsulated in AQMP messages and sent over the event bus. This messages are then forwarded to the corresponding agent. The routing between the agents is automagically hanlded by the packet router.

    +--------------------------------+                                          +--------------------------------+
    |  +--------------------------+  |                                          |  +--------------------------+  |
    |  |              |           |  |                                          |  |              |           |  |
    |  |    oneM2M    |  ping     |  |                                          |  |    oneM2M    |  ping     |  |
    |  |     IUT      |           |  |                                          |  |     IUT      |           |  |
    |  |              |           |  |  +----------------------------+          |  |              |           |  |
    |  +--------------------------+  |  |                            |          |  +--------------------------+  |
    |  |          tun0            |  |  |                            |          |  |          tun0            |  |
    |  |                          |  |  |       Packet Router        |          |  |                          |  |
    |  |  virtual ip  10.2.0.1    |  |  |    (forwards amqp messages)|          |  |  virtual ip  10.2.0.2    |  |
    |  |  addresses:  bbbb::1     |  |  |                            |          |  |  addresses:  bbbb::2     |  |
    |  |                          |  |  +----------------------------+          |  |                          |  |
    |  +--------------------------+  |                                          |  +--------------------------+  |
    |  |          agent_1         |  |              ^    +                      |  |          agent_2         |  |
    |  |        (VPN client)      |  |              |    |                      |  |        (VPN client)      |  |
    |  +--------------------------+  |              |    |                      |  +--------------------------+  |
    +--------------------------------+              |    |                      +--------------------------------+
                                                    |    |
                 +     ^                            |    |                                      ^     +
                 |     |                        1,3 |    | 2,4                                  |     |
               1 |     | 2                          |    |                                    4 |     | 3
                 |     |                            |    |                                      |     |
                 v     +                            +    v                                      +     v

 +----------------------------------------------------------------------------------------------------------------->
                                            AMQP Event Bus
 <-----------------------------------------------------------------------------------------------------------------+


AMQP Topics:
1=fromAgent.agent_1_name.ip.tun.packet.raw
2=toAgent.agent_1_name.ip.tun.packet.raw
3=fromAgent.agent_2_name.ip.tun.packet.raw
4=toAgent.agent_2_name.ip.tun.packet.raw

Metadata

Release files for ioppytest-agent 0.2.20

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ioppytest-agent 0.2.20
File Size Uploaded
ioppytest-agent-0.2.20.tar.gz 44.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ioppytest-agent 0.2.20
File Interpreter ABI Platform
ioppytest_agent-0.2.20-py3-none-any.whl Python 3 none any Details

Total release size: 97.4 kB

Release files / ioppytest-agent-0.2.20.tar.gz

Download URL ioppytest-agent-0.2.20.tar.gz
Size 44.7 kB
Tags Source
SHA-256 checksum
How to use checksums
77f2236d8f86897920da8b5ef1b6a6060a1b5118d053aa496d716705877f33dc
BLAKE2b-256 checksum
How to use checksums
162538836d8fdbdf2c503e8ed7c40e0c0fd185a048482d8a1f6c95f2cbca62c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.48.1 CPython/2.7.16

Release files / ioppytest_agent-0.2.20-py3-none-any.whl

Download URL ioppytest_agent-0.2.20-py3-none-any.whl
Size 52.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78a9c2f36e9b958e32f7a253a72032c3e784f2deabb08d395198e6f674e2d073
BLAKE2b-256 checksum
How to use checksums
dabcb7dadc75777989c2c325a79c0c7c02118d07d24271db4f75b9f09c285ba3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.48.1 CPython/2.7.16

Release history Release notifications | RSS feed

This release

0.2.20 This release

2 release files

0.2.19

1 release file

0.2.0

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

2 release files

0.1.3

1 release file

0.1.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page