You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 15, 2021. It is now read-only.
Hey, I have added a bond class to proc/net/bonding/init.py but I would like to know how I can get /proc/net/bonding/bond0 to match. This is the code in proc/net/bonding/init.py
"""/proc/net/bonding handlers"""
from procfs.core import File, Dict
class bond(File):
"""/proc/net/bonding/bond*
"""
def __len__(self):
return len(self.read())
def _parse(self, content):
lines = content.splitlines()
count = 0
data = Dict()
for line in lines:
if line:
key, value = line.split(':', 1)
key = key.strip().replace(' ', '_').lower()
data[key] = value.strip()
return data
If I change the class name to bond0 everything works as expected for the bond0 interface, but we have up to 10 bonds per host. Once I understand how I can get /proc/net/bonding/bond* files to create the right class I can submit a pull request. Thanks.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hey, I have added a
bond
class toproc/net/bonding/init.py
but I would like to know how I can get/proc/net/bonding/bond0
to match. This is the code inproc/net/bonding/init.py
If I change the class name to
bond0
everything works as expected for the bond0 interface, but we have up to 10 bonds per host. Once I understand how I can get/proc/net/bonding/bond*
files to create the right class I can submit a pull request. Thanks.The text was updated successfully, but these errors were encountered: