rhtyd commented on a change in pull request #2193: CLOUDSTACK-10007 Isolation 
methods
URL: https://github.com/apache/cloudstack/pull/2193#discussion_r129527242
 
 

 ##########
 File path: api/src/com/cloud/network/PhysicalNetwork.java
 ##########
 @@ -32,8 +36,101 @@
         Disabled, Enabled;
     }
 
-    public enum IsolationMethod {
-        VLAN, L3, GRE, STT, BCF_SEGMENT, MIDO, SSP, VXLAN, ODL, L3VPN, VSP, 
VCS;
+    public class IsolationMethod {
+        protected static final String UNKNOWN_PROVIDER = "Unknown";
+        static Set<IsolationMethod> registeredIsolationMethods = new 
HashSet<>();
+
+        String methodPrefix;
+        String provider;
+
+        public IsolationMethod(String prfx) {
+            this(prfx, UNKNOWN_PROVIDER);
+        }
+
+        public IsolationMethod(String prfx, String prvdr) {
+            methodPrefix = prfx;
+            provider = StringUtils.isNotBlank(prvdr)? prvdr : UNKNOWN_PROVIDER;
+            registeredIsolationMethods.add(this);
+        }
+
+        /**
+         * gets a IsolationMethod object that defines this prefix and if any 
it returns the first one found that has a known provider. If none has a known 
provider
 
 Review comment:
   Remove comment, comment is explaining the code that a developer can easily 
read and follow.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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