def yang(self):
    'parsing mechanism: yang\n\n        Function yang() defines the yang type output parsing mechanism which\n        typically contains 3 steps: executing, transforming, returning\n        '
    ret = {}
    cmd = '<native><interface><Vlan/></interface></native>'
    output = self.device.get(('subtree', cmd))
    for data in output.data:
        for native in data:
            for interface in native:
                vlan_id = None
                interface_name = None
                ip_address = None
                ip_mask = None
                for vlan in interface:
                    text = vlan.tag[(vlan.tag.find('}') + 1):]
                    if (text == 'name'):
                        vlan_id = vlan.text
                        interface_name = ('Vlan' + str(vlan_id))
                        continue
                    if (text == 'ip'):
                        for ip in vlan:
                            text = ip.tag[(ip.tag.find('}') + 1):]
                            if (text == 'address'):
                                for address in ip:
                                    text = address.tag[(address.tag.find('}') + 1):]
                                    if (text == 'primary'):
                                        for primary in address:
                                            text = primary.tag[(primary.tag.find('}') + 1):]
                                            if (text == 'address'):
                                                ip_address = primary.text
                                                continue
                                            if (text == 'mask'):
                                                ip_mask = primary.text
                                                continue
                if ('interface' not in ret):
                    ret['interface'] = {}
                if (interface_name is not None):
                    ret['interface'][interface_name] = {}
                    if (vlan_id is not None):
                        ret['interface'][interface_name]['vlan_id'] = {}
                        ret['interface'][interface_name]['vlan_id'][vlan_id] = {}
                        if (ip_address is not None):
                            ret['interface'][interface_name]['vlan_id'][vlan_id]['ip_address'] = ip_address
                        else:
                            ret['interface'][interface_name]['vlan_id'][vlan_id]['ip_address'] = 'unassigned'
    return ret
parsing mechanism: yang

Function yang() defines the yang type output parsing mechanism which
typically contains 3 steps: executing, transforming, returning
def yang(self):
    'parsing mechanism: yang\n\n        Function yang() defines the yang type output parsing mechanism which\n        typically contains 3 steps: executing, transforming, returning\n        '
    ret = {}
    cmd = '<native><interface><Vlan/></interface></native>'
    output = self.device.get(('subtree', cmd))
    for data in output.data:
        for native in data:
            for interface in native:
                vlan_id = None
                interface_name = None
                ip_address = None
                ip_mask = None
                for vlan in interface:
                    text = vlan.tag[(vlan.tag.find('}') + 1):]
                    if (text == 'name'):
                        vlan_id = vlan.text
                        interface_name = ('Vlan' + str(vlan_id))
                        continue
                    if (text == 'ip'):
                        for ip in vlan:
                            text = ip.tag[(ip.tag.find('}') + 1):]
                            if (text == 'address'):
                                for address in ip:
                                    text = address.tag[(address.tag.find('}') + 1):]
                                    if (text == 'primary'):
                                        for primary in address:
                                            text = primary.tag[(primary.tag.find('}') + 1):]
                                            if (text == 'address'):
                                                ip_address = primary.text
                                                continue
                                            if (text == 'mask'):
                                                ip_mask = primary.text
                                                continue
                if ('interface' not in ret):
                    ret['interface'] = {}
                if (interface_name is not None):
                    ret['interface'][interface_name] = {}
                    if (vlan_id is not None):
                        ret['interface'][interface_name]['vlan_id'] = {}
                        ret['interface'][interface_name]['vlan_id'][vlan_id] = {}
                        if (ip_address is not None):
                            ret['interface'][interface_name]['vlan_id'][vlan_id]['ip_address'] = ip_address
                        else:
                            ret['interface'][interface_name]['vlan_id'][vlan_id]['ip_address'] = 'unassigned'
    return ret