aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-fe/src
diff options
context:
space:
mode:
authorIdan Amit <ia096e@intl.att.com>2018-01-31 18:57:31 +0200
committerMichael Lando <ml636r@att.com>2018-02-01 08:15:25 +0000
commit162f50777e13eebe3b27ec8364ee892be628f7b0 (patch)
treeebce6947b372a61827745e9985eef0ac3f144af2 /catalog-fe/src
parent3c9f4df71b978e92a6eeb6f22bc7535e749d11c2 (diff)
Align configuration for new design
Aligned the designers configuration according to the new design addition and changes Change-Id: Id08942b5a8adbac10bbe76bdd8a2a6f093ec8b46 Issue-ID: SDC-975 Signed-off-by: Idan Amit <ia096e@intl.att.com>
Diffstat (limited to 'catalog-fe/src')
-rw-r--r--catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/PluginStatusBL.java7
-rw-r--r--catalog-fe/src/main/resources/config/plugins-configuration.yaml21
-rw-r--r--catalog-fe/src/test/java/org/openecomp/sdc/fe/servlets/PluginStatusBLTest.java28
3 files changed, 15 insertions, 41 deletions
diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/PluginStatusBL.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/PluginStatusBL.java
index dcd5eef491..55e779078d 100644
--- a/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/PluginStatusBL.java
+++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/PluginStatusBL.java
@@ -57,14 +57,9 @@ public class PluginStatusBL {
}
private boolean checkPluginAvailability(Plugin plugin) {
-
- StringBuilder requestString = new StringBuilder();
boolean result = false;
- requestString.append(plugin.getPluginProtocol()).append("://").append(plugin.getPluginHost()).append(":")
- .append(plugin.getPluginPort()).append(plugin.getPluginPath());
-
- HttpHead head = new HttpHead(requestString.toString());
+ HttpHead head = new HttpHead(plugin.getPluginDiscoveryUrl());
try (CloseableHttpResponse response = this.client.execute(head)) {
result = response != null && response.getStatusLine().getStatusCode() == 200;
diff --git a/catalog-fe/src/main/resources/config/plugins-configuration.yaml b/catalog-fe/src/main/resources/config/plugins-configuration.yaml
index 4193b506d2..69598e0ebe 100644
--- a/catalog-fe/src/main/resources/config/plugins-configuration.yaml
+++ b/catalog-fe/src/main/resources/config/plugins-configuration.yaml
@@ -1,22 +1,21 @@
pluginsList:
- pluginId: DCAE
- pluginHost: localhost
- pluginPort: 8080
- pluginPath: "/dcae"
+ pluginDiscoveryUrl: http://localhost:8702/dcae
+ pluginSourceUrl: http://localhost:8702/dcae
pluginStateUrl: "dcae"
- pluginProtocol: http
pluginDisplayOptions:
context:
displayName: "Monitor"
displayContext: ["VF", "SERVICE"]
- top:
- displayName: "DCAE"
+ displayRoles: ["DESIGNER"]
- pluginId: WORKFLOW
- pluginHost: localhost
- pluginPort: 9527
- pluginPath: "/"
+ pluginDiscoveryUrl: http://localhost:9527/
+ pluginSourceUrl: http://localhost:9527/
pluginStateUrl: "workflowDesigner"
- pluginProtocol: http
pluginDisplayOptions:
top:
- displayName: "WORKFLOW" \ No newline at end of file
+ displayName: "WORKFLOW"
+ context:
+ displayName: "Workflow Designer"
+ displayContext: ["VF"]
+ displayRoles: ["DESIGNER", "TESTER"] \ No newline at end of file
diff --git a/catalog-fe/src/test/java/org/openecomp/sdc/fe/servlets/PluginStatusBLTest.java b/catalog-fe/src/test/java/org/openecomp/sdc/fe/servlets/PluginStatusBLTest.java
index 8a796a4993..baef6858a3 100644
--- a/catalog-fe/src/test/java/org/openecomp/sdc/fe/servlets/PluginStatusBLTest.java
+++ b/catalog-fe/src/test/java/org/openecomp/sdc/fe/servlets/PluginStatusBLTest.java
@@ -38,16 +38,10 @@ public class PluginStatusBLTest {
final static List<Plugin> testPluginsList = new ArrayList<>();
final static String offlinePluginsDisplayName = "offlinePlugin";
- final static String offlinePluginHost = "192.168.10.1";
- final static String offlinePluginPort = "1000";
- final static String offlinePluginPath = "/offline";
- final static String offlinePluginProtocol = "http";
+ final static String offlinePluginDiscoveryPath = "http://192.168.10.1:1000/offline";
final static String onlinePluginDisplayName = "onlinePlugin";
- final static String onlinePluginHost = "192.168.20.2";
- final static String onlinePluginPort = "2000";
- final static String onlinePluginPath = "/online";
- final static String onlinePluginProtocol = "http";
+ final static String onlinePluginDiscoveryPath = "http://192.168.10.1:2000/online";
@BeforeClass
public static void beforeClass() {
@@ -55,24 +49,10 @@ public class PluginStatusBLTest {
when(configurationManager.getPluginsConfiguration()).thenReturn(pluginsConfiguration);
offlinePlugin.setPluginId(offlinePluginsDisplayName);
- offlinePlugin.setPluginHost(offlinePluginHost);
- offlinePlugin.setPluginPort(offlinePluginPort);
- offlinePlugin.setPluginPath(offlinePluginPath);
- offlinePlugin.setPluginProtocol(offlinePluginProtocol);
-
- StringBuilder offlineRequestString = new StringBuilder();
- offlineRequestString.append(offlinePluginProtocol).append("://").append(onlinePluginHost).append(":")
- .append(offlinePluginPort).append(offlinePluginPath);
+ offlinePlugin.setPluginDiscoveryUrl(offlinePluginDiscoveryPath);
onlinePlugin.setPluginId(onlinePluginDisplayName);
- onlinePlugin.setPluginHost(onlinePluginHost);
- onlinePlugin.setPluginPort(onlinePluginPort);
- onlinePlugin.setPluginPath(onlinePluginPath);
- onlinePlugin.setPluginProtocol(onlinePluginProtocol);
-
- StringBuilder onlineRequestString = new StringBuilder();
- onlineRequestString.append(onlinePluginProtocol).append("://").append(onlinePluginHost).append(":")
- .append(offlinePluginPort).append(offlinePluginPath);
+ onlinePlugin.setPluginDiscoveryUrl(onlinePluginDiscoveryPath);
}