On Tue, May 23, 2017 at 04:52:55PM +0200, Jiri Pirko wrote:
Fri, May 19, 2017 at 12:12:45PM CEST, olichtne@redhat.com wrote:
From: Ondrej Lichtner olichtne@redhat.com
v2 changes: add lnst.Common.IpAddress
- modify exception string.
add lnst.Common.Parameters
- add docstring explaining the __getattribute__ magic
- make val a property
- rename x to attr in Parameters dir() iterations
- fix IpParam value setter for string values
- modify IpParam Exception string
add lnst.Devices
- make Device a Meta class and register RemoteDevice as implementing the Device interface
- removed unnecessary imports
- added MasterDevice class for slave* methods
- made master_set to be a 'master' property setter
- renamed {add, del}_route to route_{add, del}
- renamed set_speed to speed_set
- renamed set_autoneg to autoneg_set
- removed modprobes where unnecessary
- link_stats are now retrieved from netlink message
- added link_stats64
- OvsBridge calls parent _type_init for modprobe
- remove SoftDevice import - not required
add lnst.Controller.Host
- removed debug pprint import
- added docstrings to requested methods
- Host::run throws an exception when netns set (not supported yet)
- added TODO comments to some parts that need to be implemented
add lnst.Controller.MachineMapper
- docstring now explains that implementing your own MachineMapper is not supported at this moment
- removed debug pprint import
add lnst.Controller.Recipe
- renamed variable 'x' to 'attr'
Machine, NetTestSlave: heavy reimplementation
- improved class and module synchronization implementation
- join split lines in deviceref_to_device method
lnst.Common.Parameters: IpParam accepts Device objects
- import Device on demand (Device class arrives on Slave later) and check isinstance Device instead of RemoteDevice (not available on Slave)
- fix IpParam Exception string
v2 new commits: Controller, Devices: removing unused imports NetTestSlave: create dynamic lnst.Tests package lnst.Tests: add package docstring lnst.Common.Parameters: add DeviceParam lnst.Tests.IcmpPing: use DeviceParam for iface parameter
Looks good on a quick look. Lets apply this and continue in-tree.
Sorry this took a while, I was busy with certification training this week, Pushed to the origin/next branch. I also removed the origin/next_devel branch.
Next on the agenda is to schedule a meeting where we'll discuss the Device API so that we can settle on something that will not change anymore. I also have an idea for Host API that I'd like to discuss.
Next week mostly works for me, I'd prefer later than sooner (I have to do some catchup in school)... What works for you and/or other members of the mailing list?
-Ondrej
Including the original cover letter as well:
Hi all,
the long avaited patchset for Python Recipes is here.
At this point there's still quite a lot of work left, but since the current state is functional and the tester facing API should be mostly stable I think it's a good time to get this merged into upstream so that more people can get involved with filling in the missing pieces and can slowly start experimenting and porting their XML recipes.
This I know are missing:
- Recipe run summary - how the Summary should look like was described in the
running proposal document, but I didn't manage to start with the implementation yet...
- Porting of all the old test_modules into the lnst.Tests package, so far we
only have the IcmpPing module that should still be reworked to be more universal (ip4 and ip6 in one class). Porting test_modules should be fairly easy, but at this point there's no guide how to do it so if you're having trouble feel free to contact me either on irc or email.
test_tools - we haven't even thought of these yet
network namespaces - also didn't think about them yet, though I'm hoping this
will be simple
- Ip address and network generators as we've discussed them on the upstream
meeting
Please review and provide any comments or features I forgot that should be added to the above list.
Regards, Ondrej
Ondrej Lichtner (47): add lnst.Common.LnstError add lnst.Common.DeviceError add lnst.Common.DeviceRef add lnst.Common.IpAddress add lnst.Common.Parameters add lnst.Common.TestModule add lnst.Common.JobError add lnst.Controller.Common add lnst.Devices add lnst.Controller.Requirements add lnst.Controller.Job add lnst.Controller.Host add lnst.Controller.Config add lnst.Slave.Config add lnst.Controller.MachineMapper lnst.Controller.Machine: change object initialization add lnst.Controller.MessageDispatcher add lnst.Controller.SlavePoolManager add lnst.Controller.Recipe add lnst.Controller.Controller various files: retype exceptions add lnst.Tests package lnst.Common.Config: remove {controller, slave}_init lnst.Common.Config: remove global lnst_config Slave: use a local config object instead of a global one lnst.Common.Utils: add sha256sum function lnst.Common.ResourceCache: simplification lnst.Controller.CtlSecSocket: remove lnst_config import lnst.Controller.SlaveMachineParser: make standalone add lnst.Common.InterfaceManagerError add lnst.Slave.Job lnst.Slave.InterfaceManager: heavy reimplementation Machine, NetTestSlave: heavy reimplementation lnst.Slave.InterfaceManager: remove Device class implementation add lnst.Controller package imports lnst/__init__.py remove imports lnst.Controller: remove old modules setup.py: add new packages add lnst.Devices.VirtNetCtl lnst.Controller: move VirtUtils to VirtDomainCtl, remove VirtNetCtl class lnst.Common.Parameters: IpParam accepts Device objects add example python_recipe.py script Controller, Devices: removing unused imports NetTestSlave: create dynamic lnst.Tests package lnst.Tests: add package docstring lnst.Common.Parameters: add DeviceParam lnst.Tests.IcmpPing: use DeviceParam for iface parameter
lnst-slave | 20 +- lnst/Common/Config.py | 152 +--- lnst/Common/DeviceError.py | 22 + lnst/Common/DeviceRef.py | 19 + lnst/Common/ExecCmd.py | 3 +- lnst/Common/InterfaceManagerError.py | 16 + lnst/Common/IpAddress.py | 99 +++ lnst/Common/JobError.py | 22 + lnst/Common/LnstError.py | 18 + lnst/Common/NetTestCommand.py | 5 +- lnst/Common/Parameters.py | 157 ++++ lnst/Common/ResourceCache.py | 128 ++-- lnst/Common/SecureSocket.py | 3 +- lnst/Common/ShellProcess.py | 3 +- lnst/Common/TestModule.py | 67 ++ lnst/Common/TestsCommon.py | 3 +- lnst/Common/Utils.py | 11 + lnst/Controller/Common.py | 17 + lnst/Controller/Config.py | 99 +++ lnst/Controller/Controller.py | 218 ++++++ lnst/Controller/CtlSecSocket.py | 2 - lnst/Controller/Host.py | 160 ++++ lnst/Controller/Job.py | 196 +++++ lnst/Controller/Machine.py | 1356 +++++++-------------------------- lnst/Controller/MachineMapper.py | 328 ++++++++ lnst/Controller/MessageDispatcher.py | 203 +++++ lnst/Controller/NetTestController.py | 620 --------------- lnst/Controller/Recipe.py | 97 +++ lnst/Controller/RecipeParser.py | 572 -------------- lnst/Controller/Requirements.py | 113 +++ lnst/Controller/SlaveMachineParser.py | 144 +++- lnst/Controller/SlavePool.py | 648 ---------------- lnst/Controller/SlavePoolManager.py | 273 +++++++ lnst/Controller/Task.py | 4 +- lnst/Controller/VirtDomainCtl.py | 98 +++ lnst/Controller/VirtUtils.py | 268 ------- lnst/Controller/XmlParser.py | 188 ----- lnst/Controller/XmlProcessing.py | 235 ------ lnst/Controller/XmlTemplates.py | 438 ----------- lnst/Controller/__init__.py | 3 + lnst/Devices/BondDevice.py | 38 + lnst/Devices/BridgeDevice.py | 33 + lnst/Devices/Device.py | 355 +++++++++ lnst/Devices/MacvlanDevice.py | 38 + lnst/Devices/MasterDevice.py | 33 + lnst/Devices/OvsBridgeDevice.py | 115 +++ lnst/Devices/RemoteDevice.py | 98 +++ lnst/Devices/SoftDevice.py | 51 ++ lnst/Devices/TeamDevice.py | 60 ++ lnst/Devices/VethDevice.py | 58 ++ lnst/Devices/VethPair.py | 24 + lnst/Devices/VirtNetCtl.py | 85 +++ lnst/Devices/VirtualDevice.py | 98 +++ lnst/Devices/VlanDevice.py | 35 + lnst/Devices/VtiDevice.py | 71 ++ lnst/Devices/VxlanDevice.py | 65 ++ lnst/Devices/__init__.py | 42 + lnst/RecipeCommon/ModuleWrap.py | 33 +- lnst/Slave/Config.py | 73 ++ lnst/Slave/InterfaceManager.py | 648 ++-------------- lnst/Slave/Job.py | 251 ++++++ lnst/Slave/NetTestSlave.py | 846 ++++++++++---------- lnst/Tests/IcmpPing.py | 62 ++ lnst/Tests/__init__.py | 17 + lnst/__init__.py | 1 - recipes/examples/python_recipe.py | 32 + setup.py | 2 +- 67 files changed, 4991 insertions(+), 5301 deletions(-) create mode 100644 lnst/Common/DeviceError.py create mode 100644 lnst/Common/DeviceRef.py create mode 100644 lnst/Common/InterfaceManagerError.py create mode 100644 lnst/Common/IpAddress.py create mode 100644 lnst/Common/JobError.py create mode 100644 lnst/Common/LnstError.py create mode 100644 lnst/Common/Parameters.py create mode 100644 lnst/Common/TestModule.py create mode 100644 lnst/Controller/Common.py create mode 100644 lnst/Controller/Config.py create mode 100644 lnst/Controller/Controller.py create mode 100644 lnst/Controller/Host.py create mode 100644 lnst/Controller/Job.py create mode 100644 lnst/Controller/MachineMapper.py create mode 100644 lnst/Controller/MessageDispatcher.py delete mode 100644 lnst/Controller/NetTestController.py create mode 100644 lnst/Controller/Recipe.py delete mode 100644 lnst/Controller/RecipeParser.py create mode 100644 lnst/Controller/Requirements.py delete mode 100644 lnst/Controller/SlavePool.py create mode 100644 lnst/Controller/SlavePoolManager.py create mode 100644 lnst/Controller/VirtDomainCtl.py delete mode 100644 lnst/Controller/VirtUtils.py delete mode 100644 lnst/Controller/XmlParser.py delete mode 100644 lnst/Controller/XmlProcessing.py delete mode 100644 lnst/Controller/XmlTemplates.py create mode 100644 lnst/Devices/BondDevice.py create mode 100644 lnst/Devices/BridgeDevice.py create mode 100644 lnst/Devices/Device.py create mode 100644 lnst/Devices/MacvlanDevice.py create mode 100644 lnst/Devices/MasterDevice.py create mode 100644 lnst/Devices/OvsBridgeDevice.py create mode 100644 lnst/Devices/RemoteDevice.py create mode 100644 lnst/Devices/SoftDevice.py create mode 100644 lnst/Devices/TeamDevice.py create mode 100644 lnst/Devices/VethDevice.py create mode 100644 lnst/Devices/VethPair.py create mode 100644 lnst/Devices/VirtNetCtl.py create mode 100644 lnst/Devices/VirtualDevice.py create mode 100644 lnst/Devices/VlanDevice.py create mode 100644 lnst/Devices/VtiDevice.py create mode 100644 lnst/Devices/VxlanDevice.py create mode 100644 lnst/Devices/__init__.py create mode 100644 lnst/Slave/Config.py create mode 100644 lnst/Slave/Job.py create mode 100644 lnst/Tests/IcmpPing.py create mode 100644 lnst/Tests/__init__.py create mode 100755 recipes/examples/python_recipe.py
-- 2.13.0 _______________________________________________ LNST-developers mailing list -- lnst-developers@lists.fedorahosted.org To unsubscribe send an email to lnst-developers-leave@lists.fedorahosted.org