<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7601.19038"></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt 微软雅黑"><BR><BR>>>> Cole Robinson <crobinso@redhat.com> 2017/2/6 星期一 上午 5:39 >>><BR>>On 01/20/2017 02:42 AM, Lin Ma wrote:<BR>>> Because a bridge xml doesn't include its own mac item, what it contains<BR>>> are the slave devices's mac, It causes the get_xmlobj().macaddr can't<BR>>> return the mac address of bridge.<BR>>> <BR>>> So while showing host details, The bridge's mac address is displayed as<BR>>> 'Unknown' in tab 'Network Interfaces'. Say virbr0, We known a dummp tap<BR>>> was already connected to it to maintain a fixed mac address for virbr0,<BR>>> But its mac is displayed as 'Unknown' in tab 'Network Interfaces'.<BR>>> <BR>>> The patch fixed the issue by returning mac from backend instead of xml.<BR>>> <BR>>> Signed-off-by: Lin Ma <lma@suse.com><BR>>> ---<BR>>>  virtManager/interface.py | 2 +-<BR>>>  1 file changed, 1 insertion(+), 1 deletion(-)<BR>>> <BR>>> diff --git a/virtManager/interface.py b/virtManager/interface.py<BR>>> index 3af5974..626465e 100644<BR>>> --- a/virtManager/interface.py<BR>>> +++ b/virtManager/interface.py<BR>>> @@ -81,7 +81,7 @@ class vmmInterface(vmmLibvirtObject):<BR>>>      ################<BR>>>  <BR>>>      def get_mac(self):<BR>>> -        return self.get_xmlobj().macaddr<BR>>> +        return self._backend.MACString()<BR>>>  <BR>>>      def is_bridge(self):<BR>>>          typ = self.get_type()<BR>>> <BR>><BR>>Sorry for the review delay. This seems like a libvirt or netcf bug, it should<BR>>be showing that mac address in the XML, we shouldn't need to resort to an API<BR>>call for this info.<BR>><BR>>Plus we try really hard to avoid sprinkling around API calls like this, since<BR>>it really slows down the app on remote connections. If the libvirt fix doesn't<BR>>happen, we probably want to cache this info rather than look it up on demand<BR>>all the time.<BR><BR>
<DIV>OK, Thanks for your review.</DIV>
<DIV> </DIV>
<DIV>Lin</DIV></BODY></HTML>