def _update_distributed_attr(
        self, context, router_id, router_db, data):
        if data.get('distributed'):
            old_owner = const.DEVICE_OWNER_ROUTER_INTF
            new_owner = const.DEVICE_OWNER_DVR_INTERFACE
            for rp in router_db.attached_ports.filter_by(port_type=old_owner):
                rp.port_type = new_owner
                rp.port.device_owner = new_owner
Update the model to support the dvr case of a router.
dataset/ETHPy150Open openstack/neutron/neutron/db/l3_dvr_db.py/L3_NAT_with_dvr_db_mixin._update_distributed_attr