dect
/
libnl
Archived
13
0
Fork 0

rtnl_link_(get|set)_weight is deprecated in libnl.

So, remove from python binding. Should not break compatibility.
This commit is contained in:
Коренберг Марк (ноутбук дома) 2012-06-08 02:59:03 +06:00
parent 87d370912c
commit dca358c6a2
2 changed files with 0 additions and 21 deletions

View File

@ -104,9 +104,6 @@ extern unsigned int rtnl_link_get_mtu(struct rtnl_link *);
extern void rtnl_link_set_txqlen(struct rtnl_link *, unsigned int);
extern unsigned int rtnl_link_get_txqlen(struct rtnl_link *);
extern void rtnl_link_set_weight(struct rtnl_link *, unsigned int);
extern unsigned int rtnl_link_get_weight(struct rtnl_link *);
extern void rtnl_link_set_ifindex(struct rtnl_link *, int);
extern int rtnl_link_get_ifindex(struct rtnl_link *);

View File

@ -297,24 +297,6 @@ class Link(netlink.Object):
def txqlen(self, value):
capi.rtnl_link_set_txqlen(self._rtnl_link, int(value))
@property
@netlink.nlattr(type=str, fmt=util.string)
def weight(self):
"""Weight"""
v = capi.rtnl_link_get_weight(self._rtnl_link)
if v == 4294967295:
return 'max'
else:
return str(v)
@weight.setter
def weight(self, value):
if value == 'max':
v = 4294967295
else:
v = int(value)
capi.rtnl_link_set_weight(self._rtnl_link, v)
@property
@netlink.nlattr(type=str, immutable=True, fmt=util.string)
def arptype(self):