[PATCH 2/2] docs:add Recipes.ENRT.BondRecipe documentation
by aloughla@redhat.com
From: Aniss Loughlam <aloughla(a)redhat.com>
Signed-off-by: Aniss Loughlam <aloughla(a)redhat.com>
---
lnst/Recipes/ENRT/BondRecipe.py | 111 ++++++++++++++++++++++++++++++++
1 file changed, 111 insertions(+)
diff --git a/lnst/Recipes/ENRT/BondRecipe.py b/lnst/Recipes/ENRT/BondRecipe.py
index 07d7cfc..0941100 100644
--- a/lnst/Recipes/ENRT/BondRecipe.py
+++ b/lnst/Recipes/ENRT/BondRecipe.py
@@ -11,6 +11,33 @@ from lnst.Devices import BondDevice
class BondRecipe(CommonHWSubConfigMixin, OffloadSubConfigMixin,
BaseEnrtRecipe):
+ """
+ This recipe implements Enrt testing for a network scenario that looks
+ as follows
+
+ .. code-block:: none
+
+ .--------.
+ .----------------+ |
+ | .-------+ switch +-------.
+ | | '--------' |
+ .-------------------. |
+ | | bond0 | | |
+ | .---'--. .---'--. | .---'--.
+ .----|-| eth0 |-| eth1 |-|----. .----| eth0 |----.
+ | | '------' '------' | | | '------' |
+ | '-------------------' | | |
+ | | | |
+ | host1 | | host2 |
+ '-----------------------------' '----------------'
+
+ All sub configurations are included via Mixin classes.
+
+ The actual test machinery is implemented in the :any:`BaseEnrtRecipe` class.
+ """
+
+
+
host1 = HostReq()
host1.eth0 = DeviceReq(label="net1", driver=RecipeParam("driver"))
host1.eth1 = DeviceReq(label="net1", driver=RecipeParam("driver"))
@@ -28,6 +55,10 @@ class BondRecipe(CommonHWSubConfigMixin, OffloadSubConfigMixin,
miimon_value = IntParam(mandatory=True)
def test_wide_configuration(self):
+ """
+ Test wide configuration for this recipe involves creating a bond0
+ device using two slave device eth0 and eth1 on host1
+ """
host1, host2 = self.matched.host1, self.matched.host2
host1.bond0 = BondDevice(mode=self.params.bonding_mode,
miimon=self.params.miimon_value)
@@ -53,6 +84,10 @@ class BondRecipe(CommonHWSubConfigMixin, OffloadSubConfigMixin,
return configuration
def generate_test_wide_description(self, config):
+ """
+ Test wide description is extended with the configured VLAN tunnels
+ and their IP addresses
+ """
host1, host2 = self.matched.host1, self.matched.host2
desc = super().generate_test_wide_description(config)
desc += [
@@ -79,39 +114,115 @@ class BondRecipe(CommonHWSubConfigMixin, OffloadSubConfigMixin,
return desc
def test_wide_deconfiguration(self, config):
+ "" # overriding the parent docstring
del config.test_wide_devices
super().test_wide_deconfiguration(config)
def generate_ping_endpoints(self, config):
+ """
+ The ping endpoints are host1.bond0 and host2.eht0
+ """
return [PingEndpoints(self.matched.host1.bond0, self.matched.host2.eth0)]
def generate_perf_endpoints(self, config):
+ """
+ The perf endpoints for this recipe are the host1.bond0 and host2.eth0
+
+ Returned as::
+
+ [(self.matched.host1.bond0, self.matched.host2.eth0)]
+
+ """
return [(self.matched.host1.bond0, self.matched.host2.eth0)]
@property
def offload_nics(self):
+ """
+ The `offload_nics` property value for this scenario is a list of the physical
+ devices carrying data of the configured bond:
+
+ | host1.eth0, host.eth1
+ | host2.eth0
+
+ For detailed explanation of this property see :any:`OffloadSubConfigMixin`
+ class and :any:`OffloadSubConfigMixin.offload_nics`.
+ """
return [self.matched.host1.bond0, self.matched.host2.eth0]
@property
def mtu_hw_config_dev_list(self):
+ """
+ The `mtu_hw_config_dev_list` property value for this scenario is a
+ list of the configured bond device and the underlying physical
+ devices:
+
+ | host1.eth0, host1.eth1, host1.bond0
+ | host2.eth0
+
+ For detailed explanation of this property see :any:`MTUHWConfigMixin`
+ class and :any:`MTUHWConfigMixin.mtu_hw_config_dev_list`.
+ """
return [self.matched.host1.bond0, self.matched.host2.eth0]
@property
def coalescing_hw_config_dev_list(self):
+ """
+ The `mtu_hw_config_dev_list` property value for this scenario is a
+ is a list of the physical devices carrying data of the configured
+ bond:
+
+ | host1.eth0, host.eth1
+ | host2.eth0
+
+ For detailed explanation of this property see :any:`CoalescingHWConfigMixin`
+ class and :any:`CoalescingHWConfigMixin.coalescing_hw_config_dev_list`.
+ """
return [self.matched.host1.eth0, self.matched.host1.eth1,
self.matched.host2.eth0]
@property
def dev_interrupt_hw_config_dev_list(self):
+ """
+ The `dev_interrupt_hw_config_dev_list` property value for this scenario
+ is a list of the physical devices carrying data of the configured bond:
+
+ | host1.eth0, host.eth1
+ | host2.eth0
+
+ For detailed explanation of this property see :any:`DevInterruptHWConfigMixin`
+ class and :any:`DevInterruptHWConfigMixin.dev_interrupt_hw_config_dev_list`.
+ """
return [self.matched.host1.eth0, self.matched.host1.eth1,
self.matched.host2.eth0]
@property
def parallel_stream_qdisc_hw_config_dev_list(self):
+ """
+ The `parallel_stream_qdisc_hw_config_dev_list` property value for
+ this scenario is a list of the physical devices carrying data of the
+ configured bond:
+
+ | host1.eth0, host.eth1
+ | host2.eth0
+
+ For detailed explanation of this property see
+ :any:`ParallelStreamQDiscHWConfigMixin` class and
+ :any:`ParallelStreamQDiscHWConfigMixin.parallel_stream_qdisc_hw_config_dev_list`.
+ """
return [self.matched.host1.eth0, self.matched.host1.eth1,
self.matched.host2.eth0]
@property
def no_pause_frames_dev_list(self):
+ """
+ The `no pause frames dev list` property value for this scenario is a list of
+ the physical devices carrying data of the configured bond:
+
+ | host1.eth0, host1.eht1
+ | host2.eth0
+
+ For detailed explanation of this property see
+ :any:`class DisablePauseFramesHWConfigMixin`.
+ """
return [self.matched.host1.eth0, self.matched.host1.eth1, self.matched.host2.eth0]
--
2.24.1
3 years, 5 months
Documentation available on readthedocs
by Ondrej Lichtner
Hi all,
after a little bit of tinkering and pushing several small patches I
managed to get the documentation get hosted on readthedocs.org:
https://lnst.readthedocs.io/en/latest/
This will get automatically updated every time we push new commits on
top of the master branch, but you may need to Ctrl+F5 sometimes to hard
refresh the changed pages to refresh whatever is cached.
Feel free to report any issues/improvements for the documentation, we
know it's far from perfect and not complete yet and we'll continue
working on it.
-Ondrej
3 years, 5 months
[PATCH] docs: comment out the classic theme
by olichtne@redhat.com
From: Ondrej Lichtner <olichtne(a)redhat.com>
Since the docs are now hosted on readthedocs.org I want to try using
their theme.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
docs/source/conf.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 49d3c6b..d94d901 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -51,11 +51,11 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
-html_theme = 'classic'
-html_theme_options = {
- #"body_min_width": "100%",
- "body_max_width": "100%",
-}
+# html_theme = 'classic'
+# html_theme_options = {
+# "body_min_width": "100%",
+# "body_max_width": "100%",
+# }
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
--
2.26.2
3 years, 5 months
[PATCH 1/2] Recipes.ENRT.BondRecipe: fix indentation
by olichtne@redhat.com
From: Ondrej Lichtner <olichtne(a)redhat.com>
There was an extra space indenting the patch more than it should have...
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Recipes/ENRT/BondRecipe.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lnst/Recipes/ENRT/BondRecipe.py b/lnst/Recipes/ENRT/BondRecipe.py
index 2611974..16b80e9 100644
--- a/lnst/Recipes/ENRT/BondRecipe.py
+++ b/lnst/Recipes/ENRT/BondRecipe.py
@@ -112,7 +112,7 @@ def parallel_stream_qdisc_hw_config_dev_list(self):
return [self.matched.host1.eth0, self.matched.host1.eth1,
self.matched.host2.eth0]
- @property
- def no_pause_frames_dev_list(self):
- return [self.matched.host1.eth0, self.matched.host1.eth1,
- self.matched.host2.eth0]
+ @property
+ def no_pause_frames_dev_list(self):
+ return [self.matched.host1.eth0, self.matched.host1.eth1,
+ self.matched.host2.eth0]
--
2.26.2
3 years, 5 months
[PATCH] Add no_pause_frames_dev_list
by aloughla@redhat.com
From: Aniss Loughalm <aloughla(a)redhat.com>
Signed-off-by: Aniss Loughalm <aloughla(a)redhat.com>
---
lnst/Recipes/ENRT/BondRecipe.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lnst/Recipes/ENRT/BondRecipe.py b/lnst/Recipes/ENRT/BondRecipe.py
index 6ef40db..07d7cfc 100644
--- a/lnst/Recipes/ENRT/BondRecipe.py
+++ b/lnst/Recipes/ENRT/BondRecipe.py
@@ -111,3 +111,7 @@ class BondRecipe(CommonHWSubConfigMixin, OffloadSubConfigMixin,
def parallel_stream_qdisc_hw_config_dev_list(self):
return [self.matched.host1.eth0, self.matched.host1.eth1,
self.matched.host2.eth0]
+
+ @property
+ def no_pause_frames_dev_list(self):
+ return [self.matched.host1.eth0, self.matched.host1.eth1, self.matched.host2.eth0]
--
2.24.1
3 years, 5 months
[PATCH] docs: add requirements file
by olichtne@redhat.com
From: Ondrej Lichtner <olichtne(a)redhat.com>
I need to point readthedocs to _some_ requirements file but the default
one tries to install libvirt and ethtool which doesn't work...
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
docs/requirements.txt | 1 +
1 file changed, 1 insertion(+)
create mode 100644 docs/requirements.txt
diff --git a/docs/requirements.txt b/docs/requirements.txt
new file mode 100644
index 0000000..6966869
--- /dev/null
+++ b/docs/requirements.txt
@@ -0,0 +1 @@
+sphinx
--
2.26.2
3 years, 5 months
[PATCH] docs: add autodoc_mock_imports
by olichtne@redhat.com
From: Ondrej Lichtner <olichtne(a)redhat.com>
These external dependencies are not needed to build the documentation
and cause problems in the readthedocs build environment. Mainly ethtool
and libvirt cannot be installed at all due to depending on C modules.
The others ar ejust unnecessary so I added them to make the environment
slightly lighter.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
docs/source/conf.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 34fa73e..e8784ca 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -65,4 +65,6 @@
autodoc_inherit_docstrings = False
+autodoc_mock_imports = ["pyroute2", "libvirt", "ethtool", "lxml", "yaml"]
+
master_doc = "index"
--
2.26.2
3 years, 5 months
[PATCH] Fixed teamd command string
by pgagne@redhat.com
From: Perry Gagne <pgagne(a)redhat.com>
The arg to exec_cmd was evaluating to empty string.
Probably due to the order of operations of if ... else ...
Reworked it so it does what we expect
Signed-off-by: Perry Gagne <pgagne(a)redhat.com>
---
lnst/Devices/TeamDevice.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lnst/Devices/TeamDevice.py b/lnst/Devices/TeamDevice.py
index 6be7841..f4e7101 100644
--- a/lnst/Devices/TeamDevice.py
+++ b/lnst/Devices/TeamDevice.py
@@ -47,8 +47,10 @@ class TeamDevice(MasterDevice):
def _create(self):
teamd_json = json.dumps(self.config)
- exec_cmd(f"teamd -r -d -c '{teamd_json}' -t {self.name}"
- " -D" if self.dbus else "")
+ cmd = f"teamd -r -d -c '{teamd_json}' -t {self.name}"
+ if self.dbus:
+ cmd += " -D"
+ exec_cmd(cmd)
retry = 0
while self._nl_msg is None and retry < 5:
--
2.21.1
3 years, 5 months
[ANNOUNCEMENT] Github repository moved under LNST-project
organization
by Ondrej Lichtner
Hi all,
we have just moved the github repository of the project from the
original location to a new one under a newly created github organization
for the LNST project.
original location: https://github.com/jpirko/lnst
new location: https://github.com/LNST-project/lnst
The old url should automatically forward you to the new location so
nothing should break at this point. But it would be advisable to update
your git remote urls to avoid confusion or possible problems if github
stops forwarding the original location.
The reason for the move is so that we have better flexibility in
assigning access rights to the repositories, for example to configure a
webhook to host documentation on readthedocs.org
-Ondrej
3 years, 5 months
[PATCH] docs: turn off inheritance of parent docstrings
by Jan Tluka
By default autodoc includes parent classes docstrings in child classes
documentation. This patch adds autodoc_ineritance_docstrings to autodoc
config to turn this feature off.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
docs/source/conf.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 2f228ba0..34fa73e5 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -63,4 +63,6 @@ autodoc_default_options = {
'member-order': 'bysource',
}
+autodoc_inherit_docstrings = False
+
master_doc = "index"
--
2.21.1
3 years, 5 months