Ondřej Svoboda has uploaded a new change for review.
Change subject: ipwrapper: Make Link.flags official as they are used for RUNNING and
PROMISC
......................................................................
ipwrapper: Make Link.flags official as they are used for RUNNING and PROMISC
Since 'flags' come from libnl as an integer it makes no sense to populate
them with None though. The two said flags are used in Link's own methods and
cannot be derived from 'state' so 'flags' deserve their own attribute.
Please note that 'flags' can also be a list like ['BROADCAST',
'MULTICAST']
which should be avoided in the future by only using libnl and not parsing
iproute2's output.
pylint2 is now silent for ipwrapper.
Change-Id: Ifc9e516e28d3413274af85dc15f72cabdb64074a
Signed-off-by: Ondřej Svoboda <osvoboda(a)redhat.com>
---
M lib/vdsm/ipwrapper.py
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/21/36621/1
diff --git a/lib/vdsm/ipwrapper.py b/lib/vdsm/ipwrapper.py
index 31affaa..0a1d78d 100644
--- a/lib/vdsm/ipwrapper.py
+++ b/lib/vdsm/ipwrapper.py
@@ -121,7 +121,7 @@
def __init__(self, address, index, linkType, mtu, name, qdisc, state,
vlanid=None, vlanprotocol=None, master=None, device=None,
- **kwargs):
+ flags=None, **kwargs):
self.address = address
self.index = index
self.type = linkType
@@ -136,6 +136,8 @@
self.vlanprotocol = vlanprotocol
if device is not None:
self.device = device
+ if flags is not None:
+ self.flags = flags
for key, value in kwargs.items():
setattr(self, key, value)
--
To view, visit
http://gerrit.ovirt.org/36621
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc9e516e28d3413274af85dc15f72cabdb64074a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda(a)redhat.com>