Skip to content

iot-lab/iot-lab-gateway

Repository files navigation

Gateway code Python README

Code development

File hierarchy

|
+---gateway_code: implementation of gateway_code
|       |
|       +---tests: unit tests
|       +---integration: integration tests that require a real gateway
|       +---static: default profiles, firmwares, openocd conf
|
+---roomba: roomba low level communication implementation
|           (not included in the tests suites at the moment)
|
+---control_node_serial: C program talking to control node over serial
|
|
+---bin: CLI scripts and init.d script
|
|
+---tests_utils: stuff useful for tests
        |
        +---curl_scripts: curl test examples

Deploying manually

Install all the gateway code on a gateway

python setup.py release

It runs the install command and the post_install procedure.

Testing

Tests can be run with the following commands:

python setup.py nosetests
python setup.py lint
python setup.py pep8

They require having installed 'tests-utils/test-requirements.txt' to run

Note: unit tests require oml.mytestbed.net v2.11 installed.

Automated testing

# runs all tests at once
tox

# To run on gateways a 'www-data' user
tox -e integration

Server REST (testing)

  • launch server REST: ./server_rest.py localhost 8080
  • start experiment: curl -X POST -H "Content-Type: multipart/form-data" http://localhost:8080/exp/start/123/clochette -F "firmware=@idle.elf" -F "profile=@tata.json"; echo
  • flash open node: curl -X POST -H "Content-Type: multipart/form-data" http://localhost:8080/open/flash -F "firmware=@idle.elf"; echo

About

IoT-LAB Gateway Manager

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 12