jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zack Shoylev <notificati...@github.com>
Subject Re: [jclouds-labs-openstack] add FWaaS extension to openstack-neutron (#196)
Date Wed, 01 Jul 2015 12:16:24 GMT
> +   @SelectJson("firewall")
> +   @Fallback(NullOnNotFoundOr404.class)
> +   @Nullable
> +   Firewall get(@PathParam("id") String id);
> +
> +   /**
> +    * Create a new firewall
> +    *
> +    * @param firewall Options for creating a firewall
> +    * @return the newly created firewall
> +    */
> +   @Named("firewall:create")
> +   @POST
> +   @SelectJson("firewall")
> +   @Path("/firewalls")
> +   Firewall create(@WrapWith("firewall") Firewall firewall);

While this is possible and very simple/effective, it is discouraged. The preferred way to
do this might be
```
Firewall create(@WrapWith("firewall") CreateFirewall firewall);
```
Basically, we should provide slightly different CreateFirewall and UpdateFirewall classes
- for example, they don't support specifying IDs or other parameters that are strictly determined
by the service (another example is Status).

There is some repetition, yes, but we have autovalue to take care of that.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/196/files#r33672426
Mime
View raw message