daemon/core/misc/xmlwriter1.py
def addAddresses(self, ifcObj):
        '''
        Add MAC and IP addresses to interface XML elements.
        '''
        if ifcObj.hwaddr:
            h = self.createElement("address")
            self.appendChild(h)
            h.setAttribute("type", "mac")
            htxt = self.createTextNode("%s" % ifcObj.hwaddr)
            h.appendChild(htxt)
        for addr in ifcObj.addrlist:
            a = self.createElement("address")
            self.appendChild(a)
            (ip, sep, mask)  = addr.partition('/')
            # mask = int(mask) XXX?
            if isIPv4Address(ip):
                a.setAttribute("type", "IPv4")
            else:
                a.setAttribute("type", "IPv6")

            # a.setAttribute("type", )
            atxt = self.createTextNode("%s" % addr)
            a.appendChild(atxt)

        Add MAC and IP addresses to interface XML elements.
        
Add MAC and IP addresses to interface XML elements.
Add MAC and IP addresses to interface XML elements .
def addAddresses(self, ifcObj):
        if ifcObj.hwaddr:
            h = self.createElement("address")
            self.appendChild(h)
            h.setAttribute("type", "mac")
            htxt = self.createTextNode("%s" % ifcObj.hwaddr)
            h.appendChild(htxt)
        for addr in ifcObj.addrlist:
            a = self.createElement("address")
            self.appendChild(a)
            (ip, sep, mask)  = addr.partition('/')
            if isIPv4Address(ip):
                a.setAttribute("type", "IPv4")
            else:
                a.setAttribute("type", "IPv6")
            atxt = self.createTextNode("%s" % addr)
            a.appendChild(atxt)
def addAddresses ( self , ifcObj ) : if ifcObj . hwaddr : h = self . createElement ( "address" ) self . appendChild ( h ) h . setAttribute ( "type" , "mac" ) htxt = self . createTextNode ( "%s" % ifcObj . hwaddr ) h . appendChild ( htxt ) for addr in ifcObj . addrlist : a = self . createElement ( "address" ) self . appendChild ( a ) ( ip , sep , mask ) = addr . partition ( '/' ) if isIPv4Address ( ip ) : a . setAttribute ( "type" , "IPv4" ) else : a . setAttribute ( "type" , "IPv6" ) atxt = self . createTextNode ( "%s" % addr ) a . appendChild ( atxt )
Add MAC and IP addresses to interface XML elements.
Add MAC and IP addresses to interface XML elements .
'''
        Add MAC and IP addresses to interface XML elements.
        ''' # mask = int(mask) XXX? # a.setAttribute("type", )
self
ifcObj