'Subnet update operations that happen after transaction completes.
:param context: neutron api request context
:param orig: subnet dictionary representing state before update
:param result: subnet dictionary representing state after update'

def _update_subnet_postcommit(self, context, orig, result):

    update_ports_needed = ((result['cidr'] != orig['cidr']) and ipv6_utils.is_ipv6_pd_enabled(result))
    if update_ports_needed:
        filters = {'fixed_ips': {'subnet_id': [result['id']]}}
        ports = self.get_ports(context, filters=filters)
        routers = []
        for port in ports:
            for ip in port['fixed_ips']:
                if (ip['subnet_id'] == result['id']):
                    if (port['device_owner'] in constants.ROUTER_INTERFACE_OWNERS):
                        routers.append(port['device_id'])
                        ip['ip_address'] = result['gateway_ip']
                    else:
                        ip.pop('ip_address', None)
            self.update_port(context, port['id'], {'port': port})
        if routers:
            self.l3_rpc_notifier.routers_updated(context, routers)
    kwargs = {'context': context, 'subnet': result, 'original_subnet': orig}
    registry.notify(resources.SUBNET, events.AFTER_UPDATE, self, **kwargs)
    return result
