From dca358c6a23e9734facc745dd097d4b539c8f438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D1=80=D0=B5=D0=BD=D0=B1=D0=B5=D1=80=D0=B3=20?= =?UTF-8?q?=D0=9C=D0=B0=D1=80=D0=BA=20=28=D0=BD=D0=BE=D1=83=D1=82=D0=B1?= =?UTF-8?q?=D1=83=D0=BA=20=D0=B4=D0=BE=D0=BC=D0=B0=29?= Date: Fri, 8 Jun 2012 02:59:03 +0600 Subject: rtnl_link_(get|set)_weight is deprecated in libnl. So, remove from python binding. Should not break compatibility. --- python/netlink/route/capi.i | 3 --- python/netlink/route/link.py | 18 ------------------ 2 files changed, 21 deletions(-) (limited to 'python') diff --git a/python/netlink/route/capi.i b/python/netlink/route/capi.i index ae3592db..8ac114b1 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 a537cd54..ab28f379 100644 --- a/python/netlink/route/link.py +++ b/python/netlink/route/link.py @@ -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): -- cgit v1.2.3