def portforward_update(request, body):
    obj_id = body.pop('id', '')
    port_list = neutron.port_list(request, device_id=body['instance'])
    try:
        port = port_list[0]
    except IndexError:
        raise PortNotFoundClient
    portforward = {'portforward': {'name': body['rule_name'], 'instance_id': body['instance'], 'protocol': body['public_protocol'], 'public_port': body['public_port'], 'private_port': body['private_port'], 'port_id': port.id}}
    LOG.debug(('portforward_update(): body = %s' % body))
    return _put(request, 'dhportforward', obj_id, portforward)
def portforward_update(request, body):
    obj_id = body.pop('id', )
    port_list = neutron.port_list(request, device_id=body['instance'])
    try:
        port = port_list[0]
    except IndexError:
        raise PortNotFoundClient
    portforward = {'portforward': {'name': body['rule_name'], 'instance_id': body['instance'], 'protocol': body['public_protocol'], 'public_port': body['public_port'], 'private_port': body['private_port'], 'port_id': port.id}}
    LOG.debug(('portforward_update(): body = %s' % body))
    return _put(request, 'dhportforward', obj_id, portforward)