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:

+--------------------------------+                                             +--------------------------------+
|  +--------------------------+  |                                             |  +--------------------------+  |
|  |              |           |  |                                             |  |              |           |  |
|  |    oneM2M    |  ping     |  |                                             |  |    oneM2M    |  ping     |  |
|  |     IUT      |           |  |                                             |  |     IUT      |           |  |
|  |              |           |  | 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ioppytest-agent-0.2.0.tar.gz (41.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ioppytest_agent-0.2.0-py2-none-any.whl (46.4 kB view details)

Uploaded Python 2

File details

Details for the file ioppytest-agent-0.2.0.tar.gz.

File metadata

  • Download URL: ioppytest-agent-0.2.0.tar.gz
  • Upload date:
  • Size: 41.1 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for ioppytest-agent-0.2.0.tar.gz
Algorithm Hash digest
SHA256 532675f58555636a52742fde25e28131c37e24b6d06345767f167a2215df046b
MD5 3a2e8c90cca50b3c7382edaddd1eebde
BLAKE2b-256 502bf4f7d92712edccf9afd805c0e91795e1415a788031596e79c8ecf22de762

See more details on using hashes here.

File details

Details for the file ioppytest_agent-0.2.0-py2-none-any.whl.

File metadata

  • Download URL: ioppytest_agent-0.2.0-py2-none-any.whl
  • Upload date:
  • Size: 46.4 kB
  • Tags: Python 2
  • Uploaded using 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

File hashes

Hashes for ioppytest_agent-0.2.0-py2-none-any.whl
Algorithm Hash digest
SHA256 8160f7aac976363e01c3981d347de36f4bd651d39604d70968d9e66245c8f89e
MD5 e7f41edc7f22acf548bf934c737698c8
BLAKE2b-256 68037476a1adfd95679e3b9718e5c3c2a1801042107b6639efc617802bd0a807

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.20

2 files

0.2.19

1 file

This release

0.2.0 This release

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.11

3 files

0.1.10

2 files

0.1.9

2 files

0.1.8

1 file

0.1.7

1 file

0.1.6

1 file

0.1.5

1 file

0.1.4

2 files

0.1.3

1 file

0.1.2

1 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