This is an automated email from the ASF dual-hosted git repository.
smolnar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git
The following commit(s) were added to refs/heads/master by this push:
new 04685c3 KNOX-2459 - KNOX-METADATA, KNOXSSOUT and KNOX-SESSION
services do not need any URL or param to be added in the generated topology
(#377)
04685c3 is described below
commit 04685c3ecdd02ef5b0d698ba0099fb626622051a
Author: Sandor Molnar <[email protected]>
AuthorDate: Thu Sep 24 11:37:18 2020 +0200
KNOX-2459 - KNOX-METADATA, KNOXSSOUT and KNOX-SESSION services do not need
any URL or param to be added in the generated topology (#377)
---
.../apache/knox/gateway/topology/simple/SimpleDescriptorHandler.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/gateway-topology-simple/src/main/java/org/apache/knox/gateway/topology/simple/SimpleDescriptorHandler.java
b/gateway-topology-simple/src/main/java/org/apache/knox/gateway/topology/simple/SimpleDescriptorHandler.java
index f31912a..3a8de56 100644
---
a/gateway-topology-simple/src/main/java/org/apache/knox/gateway/topology/simple/SimpleDescriptorHandler.java
+++
b/gateway-topology-simple/src/main/java/org/apache/knox/gateway/topology/simple/SimpleDescriptorHandler.java
@@ -51,6 +51,8 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.TreeSet;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
/**
* Processes simple topology descriptors, producing full topology files, which
can subsequently be deployed to the
@@ -88,7 +90,7 @@ public class SimpleDescriptorHandler {
private static Map<String, ServiceDiscovery> discoveryInstances = new
HashMap<>();
- private static final Set<String> ALLOWED_SERVICES_WITHOUT_URLS_AND_PARAMS
= Collections.singleton("KNOX");
+ private static final Set<String> ALLOWED_SERVICES_WITHOUT_URLS_AND_PARAMS
= Collections.unmodifiableSet(Stream.of("KNOX", "KNOX-METADATA", "KNOXSSOUT",
"KNOX-SESSION").collect(Collectors.toSet()));
public static Map<String, File> handle(GatewayConfig config, File desc,
File destDirectory, Service...gatewayServices) throws IOException {
return handle(config,
SimpleDescriptorFactory.parse(desc.getAbsolutePath()), desc.getParentFile(),
destDirectory, gatewayServices);