DaanHoogland commented on a change in pull request #3732: [Vmware] Enable PVLAN 
support on L2 networks
URL: https://github.com/apache/cloudstack/pull/3732#discussion_r358235797
 
 

 ##########
 File path: api/src/main/java/com/cloud/network/Network.java
 ##########
 @@ -44,6 +46,24 @@
         Shared, Isolated, L2
     }
 
+    enum PVlanType {
+        Community, Isolated, Promiscuous;
+
+        static PVlanType fromValue(String type) {
+            if (StringUtils.isBlank(type)) {
+                return null;
+            } else if (type.equalsIgnoreCase("promiscuous") || 
type.equalsIgnoreCase("p")) {
+                return Promiscuous;
+            } else if (type.equalsIgnoreCase("community") || 
type.equalsIgnoreCase("c")) {
+                return Community;
+            } else if (type.equalsIgnoreCase("isolated") || 
type.equalsIgnoreCase("i")) {
+                return Isolated;
+            } else {
+                throw new InvalidParameterValueException("Unexpected Private 
VLAN type: " + type);
 
 Review comment:
   I wouldn't mind allowing "iso" or "Comm" in this case would you?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to