> +   @Path("/health_monitors/{id}")
> +   @Fallback(FalseOnNotFoundOr404.class)
> +   boolean deleteHealthMonitor(@PathParam("id") String id);
> +
> +   /**
> +    * Associate a HealthMonitor to a Pool.
> +    * 
> +    * @param poolId the id of the Pool to associate.
> +    * @param healthMonitor the HealthMonitor to associate.
> +    * @return the newly associated HealthMonitor.
> +    */
> +   @Named("pool:associate_health_monitor")
> +   @POST
> +   @Path("/pools/{pool-id}/health_monitors")
> +   @SelectJson("health_monitor")
> +   HealthMonitor associateHealthMonitor(@PathParam("pool-id") String poolId,

Good! I tried with the <code>@PayloadParam</code> annotation some days ago, but 
it did not work. But it was because I had missed the <code>@Payload</code> 
annotation.
So now the new associate method signature is:

      // Associate a HealthMonitor to a Pool.
      @Named("pool:associate_health_monitor")
      @POST
      @Path("/pools/{pool-id}/health_monitors")
      @SelectJson("health_monitor")
      @Payload("%7B\"health_monitor\":%7B\"id\":\"{healthMonitorId}\"%7D%7D")
      @Produces(MediaType.APPLICATION_JSON)
      HealthMonitor associateHealthMonitor(@PathParam("pool-id") String poolId,
            @PayloadParam("healthMonitorId") String healthMonitorId);

... and the <code>AssociateBuilder</code> is removed.
Thank you for your help

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/146/files#r18023998

Reply via email to