diff options
author | Коренберг Марк (ноутбук дома) <socketpair@gmail.com> | 2012-06-08 02:59:03 +0600 |
---|---|---|
committer | Коренберг Марк (ноутбук дома) <socketpair@gmail.com> | 2012-06-08 22:26:35 +0600 |
commit | dca358c6a23e9734facc745dd097d4b539c8f438 (patch) | |
tree | 84e66465eb29f658c2ffb1f777f6404d179dcc26 /python | |
parent | 87d370912ca8fe4aa68e8fd61cfee201d959ee1b (diff) | |
download | libnl-dca358c6a23e9734facc745dd097d4b539c8f438.tar.gz |
rtnl_link_(get|set)_weight is deprecated in libnl.
So, remove from python binding. Should not break compatibility.
Diffstat (limited to 'python')
-rw-r--r-- | python/netlink/route/capi.i | 3 | ||||
-rw-r--r-- | python/netlink/route/link.py | 18 |
2 files changed, 0 insertions, 21 deletions
diff --git a/python/netlink/route/capi.i b/python/netlink/route/capi.i index ae3592d..8ac114b 100644 --- a/python/netlink/route/capi.i +++ b/python/netlink/route/capi.i @@ -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 *); diff --git a/python/netlink/route/link.py b/python/netlink/route/link.py index a537cd5..ab28f37 100644 --- a/python/netlink/route/link.py +++ b/python/netlink/route/link.py @@ -298,24 +298,6 @@ class Link(netlink.Object): 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): """Type of link (cannot be changed)""" |