[lnst trac] #80: Add new CLI options to man pages
by fedora-badges
#80: Add new CLI options to man pages
-------------------------------------+-----------------------------
Reporter: rpazdera | Owner:
Type: defect | Status: new
Priority: blocker | Milestone: Stable Release
Component: lnst-ctl and lnst-slave | Version: git
Keywords: | Blocked By:
Blocking: |
-------------------------------------+-----------------------------
There has been some changes/additions of the CLI options of both lnst-ctl
and lnst-slave. The man pages should be updated accordingly.
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/80>
lnst <https://fedorahosted.org/lnst/>
Linux Network Stack Test
10 years, 8 months
[lnst trac] #81: lnst-ctl fails with a stack trace when run with no arguments
by fedora-badges
#81: lnst-ctl fails with a stack trace when run with no arguments
----------------------+-----------------------------
Reporter: rpazdera | Owner:
Type: defect | Status: new
Priority: major | Milestone: Stable Release
Component: lnst-ctl | Version: git
Keywords: | Blocked By:
Blocking: |
----------------------+-----------------------------
The problem:
{{{
# lnst-ctl
Traceback (most recent call last):
File "/usr/bin/lnst-ctl", line 189, in <module>
main()
File "/usr/bin/lnst-ctl", line 145, in main
action = args.pop()
IndexError: pop from empty list
}}}
Expected results: print usage
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/81>
lnst <https://fedorahosted.org/lnst/>
Linux Network Stack Test
10 years, 8 months
[lnst trac] #82: Bash completion for LNST
by fedora-badges
#82: Bash completion for LNST
-------------------------------------+------------------
Reporter: rpazdera | Owner:
Type: task | Status: new
Priority: minor | Milestone:
Component: lnst-ctl and lnst-slave | Version:
Keywords: | Blocked By:
Blocking: |
-------------------------------------+------------------
We could create a bash completion script for both lnst-ctl and lnst-slave
that would be installed with the LNST packages in Fedora.
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/82>
lnst <https://fedorahosted.org/lnst/>
Linux Network Stack Test
10 years, 8 months
[lnst trac] #64: Add Support for Configuration via NetworkManager
by fedora-badges
#64: Add Support for Configuration via NetworkManager
-------------------------------------+------------------
Reporter: rpazdera | Owner:
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: lnst-ctl and lnst-slave | Version: git
Keywords: | Blocked By:
Blocking: |
-------------------------------------+------------------
LNST at the moment doesn't work well with NetworkManager, which must be
disabled in order for LNST to operate properly.
Based on discussions with Pavlix, the problems we've been having with NM
should be all solved now, so it would be nice to add support for network
manager as well.
The options are to use libnm-glib or the dbus interface directly from
python.
However, we need to support older RHEL6 versions as well, so we need to
keep the current configuration routines as a fallback.
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/64>
lnst <https://fedorahosted.org/lnst/>
Linux Network Stack Test
10 years, 8 months
[lnst trac] #55: XML Schema Definition for LNST Recipe Syntax
by fedora-badges
#55: XML Schema Definition for LNST Recipe Syntax
----------------------+------------------
Reporter: rpazdera | Owner:
Type: task | Status: new
Priority: major | Milestone:
Component: lnst-ctl | Version:
Keywords: | Blocked By:
Blocking: |
----------------------+------------------
It would be great if we had a scheme definition for recipes and machine
configs. It could be used for preliminary validation. Also VIM >= 7 should
support syntax checking and even completion based on this definitions!
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/55>
lnst <https://fedorahosted.org/lnst/>
Linux Network Stack Test
10 years, 8 months
[lnst trac] #50: Wiki article: How to Structure LNST Recipes
by fedora-badges
#50: Wiki article: How to Structure LNST Recipes
----------------------+------------------------------------------
Reporter: rpazdera | Owner:
Type: task | Status: new
Priority: major | Milestone: Complete Wiki Documentation
Component: wiki | Version:
Keywords: | Blocked By:
Blocking: |
----------------------+------------------------------------------
This article should cover everything about lnst recipe creation from a
point of view of an inexperienced LNST user.
It should be easy to understand and not too technical. It doesn't have to
cover the topic completely, but it should give enough information for a
newcomer.
This article should incorporate the topic in the 4th section of the LNST
Intro document.
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/50>
lnst <https://fedorahosted.org/lnst/>
Linux Network Stack Test
10 years, 8 months
[lnst trac] #52: Wiki article: Machine Config XML Reference
by fedora-badges
#52: Wiki article: Machine Config XML Reference
----------------------+------------------------------------------
Reporter: rpazdera | Owner:
Type: task | Status: new
Priority: major | Milestone: Complete Wiki Documentation
Component: wiki | Version:
Keywords: | Blocked By:
Blocking: |
----------------------+------------------------------------------
There should be a separate reference for the XML format of machine configs
that belong to a pool directory. It should be a brief enumeration of
values for advanced users (the guide for beginners will be placed
separately).
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/52>
lnst <https://fedorahosted.org/lnst/>
Linux Network Stack Test
10 years, 8 months
[lnst] NmConfigDevice: better detection of nm_managed
by Jiří Pírko
commit 5ad9dfbfffeeb5a03cd8394f6559fd06e94795eb
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Wed Jul 31 09:07:32 2013 +0200
NmConfigDevice: better detection of nm_managed
This commit adds functionality to the slave. Now when checking the
Managed property of a device if the device doesn't exist yet, we check
the slave devices first and if they are all not managed we declare that
the master device is also not managed. The same goes for all slaves
being managed.
This gives us a bit more flexibility when trying to mix NM configuration
with the traditional one.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Slave/NmConfigDevice.py | 39 +++++++++++++++++++++++++++++++--------
1 files changed, 31 insertions(+), 8 deletions(-)
---
diff --git a/lnst/Slave/NmConfigDevice.py b/lnst/Slave/NmConfigDevice.py
index c743ce8..7a236f9 100644
--- a/lnst/Slave/NmConfigDevice.py
+++ b/lnst/Slave/NmConfigDevice.py
@@ -54,6 +54,12 @@ def is_nm_managed_by_name(dev_name):
dev_props = dbus.Interface(dev, "org.freedesktop.DBus.Properties")
return dev_props.Get(IF_PRE + ".Device", "Managed")
+def _dev_exists(hwaddr):
+ devnames = scan_netdevs()
+ for dev in devnames:
+ if dev["hwaddr"] == hwaddr:
+ return True
+
class NmConfigDeviceGeneric(object):
'''
Generic class for device manipulation all type classes should
@@ -234,11 +240,10 @@ class NmConfigDeviceEth(NmConfigDeviceGeneric):
@classmethod
def is_nm_managed(cls, netdev, config):
managed = super(NmConfigDeviceEth, cls).is_nm_managed(netdev, config)
- devnames = scan_netdevs()
- for dev in devnames:
- if dev["hwaddr"] == netdev["hwaddr"]:
- return managed
- return False
+ if _dev_exists(netdev["hwaddr"]):
+ return managed
+ else:
+ return False
def up(self):
netdev = self._netdev
@@ -302,7 +307,13 @@ class NmConfigDeviceBond(NmConfigDeviceGeneric):
@classmethod
def is_nm_managed(cls, netdev, config):
- managed = super(NmConfigDeviceBond, cls).is_nm_managed(netdev, config)
+ if _dev_exists(netdev["hwaddr"]):
+ managed = super(NmConfigDeviceBond, cls).is_nm_managed(netdev,
+ config)
+ else:
+ slave_id = get_slaves(netdev)[1]
+ netdev = config[slave_id]
+ managed = is_nm_managed(netdev, config)
for slave in get_slaves(netdev):
netdev = config[slave]
@@ -429,7 +440,13 @@ class NmConfigDeviceBridge(NmConfigDeviceGeneric):
@classmethod
def is_nm_managed(cls, netdev, config):
- managed = super(NmConfigDeviceBridge, cls).is_nm_managed(netdev, config)
+ if _dev_exists(netdev["hwaddr"]):
+ managed = super(NmConfigDeviceBond, cls).is_nm_managed(netdev,
+ config)
+ else:
+ slave_id = get_slaves(netdev)[1]
+ netdev = config[slave_id]
+ managed = is_nm_managed(netdev, config)
for slave in get_slaves(netdev):
netdev = config[slave]
@@ -560,7 +577,13 @@ class NmConfigDeviceVlan(NmConfigDeviceGeneric):
@classmethod
def is_nm_managed(cls, netdev, config):
- managed = super(NmConfigDeviceVlan, cls).is_nm_managed(netdev, config)
+ if _dev_exists(netdev["hwaddr"]):
+ managed = super(NmConfigDeviceBond, cls).is_nm_managed(netdev,
+ config)
+ else:
+ slave_id = get_slaves(netdev)[1]
+ netdev = config[slave_id]
+ managed = is_nm_managed(netdev, config)
for slave in get_slaves(netdev):
slave_netdev = config[slave]
10 years, 8 months
[lnst] NetConfigDevice: is_nm_managed_by_name checks use_nm option
by Jiří Pírko
commit 77aaf422c621b0c61dc2724674364c5886cc5afe
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Wed Jul 31 09:07:24 2013 +0200
NetConfigDevice: is_nm_managed_by_name checks use_nm option
The function is_nm_managed_by_name now checks both if NM is running and
if the option use_nm is set to True.
I made this change so that I could delete a few lines where we check
these parameters.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Slave/NetConfigDevice.py | 8 ++------
lnst/Slave/NetTestSlave.py | 4 +---
lnst/Slave/NmConfigDevice.py | 4 +++-
3 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py
index 27f4cb3..91dce5e 100644
--- a/lnst/Slave/NetConfigDevice.py
+++ b/lnst/Slave/NetConfigDevice.py
@@ -298,9 +298,7 @@ def NetConfigDevice(netdev, config):
'''
Class dispatcher
'''
- if check_process_running("NetworkManager") and \
- lnst_config.get_option("environment", "use_nm") and \
- is_nm_managed(netdev, config):
+ if is_nm_managed(netdev, config):
return nm_type_class_mapping[netdev["type"]](netdev, config)
else:
return type_class_mapping[netdev["type"]](netdev, config)
@@ -309,9 +307,7 @@ def NetConfigDeviceType(netdev, config):
'''
Class dispatcher for classmethods
'''
- if check_process_running("NetworkManager") and \
- lnst_config.get_option("environment", "use_nm") and \
- is_nm_managed(netdev, config):
+ if is_nm_managed(netdev, config):
return nm_type_class_mapping[netdev["type"]]
else:
return type_class_mapping[netdev["type"]]
diff --git a/lnst/Slave/NetTestSlave.py b/lnst/Slave/NetTestSlave.py
index 272cb76..4775a42 100644
--- a/lnst/Slave/NetTestSlave.py
+++ b/lnst/Slave/NetTestSlave.py
@@ -118,9 +118,7 @@ class SlaveMethods:
devs = self.get_devices_by_hwaddr(hwaddr)
for dev in devs:
- if check_process_running("NetworkManager") and \
- lnst_config.get_option("environment", "use_nm") and \
- is_nm_managed_by_name(dev["name"]):
+ if is_nm_managed_by_name(dev["name"]):
bus = dbus.SystemBus()
nm_obj = bus.get_object("org.freedesktop.NetworkManager",
"/org/freedesktop/NetworkManager")
diff --git a/lnst/Slave/NmConfigDevice.py b/lnst/Slave/NmConfigDevice.py
index bf08afd..c743ce8 100644
--- a/lnst/Slave/NmConfigDevice.py
+++ b/lnst/Slave/NmConfigDevice.py
@@ -23,6 +23,7 @@ from lnst.Slave.NetConfigCommon import get_slaves, get_option, get_slave_option
from lnst.Common.Utils import kmod_in_use, bool_it
from lnst.Common.NetUtils import scan_netdevs
from lnst.Common.Utils import check_process_running
+from lnst.Common.Config import lnst_config
NM_BUS = "org.freedesktop.NetworkManager"
OBJ_PRE = "/org/freedesktop/NetworkManager"
@@ -34,7 +35,8 @@ _DEV_UNAVAILABLE = 20
_DEV_DISCONNECTED = 30
def is_nm_managed_by_name(dev_name):
- if not check_process_running("NetworkManager"):
+ if not check_process_running("NetworkManager") or\
+ not lnst_config.get_option("environment", "use_nm"):
return False
bus = dbus.SystemBus()
10 years, 8 months