Skip to content

Commit

Permalink
[Feature] Python Script for JSON Config Files
Browse files Browse the repository at this point in the history
This PR adds a Python script capable of deploying a network function chain
based on a JSON configuration. 

Commit log:

* python cfg script working for one nf startup

* adding processes for each nf

* switching to threading

* config.py working for 2 nf's in config

* config script working for multiple params

* clean up script

* added documentation and example config file

* switched to subprocesses for better async

* working script and example json config

* print statement fix

* python cfg script working for one nf startup

* adding processes for each nf

* switching to threading

* config.py working for 2 nf's in config

* config script working for multiple params

* clean up script

* added documentation and example config file

* switched to subprocesses for better async

* working script and example json config

* print statement fix

* restoring old JSON config and fixing spacing

* fixed styling errors

* styling and error messages

* fixes from PR review

* Use 'nf->data' instead of global variables

* Fix Mbps to MBps

* Replace malloc by rte_malloc and remove unnecessary assignment

* NFs output to log files

* error statement fixes

* try block for invalid JSON syntax

* more print statements and extra dir function

* user can now specify TTL and dir name in config file

* formatting fix for documentation

* flushing print statement

* kill changes

* fixed nf shutdown for timeout and failure

* directory-prefix option

* fixed formmating on config

* formatting + documentation update

* undo changes to tb

* renaming and documentation
  • Loading branch information
catherinemeadows authored Jul 31, 2020
1 parent c2b92b5 commit c33c230
Show file tree
Hide file tree
Showing 4 changed files with 349 additions and 51 deletions.
5 changes: 4 additions & 1 deletion docs/Examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ command line. The general structure for launching an NF from a config file is
Any args specified in `<DPDK args>` or `<ONVM ARGS>` will replace the
corresponding args in the config file. **An important note:** If no DPDK
or ONVM args are passed, **but** NF args are required, the `-- --` is
still required. For documentation on developing with config files, see
still required. Additionally, launching multiple network functions at once, including circular or linear chains, from a JSON config file is supported.
For documentation on developing with config files, see
[NF_Dev](NF_Dev.md)



NF Starting Scripts
--
The example NFs can be started using the `start_nf.sh` script. The script can run any example NF based on the first argument which is the NF name(this is based on the assumption that the name matches the NF folder and the build binary).
Expand Down
Loading

0 comments on commit c33c230

Please sign in to comment.