summaryrefslogtreecommitdiffstats
path: root/catalog-fe/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-fe/src/main')
-rw-r--r--catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/PluginStatusBL.java23
-rw-r--r--catalog-fe/src/main/resources/config/plugins-configuration.yaml6
2 files changed, 15 insertions, 14 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 563dc22507..5ed4585e10 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
@@ -23,11 +23,13 @@ public class PluginStatusBL {
private static Logger log = LoggerFactory.getLogger(PluginStatusBL.class.getName());
private static Gson gson = new GsonBuilder().setPrettyPrinting().create();
private CloseableHttpClient client = null;
-
+ private PluginsConfiguration pluginsConfiguration = ConfigurationManager.getConfigurationManager().getPluginsConfiguration();
+ private Integer connectionTimeout;
+
public PluginStatusBL() {
this.client = HttpClients.createDefault();
}
-
+
public PluginStatusBL(CloseableHttpClient client) {
this.client = client;
@@ -36,21 +38,18 @@ public class PluginStatusBL {
public String checkPluginsListAvailability() {
String result = null;
- PluginsConfiguration pluginsConfiguration = ConfigurationManager.getConfigurationManager()
- .getPluginsConfiguration();
-
if (pluginsConfiguration == null || pluginsConfiguration.getPluginsList() == null) {
log.warn("Configuration of type {} was not found", PluginsConfiguration.class);
} else {
log.debug("The value returned from getConfig is {}", pluginsConfiguration);
+ connectionTimeout = pluginsConfiguration.getConnectionTimeout();
List<Plugin> availablePluginsList = new ArrayList<>();
- pluginsConfiguration.getPluginsList().forEach(value -> {
- if (checkPluginAvailability(value)) {
- availablePluginsList.add(value);
- }
+ pluginsConfiguration.getPluginsList().forEach(plugin -> {
+ plugin.setOnline(checkPluginAvailability(plugin));
+ availablePluginsList.add(plugin);
});
result = gson.toJson(availablePluginsList);
}
@@ -62,9 +61,9 @@ public class PluginStatusBL {
HttpHead head = new HttpHead(plugin.getPluginDiscoveryUrl());
RequestConfig requestConfig = RequestConfig.custom()
- .setSocketTimeout(1000)
- .setConnectTimeout(1000)
- .setConnectionRequestTimeout(1000).build();
+ .setSocketTimeout(connectionTimeout)
+ .setConnectTimeout(connectionTimeout)
+ .setConnectionRequestTimeout(connectionTimeout).build();
head.setConfig(requestConfig);
diff --git a/catalog-fe/src/main/resources/config/plugins-configuration.yaml b/catalog-fe/src/main/resources/config/plugins-configuration.yaml
index 69598e0ebe..eb36945715 100644
--- a/catalog-fe/src/main/resources/config/plugins-configuration.yaml
+++ b/catalog-fe/src/main/resources/config/plugins-configuration.yaml
@@ -17,5 +17,7 @@ pluginsList:
displayName: "WORKFLOW"
context:
displayName: "Workflow Designer"
- displayContext: ["VF"]
- displayRoles: ["DESIGNER", "TESTER"] \ No newline at end of file
+ displayContext: ["VF", "SERVICE"]
+ displayRoles: ["DESIGNER", "TESTER"]
+
+connectionTimeout: 1000 \ No newline at end of file
ont-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# Copyright © 2017 Amdocs, Bell Canada
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

global:
  config:
    msbServiceName: msb-iag
    msbPort: 80
    dbServiceName: vfc-db
    dbPort: 3306

# application configuration
config:
  logstashServiceName: log-ls
  logstashPort: 5044

# sub-chart configuration
vfc-workflow:
  service:
    externalPort: 10550

vfc-workflow-engine:
  config:
    workflowPort: 10550