You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Daan Hoogland <da...@gmail.com> on 2013/07/24 12:37:40 UTC

[DISCUSS} enums in Networks,.java

there has been some discussion on the proper use of enums recently.

I've been strugling with the enums in Networks.java. A discussion on those
is needed I think. BroadcastDomainType seems to be a hybrid of a stable and
a plugin extendible enum. It breaks my mind and my every change. There are
more in there and not all of them are needed I think or at least they
overlap in meaning. IsolationType seems similar for instance

BroadcastDomainType contain Vlan, Storage, Lswitch but also Mido and Ec2.
The latter are clearly extensions that should be cougght in a more abstract
enum value and a construct according to Franks* pattern. Any thoughts?

* http://www.mail-archive.com/dev@cloudstack.apache.org/msg09955.html

RE: [DISCUSS} enums in Networks,.java

Posted by Alex Huang <Al...@citrix.com>.
+1

So are BroadcastScheme, IsolationType, TrafficType.

--Alex

> -----Original Message-----
> From: Daan Hoogland [mailto:daan.hoogland@gmail.com]
> Sent: Wednesday, July 24, 2013 3:38 AM
> To: dev
> Subject: [DISCUSS} enums in Networks,.java
> 
> there has been some discussion on the proper use of enums recently.
> 
> I've been strugling with the enums in Networks.java. A discussion on those is
> needed I think. BroadcastDomainType seems to be a hybrid of a stable and a
> plugin extendible enum. It breaks my mind and my every change. There are
> more in there and not all of them are needed I think or at least they overlap
> in meaning. IsolationType seems similar for instance
> 
> BroadcastDomainType contain Vlan, Storage, Lswitch but also Mido and Ec2.
> The latter are clearly extensions that should be cougght in a more abstract
> enum value and a construct according to Franks* pattern. Any thoughts?
> 
> * http://www.mail-archive.com/dev@cloudstack.apache.org/msg09955.html