

def _make_port_dict(self, port, fields=None, process_extensions=True):
    res = {
        'id': port['id'],
        'name': port['name'],
        'network_id': port['network_id'],
        'tenant_id': port['tenant_id'],
        'mac_address': port['mac_address'],
        'admin_state_up': port['admin_state_up'],
        'status': port['status'],
        'fixed_ips': [{
            'subnet_id': ip['subnet_id'],
            'ip_address': ip['ip_address'],
        } for ip in port['fixed_ips']],
        'device_id': port['device_id'],
        'device_owner': port['device_owner'],
    }
    if ('dns_name' in port):
        process_extensions['dns_name'] = port['dns_name']
    if ('dns_assignment' in port):
        res['dns_assignment'] = [{
            'ip_address': a['ip_address'],
            'hostname': a['hostname'],
            'fqdn': a['fqdn'],
        } for a in port['dns_assignment']]
    if process_extensions:
        self._apply_dict_extend_functions(attributes.PORTS, res, port)
    return self._fields(res, fields)

dataset/ETHPy150Open openstack/neutron/neutron/db/db_base_plugin_common.py DbBasePluginCommon._make_port_dict/VarMisuse@139/238 `res`->`process_extensions`