Mark Wu has uploaded a new change for review.

Change subject: Remove mac address from host interface statistics
......................................................................

Remove mac address from host interface statistics

It's unnecessary to report mac address in host interface statistics
since it's unchanged. And it's not used by engine side. So it's safe
to remove it.

Change-Id: If5c2b455387f30bfb386662fa040a82b051f153d
Signed-off-by: Mark Wu <[email protected]>
---
M vdsm/sampling.py
M vdsm_api/vdsmapi-schema.json
2 files changed, 2 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/40/13840/1

diff --git a/vdsm/sampling.py b/vdsm/sampling.py
index f68a011..7794eda 100644
--- a/vdsm/sampling.py
+++ b/vdsm/sampling.py
@@ -375,7 +375,6 @@
         self.nics, bonds, _, _ = netinfo.getInterfaces()
         self._ifids = self.nics + bonds
         self._ifrates = map(netinfo.speed, self.nics) + [0] * len(bonds)
-        self._ifmacs = [''] * len(self._ifids)  # fake ifmacs
         self._ncpus = 1
         # in bytes-per-second
         self._lineRate = (sum(self._ifrates) or 1000) * (10 ** 6) / 8
@@ -437,8 +436,7 @@
 
         rx = tx = rxDropped = txDropped = 0
         stats['network'] = {}
-        for ifid, ifrate, ifmac in zip(self._ifids, self._ifrates,
-                                       self._ifmacs):
+        for ifid, ifrate in zip(self._ifids, self._ifrates):
             ifrate = ifrate or 1000
             Mbps2Bps = (10 ** 6) / 8
             thisRx = (hs1.interfaces[ifid].rx - hs0.interfaces[ifid].rx) % \
@@ -465,7 +463,6 @@
                                       'state': iface.operstate,
                                       'rxRate': '%.1f' % rxRate,
                                       'txRate': '%.1f' % txRate,
-                                      'macAddr': ifmac,
                                       }
             rx += thisRx
             tx += thisTx
diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
index 4ff8c7a..3a37341 100644
--- a/vdsm_api/vdsmapi-schema.json
+++ b/vdsm_api/vdsmapi-schema.json
@@ -1383,15 +1383,13 @@
 #
 # @txRate:     The rate of outgoing packets (as a percentage of @speed)
 #
-# @macAddr:    The hardware address
-#
 # Since: 4.10.0
 ##
 {'type': 'NetworkInterfaceStats',
  'data': {'name': 'str', 'speed': 'uint', 'rxDropped': 'uint',
           'txDropped': 'uint', 'rxErrors': 'uint', 'txErrors': 'uint',
           'state': 'NetworkInterfaceState', 'rxRate': 'float',
-          'txRate': 'float', 'macAddr': 'str'}}
+          'txRate': 'float'}}
 
 ##
 # @StorageDomainVitals:


--
To view, visit http://gerrit.ovirt.org/13840
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5c2b455387f30bfb386662fa040a82b051f153d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to