moresandeep commented on a change in pull request #326:
URL: https://github.com/apache/knox/pull/326#discussion_r415128185
##########
File path:
gateway-topology-simple/src/main/java/org/apache/knox/gateway/topology/simple/SimpleDescriptorHandler.java
##########
@@ -195,6 +200,47 @@
gws);
}
+ /**
+ * Determine whether discovery should be performed for the specified
descriptor.
+ *
+ * @param desc A SimpleDescriptor
+ * @return true, if discovery should be performed for the descriptor;
Otherwise, false.
+ */
+ private static boolean shouldPerformDiscovery(final SimpleDescriptor desc)
{
+
+ // If there is a discovery type specified, then discovery should be
performed
+ final String discoveryType = desc.getDiscoveryType();
+ if (discoveryType != null && !discoveryType.isEmpty()) {
Review comment:
Instead of relying on all the properties shouldn't we just rely on
discoveryType? less confusion with if else logic and also while defining the
descriptor.
----------------------------------------------------------------
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:
[email protected]