[PATCH 1/1] etherinfo: Add more information
by asegurap@redhat.com
Up until now not all the existing information that was in etherinfo
was exposed and some typical device information was missing.
This patch adds the most common information for vlan/macvlan and
other devices.
It also adds formal etherinfo member definitions for the fields that
are always present so that it is easier to discover those fields
using something like ipython (and it saves us else ifs in the attr
getter).
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
python-ethtool/etherinfo.c | 58 ++++++++++++++++++++++++++
python-ethtool/etherinfo_obj.c | 86 ++++++++++++++++++++++++++++++++-------
python-ethtool/etherinfo_struct.h | 10 ++++-
python-ethtool/ethtool.c | 7 +---
4 files changed, 140 insertions(+), 21 deletions(-)
diff --git a/python-ethtool/etherinfo.c b/python-ethtool/etherinfo.c
index c5e6798..0775342 100644
--- a/python-ethtool/etherinfo.c
+++ b/python-ethtool/etherinfo.c
@@ -29,6 +29,7 @@
#include <netlink/route/addr.h>
#include <netlink/route/link.h>
#include <netlink/route/rtnl.h>
+#include <netlink/route/link/vlan.h>
#include <assert.h>
#include <errno.h>
#include <pthread.h>
@@ -42,6 +43,43 @@
*/
+/*
+ * Gets the name of a device from its Netlink index.
+ *
+ * @param link_index The netlink index of the device.
+ *
+ * @return NULL if the device does not exist, a PyString with the device name
+ * otherwise.
+ */
+static PyObject * _nl_i2name(int link_index)
+{
+ struct nl_cache *link_cache;
+ char buff[16];
+ char *link_name;
+ PyObject * result = NULL;
+
+ /* Find the interface index we're looking up.
+ * As we don't expect it to change, we're reusing a "cached"
+ * interface index if we have that
+ */
+ if( link_index > 0 ) {
+ if( rtnl_link_alloc_cache(get_nlc(), AF_UNSPEC, &link_cache) < 0) {
+ return NULL;
+ }
+
+ memset(&buff, 0, 16);
+ link_name = rtnl_link_i2name(link_cache, link_index, buff, sizeof(buff));
+ if( link_name == NULL ) {
+ nl_cache_free(link_cache);
+ return NULL;
+ }
+ result = PyString_FromString(link_name);
+ nl_cache_free(link_cache);
+ }
+ return result;
+}
+
+
/**
* libnl callback function. Does the real parsing of a record returned by NETLINK. This function
* parses LINK related packets
@@ -65,6 +103,26 @@ static void callback_nl_link(struct nl_object *obj, void *arg)
Py_XDECREF(ethi->hwaddress);
}
ethi->hwaddress = PyString_FromFormat("%s", hwaddr);
+ if( ethi->type ) {
+ Py_XDECREF(ethi->type);
+ }
+ ethi->type = PyString_FromString(rtnl_link_get_type(link));
+ if( ethi->qdisc ) {
+ Py_XDECREF(ethi->qdisc);
+ }
+ ethi->qdisc = PyString_FromString(rtnl_link_get_qdisc(link));
+ ethi->flags = rtnl_link_get_flags(link);
+ ethi->mtu = rtnl_link_get_mtu(link);
+
+ if( ethi->link ) {
+ Py_XDECREF(ethi->link);
+ }
+ ethi->link = _nl_i2name(rtnl_link_get_link(link));
+ if( ethi->master ) {
+ Py_XDECREF(ethi->master);
+ }
+ ethi->master = _nl_i2name(rtnl_link_get_master(link));
+ ethi->vlan_id = rtnl_link_vlan_get_id(link);
}
diff --git a/python-ethtool/etherinfo_obj.c b/python-ethtool/etherinfo_obj.c
index f620157..574f654 100644
--- a/python-ethtool/etherinfo_obj.c
+++ b/python-ethtool/etherinfo_obj.c
@@ -41,6 +41,11 @@ static void _ethtool_etherinfo_dealloc(PyEtherInfo *self)
close_netlink(self);
Py_XDECREF(self->device); self->device = NULL;
Py_XDECREF(self->hwaddress); self->hwaddress = NULL;
+ Py_XDECREF(self->type); self->type = NULL;
+ Py_XDECREF(self->link); self->state = NULL;
+ Py_XDECREF(self->master); self->state = NULL;
+ Py_XDECREF(self->qdisc); self->qdisc = NULL;
+ Py_XDECREF(self->state); self->state = NULL;
self->ob_type->tp_free((PyObject*)self);
}
@@ -95,18 +100,7 @@ PyObject *_ethtool_etherinfo_getter(PyEtherInfo *self, PyObject *attr_o)
return NULL;
}
- if( strcmp(attr, "device") == 0 ) {
- if( self->device ) {
- Py_INCREF(self->device);
- return self->device;
- } else {
- return Py_INCREF(Py_None), Py_None;
- }
- } else if( strcmp(attr, "mac_address") == 0 ) {
- get_etherinfo_link(self);
- Py_INCREF(self->hwaddress);
- return self->hwaddress;
- } else if( strcmp(attr, "ipv4_address") == 0 ) {
+ if( strcmp(attr, "ipv4_address") == 0 ) {
addrlist = get_etherinfo_address(self, NLQRY_ADDR4);
/* For compatiblity with old approach, return last IPv4 address: */
py_addr = get_last_ipv4_address(addrlist);
@@ -134,6 +128,12 @@ PyObject *_ethtool_etherinfo_getter(PyEtherInfo *self, PyObject *attr_o)
}
}
Py_RETURN_NONE;
+ } else if( strcmp(attr, "underlying_device") == 0 ) {
+ return self->link;
+ } else if( strcmp(attr, "master_device") == 0 ) {
+ return self->master;
+ } else if( (strcmp(attr, "vlan_id") == 0) && self->vlan_id >= 0 ) {
+ return PyLong_FromLong(self->vlan_id);
} else {
return PyObject_GenericGetAttr((PyObject *)self, attr_o);
}
@@ -173,8 +173,6 @@ PyObject *_ethtool_etherinfo_str(PyEtherInfo *self)
return NULL;
}
- get_etherinfo_link(self);
-
ret = PyString_FromFormat("Device ");
PyString_Concat(&ret, self->device);
PyString_ConcatAndDel(&ret, PyString_FromString(":\n"));
@@ -258,6 +256,42 @@ static PyObject *_ethtool_etherinfo_get_ipv6_addresses(PyEtherInfo *self, PyObje
/**
+ * Create a new etherinfo object
+ */
+static PyObject *_ethtool_etherinfo_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
+ PyEtherInfo *self;
+ self = (PyEtherInfo *)type->tp_alloc(type, 0);
+ return (PyObject *)self;
+}
+
+
+/**
+ * Constructor of the etherinfo object
+ */
+static int _ethtool_etherinfo_init(PyEtherInfo * self, PyObject *args, PyObject *kwds) {
+ PyObject *name, *tmp;
+
+ if( !PyArg_ParseTuple(args, "|O", &name) )
+ return -1;
+
+ if( !name )
+ return -1;
+
+ tmp = self->device;
+ Py_INCREF(name);
+ self->device = name;
+ Py_XDECREF(tmp);
+
+ self->index = -1;
+ self->vlan_id = -1;
+ self->link = NULL;
+ get_etherinfo_link(self);
+
+ return 0;
+}
+
+
+/**
* Defines all available methods in the ethtool.etherinfo class
*
*/
@@ -268,6 +302,25 @@ static PyMethodDef _ethtool_etherinfo_methods[] = {
"Retrieve configured IPv6 addresses. Returns a list of NetlinkIPaddress objects"},
{NULL} /**< No methods defined */
};
+static PyMemberDef _ethtool_etherinfo_members[] = {
+ {"name", T_OBJECT_EX, offsetof(PyEtherInfo, device), 0,
+ "Name of the device"},
+ {"mac_address", T_OBJECT_EX, offsetof(PyEtherInfo, hwaddress), 0,
+ "MAC address of the device"},
+ {"type", T_OBJECT_EX, offsetof(PyEtherInfo, type), 0,
+ "Name of the type of the device"},
+ {"qdisc", T_OBJECT_EX, offsetof(PyEtherInfo, qdisc), 0,
+ "Name of the qdisc of the device"},
+ {"state", T_OBJECT_EX, offsetof(PyEtherInfo, qdisc), 0,
+ "Textual representation of the state of the device"},
+ {"index", T_INT, offsetof(PyEtherInfo, index), 0,
+ "Numeric index of the device"},
+ {"flags", T_INT, offsetof(PyEtherInfo, flags), 0,
+ "Flags of the device"},
+ {"mtu", T_INT, offsetof(PyEtherInfo, mtu), 0,
+ "MTU of the device"},
+ {NULL} /* Sentinel */
+};
/**
* Definition of the functions a Python class/object requires.
@@ -283,6 +336,9 @@ PyTypeObject PyEtherInfo_Type = {
.tp_getattro = (getattrofunc)_ethtool_etherinfo_getter,
.tp_setattro = (setattrofunc)_ethtool_etherinfo_setter,
.tp_methods = _ethtool_etherinfo_methods,
- .tp_doc = "Contains information about a specific ethernet device"
+ .tp_members = _ethtool_etherinfo_members,
+ .tp_doc = "Contains information about a specific ethernet device",
+ .tp_init = (initproc)_ethtool_etherinfo_init,
+ .tp_new = _ethtool_etherinfo_new,
};
diff --git a/python-ethtool/etherinfo_struct.h b/python-ethtool/etherinfo_struct.h
index bcad291..86fd9d3 100644
--- a/python-ethtool/etherinfo_struct.h
+++ b/python-ethtool/etherinfo_struct.h
@@ -47,8 +47,16 @@ extern PyTypeObject ethtool_netlink_ip_address_Type;
typedef struct {
PyObject_HEAD
PyObject *device; /**< Device name */
- int index; /**< NETLINK index reference */
PyObject *hwaddress; /**< string: HW address / MAC address of device */
+ PyObject *type; /**< string: Name of the type of the device. */
+ PyObject *link; /**< string: Name of the underlying device of a vlan device. */
+ PyObject *master; /**< string: Name of the master device (Bond or bridge over the device. */
+ PyObject *qdisc; /**< string: qdisc of device */
+ PyObject *state; /**< string: textual representation of the device operstate */
+ int index; /**< NETLINK index reference */
+ int flags; /**< integer with the device flags */
+ int mtu; /**< integer with the device Maximum Transmission Unit */
+ int vlan_id; /**< integer id of the vlan device if it is a vlan device */
unsigned short nlc_active; /**< Is this instance using NETLINK? */
} PyEtherInfo;
diff --git a/python-ethtool/ethtool.c b/python-ethtool/ethtool.c
index 453f08b..6f2b440 100644
--- a/python-ethtool/ethtool.c
+++ b/python-ethtool/ethtool.c
@@ -273,16 +273,13 @@ static PyObject *get_interfaces_info(PyObject *self __unused, PyObject *args) {
/* Store the device name and a reference to the NETLINK connection for
* objects to use when quering for device info
*/
-
- dev = PyObject_New(PyEtherInfo, &PyEtherInfo_Type);
+ PyObject *arglist = Py_BuildValue("(s)", fetch_devs[i]);
+ dev = (PyEtherInfo *) PyObject_CallObject((PyObject *) &PyEtherInfo_Type, arglist);
if( !dev ) {
PyErr_SetString(PyExc_OSError, strerror(errno));
free(fetch_devs);
return NULL;
}
- dev->device = PyString_FromString(fetch_devs[i]);
- dev->hwaddress = NULL;
- dev->index = -1;
/* Append device object to the device list */
PyList_Append(devlist, (PyObject *)dev);
--
1.8.4.2
10 years, 3 months
Re: [PATCH applied] exceptions: Simplify errno derived exception handling
by David Sommerseth
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Your patch has been applied to the master branch.
commit 505bca305c4c0e2d3a29e24b27bf03c358db11cf
Author: Antoni S. Puimedon
Date: Fri Jan 17 23:27:42 2014 +0100
exceptions: Simplify errno derived exception handling
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
Acked-by: David Sommerseth <davids(a)redhat.com>
Message-Id: 1389997662-8460-1-git-send-email-asegurap(a)redhat.com
Signed-off-by: David Sommerseth <davids(a)redhat.com>
- --
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEARECAAYFAlLe0YcACgkQIIWEatLf4HedYACfQgd0AKQIExivTL6mkNzl56vj
g8kAnA1kq4tb95a1dM6E+b++12yKJUCv
=v8IC
-----END PGP SIGNATURE-----
10 years, 3 months
[PATCH 1/1] exceptions: Simplify errno derived exception handling
by asegurap@redhat.com
Errnos are missing from some exceptions and in others the code could
be simplified by just using the convenience method PyErr_FromErrno.
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
python-ethtool/ethtool.c | 90 ++++++++++++++----------------------------------
1 file changed, 25 insertions(+), 65 deletions(-)
diff --git a/python-ethtool/ethtool.c b/python-ethtool/ethtool.c
index 6f2b440..7fd49ad 100644
--- a/python-ethtool/ethtool.c
+++ b/python-ethtool/ethtool.c
@@ -55,10 +55,8 @@ static PyObject *get_active_devices(PyObject *self __unused, PyObject *args __un
PyObject *list;
struct ifaddrs *ifaddr, *ifa;
- if (getifaddrs(&ifaddr) == -1) {
- PyErr_SetString(PyExc_OSError, strerror(errno));
- return NULL;
- }
+ if (getifaddrs(&ifaddr) == -1)
+ return PyErr_SetFromErrno(PyExc_OSError);
list = PyList_New(0);
for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
@@ -83,15 +81,13 @@ static PyObject *get_devices(PyObject *self __unused, PyObject *args __unused)
FILE *fd = fopen(_PATH_PROCNET_DEV, "r");
if (fd == NULL) {
- PyErr_SetString(PyExc_OSError, strerror(errno));
- return NULL;
+ return PyErr_SetFromErrno(PyExc_OSError);
}
/* skip over first two lines */
ret = fgets(buffer, 256, fd);
ret = fgets(buffer, 256, fd);
if( !ret ) {
- PyErr_SetString(PyExc_OSError, strerror(errno));
- return NULL;
+ return PyErr_SetFromErrno(PyExc_OSError);
}
while (!feof(fd)) {
@@ -134,18 +130,13 @@ static PyObject *get_hwaddress(PyObject *self __unused, PyObject *args)
/* Open control socket. */
fd = socket(AF_INET, SOCK_DGRAM, 0);
if (fd < 0) {
- PyErr_SetString(PyExc_OSError, strerror(errno));
- return NULL;
- }
+ return PyErr_SetFromErrno(PyExc_OSError);
+ }
/* Get current settings. */
err = ioctl(fd, SIOCGIFHWADDR, &ifr);
if (err < 0) {
- char buf[2048];
- int eno = errno;
-
- snprintf(buf, sizeof(buf), "[Errno %d] %s", eno, strerror(eno));
- PyErr_SetString(PyExc_IOError, buf);
+ PyErr_SetFromErrno(PyExc_IOError);
close(fd);
return NULL;
}
@@ -181,17 +172,13 @@ static PyObject *get_ipaddress(PyObject *self __unused, PyObject *args)
/* Open control socket. */
fd = socket(AF_INET, SOCK_DGRAM, 0);
if (fd < 0) {
- PyErr_SetString(PyExc_OSError, strerror(errno));
- return NULL;
- }
+ return PyErr_SetFromErrno(PyExc_OSError);
+ }
/* Get current settings. */
err = ioctl(fd, SIOCGIFADDR, &ifr);
if (err < 0) {
- char buf[2048];
- int eno = errno;
- snprintf(buf, sizeof(buf), "[Errno %d] %s", eno, strerror(eno));
- PyErr_SetString(PyExc_IOError, buf);
+ PyErr_SetFromErrno(PyExc_IOError);
close(fd);
return NULL;
}
@@ -276,7 +263,7 @@ static PyObject *get_interfaces_info(PyObject *self __unused, PyObject *args) {
PyObject *arglist = Py_BuildValue("(s)", fetch_devs[i]);
dev = (PyEtherInfo *) PyObject_CallObject((PyObject *) &PyEtherInfo_Type, arglist);
if( !dev ) {
- PyErr_SetString(PyExc_OSError, strerror(errno));
+ PyErr_SetFromErrno(PyExc_OSError);
free(fetch_devs);
return NULL;
}
@@ -308,15 +295,11 @@ static PyObject *get_flags (PyObject *self __unused, PyObject *args)
/* Open control socket. */
fd = socket(AF_INET, SOCK_DGRAM, 0);
if (fd < 0) {
- PyErr_SetString(PyExc_OSError, strerror(errno));
- return NULL;
+ return PyErr_SetFromErrno(PyExc_OSError);
}
err = ioctl(fd, SIOCGIFFLAGS, &ifr);
if(err < 0) {
- char buf[2048];
- int eno = errno;
- snprintf(buf, sizeof(buf), "[Errno %d] %s", eno, strerror(eno));
- PyErr_SetString(PyExc_IOError, buf);
+ PyErr_SetFromErrno(PyExc_IOError);
close(fd);
return NULL;
}
@@ -345,17 +328,13 @@ static PyObject *get_netmask (PyObject *self __unused, PyObject *args)
/* Open control socket. */
fd = socket(AF_INET, SOCK_DGRAM, 0);
if (fd < 0) {
- PyErr_SetString(PyExc_OSError, strerror(errno));
- return NULL;
+ return PyErr_SetFromErrno(PyExc_OSError);
}
/* Get current settings. */
err = ioctl(fd, SIOCGIFNETMASK, &ifr);
if (err < 0) {
- char buf[2048];
- int eno = errno;
- snprintf(buf, sizeof(buf), "[Errno %d] %s", eno, strerror(eno));
- PyErr_SetString(PyExc_IOError, buf);
+ PyErr_SetFromErrno(PyExc_IOError);
close(fd);
return NULL;
}
@@ -389,17 +368,13 @@ static PyObject *get_broadcast(PyObject *self __unused, PyObject *args)
/* Open control socket. */
fd = socket(AF_INET, SOCK_DGRAM, 0);
if (fd < 0) {
- PyErr_SetString(PyExc_OSError, strerror(errno));
- return NULL;
+ return PyErr_SetFromErrno(PyExc_OSError);
}
/* Get current settings. */
err = ioctl(fd, SIOCGIFBRDADDR, &ifr);
if (err < 0) {
- char buf[2048];
- int eno = errno;
- snprintf(buf, sizeof(buf), "[Errno %d] %s", eno, strerror(eno));
- PyErr_SetString(PyExc_IOError, buf);
+ PyErr_SetFromErrno(PyExc_IOError);
close(fd);
return NULL;
}
@@ -438,16 +413,14 @@ static PyObject *get_module(PyObject *self __unused, PyObject *args)
/* Open control socket. */
fd = socket(AF_INET, SOCK_DGRAM, 0);
if (fd < 0) {
- PyErr_SetString(PyExc_OSError, strerror(errno));
- return NULL;
+ return PyErr_SetFromErrno(PyExc_OSError);
}
/* Get current settings. */
err = ioctl(fd, SIOCETHTOOL, &ifr);
if (err < 0) { /* failed? */
- int eno = errno;
- PyObject *err_obj;
+ PyErr_SetFromErrno(PyExc_IOError);
FILE *file;
int found = 0;
char driver[101], dev[101];
@@ -456,11 +429,6 @@ static PyObject *get_module(PyObject *self __unused, PyObject *args)
/* Before bailing, maybe it is a PCMCIA/PC Card? */
file = fopen("/var/lib/pcmcia/stab", "r");
if (file == NULL) {
- err_obj = Py_BuildValue("(is)", eno, strerror(eno));
- if (err_obj != NULL) {
- PyErr_SetObject(PyExc_IOError, err_obj);
- Py_DECREF(err_obj);
- }
return NULL;
}
@@ -481,14 +449,11 @@ static PyObject *get_module(PyObject *self __unused, PyObject *args)
}
fclose(file);
if (!found) {
- err_obj = Py_BuildValue("(is)", eno, strerror(eno));
- if (err_obj != NULL) {
- PyErr_SetObject(PyExc_IOError, err_obj);
- Py_DECREF(err_obj);
- }
return NULL;
- } else
+ } else {
+ PyErr_Clear();
return PyString_FromString(driver);
+ }
}
close(fd);
@@ -525,11 +490,8 @@ static PyObject *get_businfo(PyObject *self __unused, PyObject *args)
err = ioctl(fd, SIOCETHTOOL, &ifr);
if (err < 0) { /* failed? */
- int eno = errno;
+ PyErr_SetFromErrno(PyExc_IOError);
close(fd);
-
- sprintf(buf, "[Errno %d] %s", eno, strerror(eno));
- PyErr_SetString(PyExc_IOError, buf);
return NULL;
}
@@ -553,16 +515,14 @@ static int send_command(int cmd, const char *devname, void *value)
/* Open control socket. */
fd = socket(AF_INET, SOCK_DGRAM, 0), err;
if (fd < 0) {
- PyErr_SetString(PyExc_OSError, strerror(errno));
+ PyErr_SetFromErrno(PyExc_OSError);
return -1;
}
/* Get current settings. */
err = ioctl(fd, SIOCETHTOOL, &ifr);
if (err < 0) {
- char buf[2048];
- sprintf(buf, "[Errno %d] %s", errno, strerror(errno));
- PyErr_SetString(PyExc_IOError, buf);
+ PyErr_SetFromErrno(PyExc_IOError);
}
close(fd);
--
1.8.4.2
10 years, 3 months
New python-ethtool releases v0.9 and v0.10
by David Sommerseth
Hi all,
I've released source tarballs [1] and there are Fedora packages
available in the updates-testing repository with v0.9 and v0.10.
[1] <https://fedorahosted.org/releases/p/y/python-ethtool/>
Since I've completely forgotten to announce these things, I'll do both
in this e-mail with some quick changelog comments here:
* v0.9
This starts a bigger rewrite which includes moving away from libnl-1 and
over to libnl-3. It's also a bugfix too, related to IPv6 only interfaces.
This should also resolve our first trac ticket [2].
[2] <https://fedorahosted.org/python-ethtool/ticket/1>
Bohuslav Kabrda (1):
Fix get_active_devices() for IPv6 only interfaces
David Sommerseth (11):
Migrated from libnl-1 to libnl-3
Rip out the old IPv6 implementation completely
Re-implement the IPv6 support
Fix missing error checking when reading /proc/net/dev
Merge PyNetlinkIPv4Address and PyNetlinkIPv6Address classes
Remove a memory leak
Updated RPM spec file with the new dependencies
Split out generic NETLINK functions from etherinfo.c to netlink.c
Merge append_object_for_netlink_address() and
callback_nl_address()
Add missing new file in MANIFEST
Fix a memleak which would happen if querying for a non-existing
device
* v0.10
This release is more like a development milestone release than a full
stable release. I did it like this to more easily be able to debug
issues introduced in either v0.9 or v0.10, for those who are not
git-savy enough to dare a git bisect.
The v0.10 release is actually more a clean-up after all the changes in
v0.9. It tries to simplify and avoid to many wrapping layers.
David Sommerseth (17):
Update with COPYING with an updated version from FSF
More MANIFEST fixes
Make the internal MAC address a Python string object
Get rid of a single-user macro: RETURN_STRING()
Splitting up get_etherinfo() calls
Reduce the NETLINK pointer complexity
Kick out struct etherinfo_obj_data
Split out the link info from get_etherinfo()
Clean-up get_etherinfo() and move it to get_etherinfo_address()
Get rid of the internal IP address lists
Remove stray type declaration
Get rid of compiler warning
Make the device string a python object as well
Merge struct etherinfo and etherinfo_py
Simplify the ethtool.etherinfo / ethtool_etherinfoType declaration
cleanup: Rename etherinfo_py and ethtool_etherinfo_Type
Releasing v0.10
* The future
The next releases will begin to fix whatever issues appearing and add
more information available via libnl-3. I'm also considering to start
migrating over all the old get/set functions available outside the
etherinfo object. The long term idea is to do all these calls available
only via etherinfo objects, where one object is related to a single
interface.
In addition Antoni Segura Puimedon is already poking at implementing
Python 3 support as well.
I can't promise a well defined release plan, or concrete roadmap
currently. Python-ethtool is a side project for me, and I only have
limited time to work on it. However, I'm open to discuss patches and
ideas and will all apply what I find useful for this project.
Talking about community contributions, I'd like to thank Johannes
Dewender again, for improving the information on our fedorahosted.org
site [3]. Thanks a lot!
[3] <https://fedorahosted.org/python-ethtool/>
If you have any specific requests, ideas or patches ... let it flow to
the mailing list, whatever it is :)
--
kind regards,
David Sommerseth
10 years, 3 months
RFC - Stop installing pifconfig and pethtool
by David Sommerseth
Hi,
I'm currently evaluating the usefulness of pifconfig and pethtool. I
don't know how many of you who actually uses these tools. They are kind
of simplified duplicates of ifconfig and ethtool. Currently our .spec
file installs them in %{_sbindir}.
Those scripts are more like advanced example files for me, showing how
to use ethtool. However, they are not updated to use the newer object
oriented API (available via ethtool.get_interfaces_info()).
So I'm considering to just add them as documentation files, in an
examples/ directory. Will this break anything?
--
kind regards,
David Sommerseth
10 years, 3 months
Fix homepage and mention ML somewhere
by Johannes Dewender
Hello,
I am the maintainer of the python-ethtool package at Arch Linux and only
found out about the new 0.8 release after celebdor pointed me to it
(half a year later).
There is no official homepage apart from the git repository overview
(which changed) and no mentioning of this ML anywhere I know of.
Probably I didn't search hard enough, but my point is: This is far from
obvious, at least for non-fedora/Red Hat devs.
One of the wikis should probably be updated to include the current:
- repository
- official tarball location
- Mailing list
- bug tracker (red hat bugs or ML?)
The wikis I found:
https://fedoraproject.org/wiki/Python-ethtool
(Yes, this is empty, but listed in setup.py as url of the project.)
and
https://fedorahosted.org/python-ethtool/
which at least points to the correct repository.
thanks
JonnyJD
10 years, 3 months