2016-05-17 12:13 GMT+02:00 Jan Tluka <jtluka@redhat.com>:
Fri, Apr 22, 2016 at 10:51:58AM CEST, jprochaz@redhat.com wrote:
>Hello everyone,
>
>first working draft implementation is completed. Please, read this cover
>letter, check the patches and let me know what you like, what you don't like,
>etc. Please, note, that this is not final implementation.
>
>NOTE - patches are not rebased to current HEAD, if you want to try it,
>please, reset your branch to commit 2398f93.
>
>What doesn't work
>=================
>multi_match - didn't have time and resources to check physical machines,
>on virt setup it works, but ends with exception due to no res value returned
>loopbacks - can't be created
>netem support - not implemented yet
>
>Description of new mechanics
>============================
>Since we need to run TaskAPI methods to get machine requirements from PyRecipe,
>methods like provision_machines, prepare_network are run after the python recipe
>is executed. Methods add_host and add_interface create machine requirements dict
>in ControllerAPI object. When lnst.match() is called, it runs match algorithm
>with mreq dict and if match is found, it prepares network and binds Machine
>and Interface objects with their HostAPI and InterfaceAPI counterparts.
>When everyting is prepared, execution returns to PyRecipe, where task phase
>of PyRecipe is executed. Task phase is the same like before, only new method
>is breakpoint() which will be useful for debugging, as it allows user to pause
>the execution in whatever part of test.
>TaskAPI is now used right from lnst module, all callable methods are exported
>via __init__.py file from lnst/ dir.
>Folder pyrecipes/ contains few working examples you can try.
>
>TODO
>====
>* multimatch support
>* config_only mode should be renamed and polished
>* TaskAPI create_ovs() method
>* support for loopbacks
>* NetEm support
>* polishing of the code
>
>Jiri Prochazka (26):
>  __init__.py: draft for PyRecipes
>  lnst-ctl: draft for PyRecipes
>  NetTestController: remove RecipeParser import and related method calls
>  NetTestController: add run_mode attribute
>  NetTestController: remove obsolete methods
>  NetTestController: use mreq dict from PyRecipe
>  NetTestController: split provision_machines() in two methods
>  NetTestController: cleanup _preapre_interface()
>  NetTestController: remove resource sync from _prepare_machine()
>  NetTestController: add multi_match attribute ti NetTestController
>  NetTestController: don't call abs_path on _recipe_path in __init__
>  NetTestController: rework alias handling
>  NetTestController: add prepare_test_env()
>  NetTestController: rework match_setup(), config_only_recipe(),
>    run_recipe(), _run_python_task()
>  NetTestController: add init_taskapi()
>  NetTestController: use Task name instead of module
>  Task: remove deprecated methods
>  Task: add default param for get_alias()
>  Task: define TaskAPI methods on global level
>  Task: add breakpoint()
>  Task: add add_host() and init_hosts()
>  Task: add interface handling TaskAPI methods
>  Task: HostAPI get_id now returns its generated id
>  Task: add HostAPI methods required by PyRecipes
>  Task: add match() and minor rework of ControllerAPI
>  PyRecipes: add example PyRecipes
>
> lnst-ctl                             |  16 +-
> lnst/Controller/NetTestController.py | 398 ++++++++++-------------------------
> lnst/Controller/Task.py              | 240 +++++++++++----------
> lnst/__init__.py                     |   1 +
> pyrecipes/3_vlans.py                 |  34 +++
> pyrecipes/example.py                 |  33 +++
> pyrecipes/ping_flood.py              |  48 +++++
> 7 files changed, 363 insertions(+), 407 deletions(-)
> create mode 100644 pyrecipes/3_vlans.py
> create mode 100644 pyrecipes/example.py
> create mode 100644 pyrecipes/ping_flood.py

Besides the comments to individual patches I'd like to ask you to
consider the format of commit descriptions.

1. Start sentences with capital letters.

​Will do from now on.​

 
2. Why do you do line break at 40 characters?

​Bad vim configuration, will fix it now​
 
3. Please do not start sentence in commit message and continue in
message description. No one does that except of you.

Please keep the commit log pretty!

Thanks
-Jan

​Thanks for feedback Jan, much appreciated!​