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 Thu, 02 Jul 2015 13:14:24 GMT
> +       */
> +      public abstract Builder adminStateUp(Boolean adminStateUp);
> +
> +      /**
> +       *
> +       * @param firewallPolicyId The firewall policy uuid that this firewall is associated
with. This firewall implements the rules contained in the
> +       *                         firewall policy represented by this uuid.
> +       *
> +       * @return The CreateFirewall builder.
> +       */
> +      public abstract Builder firewallPolicyId(String firewallPolicyId);
> +
> +      abstract CreateFirewall autoBuild();
> +
> +      public CreateFirewall build() {
> +         CreateFirewall createFirewall = autoBuild();

Eh, that's messy.
It might be better to implement the builder getters. That way users benefit from having them;
and you benefit from being able to check validation before sending this to the service;

As an afterthought - I don't really like client-side validation of parameters as is done here.
Let the service validate.

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