DaanHoogland commented on a change in pull request #2193: CLOUDSTACK-10007
Isolation methods
URL: https://github.com/apache/cloudstack/pull/2193#discussion_r130285207
##########
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:
no, not just developers will try and read the code. create a PR to remove it
if it is in the way
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services