* Adding health check REST endpoint to distribution service.
* Adding isAlive field to DistributionActivator to fetch the health
status.
* Adding parameter group for rest server parameters.
* Adding DistributionRestController for hosting all the rest endpoints
in distribution service.
* Adding DistributionRestServer to manage lifecycle of distribution rest server.
* Adding ParameterValidationUtils utility class for common validations.
Plan is to move this class to policy-common for wider use later.
* Adding test cases for all new code added.
* Refering common classes from policy/common
Change-Id: I246d57133ed1f0c3548bcdee173d7b64fb368abc
Issue-ID: POLICY-1035
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
<artifactId>common-parameters</artifactId>
<version>1.3.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.onap.policy.common</groupId>
+ <artifactId>capabilities</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.common</groupId>
+ <artifactId>policy-endpoints</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
import org.onap.policy.common.parameters.GroupValidationResult;
import org.onap.policy.common.parameters.ParameterGroup;
import org.onap.policy.common.parameters.ValidationStatus;
+import org.onap.policy.common.utils.validation.ParameterValidationUtils;
import org.onap.policy.distribution.reception.parameters.ReceptionHandlerParameters;
/**
*/
public class DistributionParameterGroup implements ParameterGroup {
private String name;
+ private RestServerParameters restServerParameters;
private Map<String, ReceptionHandlerParameters> receptionHandlerParameters;
/**
*
* @param name the parameter group name
*/
- public DistributionParameterGroup(final String name,
+ public DistributionParameterGroup(final String name, final RestServerParameters restServerParameters,
final Map<String, ReceptionHandlerParameters> receptionHandlerParameters) {
this.name = name;
+ this.restServerParameters = restServerParameters;
this.receptionHandlerParameters = receptionHandlerParameters;
}
return receptionHandlerParameters;
}
+ /**
+ * Return the restServerParameters of this parameter group instance.
+ *
+ * @return the restServerParameters
+ */
+ public RestServerParameters getRestServerParameters() {
+ return restServerParameters;
+ }
+
/**
* Validate the parameter group.
*
@Override
public GroupValidationResult validate() {
final GroupValidationResult validationResult = new GroupValidationResult(this);
- if (name == null || name.trim().length() == 0) {
+ if (!ParameterValidationUtils.validateStringParameter(name)) {
validationResult.setResult("name", ValidationStatus.INVALID, "must be a non-blank string");
+ }
+ if (restServerParameters == null) {
+ validationResult.setResult("restServerParameters", ValidationStatus.INVALID,
+ "must have restServerParameters to configure distribution rest server");
} else {
- validateReceptionHandlers(validationResult);
+ validationResult.setResult("restServerParameters", restServerParameters.validate());
}
+ validateReceptionHandlers(validationResult);
return validationResult;
}
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.distribution.main.parameters;
+
+import org.onap.policy.common.parameters.GroupValidationResult;
+import org.onap.policy.common.parameters.ParameterGroup;
+import org.onap.policy.common.parameters.ValidationStatus;
+import org.onap.policy.common.utils.validation.ParameterValidationUtils;
+
+/**
+ * Class to hold all parameters needed for distribution rest server.
+ *
+ * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
+ */
+public class RestServerParameters implements ParameterGroup {
+ private String name;
+ private String host;
+ private int port;
+ private String userName;
+ private String password;
+
+ /**
+ * Constructor for instantiating RestServerParameters.
+ *
+ * @param host the host name
+ * @param port the port
+ * @param userName the user name
+ * @param password the password
+ */
+ public RestServerParameters(final String host, final int port, final String userName, final String password) {
+ super();
+ this.host = host;
+ this.port = port;
+ this.userName = userName;
+ this.password = password;
+ }
+
+ /**
+ * Return the name of this RestServerParameters instance.
+ *
+ * @return name the name of this RestServerParameters
+ */
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Return the host of this RestServerParameters instance.
+ *
+ * @return the host
+ */
+ public String getHost() {
+ return host;
+ }
+
+ /**
+ * Return the port of this RestServerParameters instance.
+ *
+ * @return the port
+ */
+ public int getPort() {
+ return port;
+ }
+
+ /**
+ * Return the user name of this RestServerParameters instance.
+ *
+ * @return the userName
+ */
+ public String getUserName() {
+ return userName;
+ }
+
+ /**
+ * Return the password of this RestServerParameters instance.
+ *
+ * @return the password
+ */
+ public String getPassword() {
+ return password;
+ }
+
+ /**
+ * Set the name of this RestServerParameters instance.
+ *
+ * @param name the name to set
+ */
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ /**
+ * Validate the rest server parameters.
+ *
+ * @return the result of the validation
+ */
+ @Override
+ public GroupValidationResult validate() {
+ final GroupValidationResult validationResult = new GroupValidationResult(this);
+ if (!ParameterValidationUtils.validateStringParameter(host)) {
+ validationResult.setResult("host", ValidationStatus.INVALID,
+ "must be a non-blank string containing hostname/ipaddress of the distribution rest server");
+ }
+ if (!ParameterValidationUtils.validateStringParameter(userName)) {
+ validationResult.setResult("userName", ValidationStatus.INVALID,
+ "must be a non-blank string containing userName for distribution rest server credentials");
+ }
+ if (!ParameterValidationUtils.validateStringParameter(password)) {
+ validationResult.setResult("password", ValidationStatus.INVALID,
+ "must be a non-blank string containing password for distribution rest server credentials");
+ }
+ if (!ParameterValidationUtils.validateIntParameter(port)) {
+ validationResult.setResult("port", ValidationStatus.INVALID,
+ "must be a positive integer containing port of the distribution rest server");
+ }
+ return validationResult;
+ }
+}
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.distribution.main.rest;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.Info;
+import io.swagger.annotations.SwaggerDefinition;
+import io.swagger.annotations.Tag;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.onap.policy.common.endpoints.report.HealthCheckReport;
+
+/**
+ * Class to provide distribution REST services.
+ *
+ * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
+ */
+@Path("/")
+@Api
+@Produces(MediaType.APPLICATION_JSON)
+@SwaggerDefinition(
+ info = @Info(description = "Policy Distribution Service", version = "v1.0", title = "Policy Distribution"),
+ consumes = { MediaType.APPLICATION_JSON }, produces = { MediaType.APPLICATION_JSON },
+ schemes = { SwaggerDefinition.Scheme.HTTP },
+ tags = { @Tag(name = "policy-distribution", description = "Policy Distribution Service Operations") })
+public class DistributionRestController {
+
+ @GET
+ @Path("healthcheck")
+ @Produces(MediaType.APPLICATION_JSON)
+ @ApiOperation(value = "Perform a system healthcheck",
+ notes = "Provides healthy status of the Policy Distribution component", response = HealthCheckReport.class)
+ public Response healthcheck() {
+ return Response.status(Response.Status.OK).entity(new HealthCheckProvider().performHealthCheck()).build();
+ }
+}
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.distribution.main.rest;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.onap.policy.common.capabilities.Startable;
+import org.onap.policy.common.endpoints.http.server.HttpServletServer;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.distribution.main.parameters.RestServerParameters;
+
+/**
+ * Class to manage life cycle of distribution rest server.
+ *
+ * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
+ */
+public class DistributionRestServer implements Startable {
+
+ private static final String SEPARATOR = ".";
+ private static final String HTTP_SERVER_SERVICES = "http.server.services";
+ private static final Logger LOGGER = FlexLogger.getLogger(DistributionRestServer.class);
+
+ private List<HttpServletServer> servers = new ArrayList<>();
+
+ private RestServerParameters restServerParameters;
+
+ /**
+ * Constructor for instantiating DistributionRestServer.
+ *
+ * @param restServerParameters the rest server parameters
+ */
+ public DistributionRestServer(final RestServerParameters restServerParameters) {
+ this.restServerParameters = restServerParameters;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean start() {
+ try {
+ servers = HttpServletServer.factory.build(getServerProperties());
+ for (final HttpServletServer server : servers) {
+ server.start();
+ }
+ } catch (final Exception exp) {
+ LOGGER.error("Failed to start distribution http server", exp);
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Creates the server properties object using restServerParameters.
+ *
+ * @return the properties object
+ */
+ private Properties getServerProperties() {
+ final Properties props = new Properties();
+ props.setProperty(HTTP_SERVER_SERVICES, restServerParameters.getName());
+ props.setProperty(HTTP_SERVER_SERVICES + SEPARATOR + restServerParameters.getName() + ".host",
+ restServerParameters.getHost());
+ props.setProperty(HTTP_SERVER_SERVICES + SEPARATOR + restServerParameters.getName() + ".port",
+ Integer.toString(restServerParameters.getPort()));
+ props.setProperty(HTTP_SERVER_SERVICES + SEPARATOR + restServerParameters.getName() + ".restClasses",
+ DistributionRestController.class.getCanonicalName());
+ props.setProperty(HTTP_SERVER_SERVICES + SEPARATOR + restServerParameters.getName() + ".managed", "false");
+ props.setProperty(HTTP_SERVER_SERVICES + SEPARATOR + restServerParameters.getName() + ".swagger", "true");
+ props.setProperty(HTTP_SERVER_SERVICES + SEPARATOR + restServerParameters.getName() + ".userName",
+ restServerParameters.getUserName());
+ props.setProperty(HTTP_SERVER_SERVICES + SEPARATOR + restServerParameters.getName() + ".password",
+ restServerParameters.getPassword());
+ return props;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean stop() {
+ for (final HttpServletServer server : servers) {
+ try {
+ server.stop();
+ } catch (final Exception exp) {
+ LOGGER.error("Failed to stop distribution http server", exp);
+ }
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void shutdown() {
+ stop();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAlive() {
+ return !servers.isEmpty();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String toString() {
+ final StringBuilder builder = new StringBuilder();
+ builder.append("DistributionRestServer [servers=");
+ builder.append(servers);
+ builder.append("]");
+ return builder.toString();
+ }
+
+}
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.distribution.main.rest;
+
+import org.onap.policy.common.endpoints.report.HealthCheckReport;
+import org.onap.policy.distribution.main.startstop.DistributionActivator;
+
+/**
+ * Class to fetch health check of distribution service.
+ *
+ * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
+ */
+public class HealthCheckProvider {
+
+ private static final String NOT_ALIVE = "not alive";
+ private static final String ALIVE = "alive";
+ private static final String URL = "self";
+ private static final String NAME = "Policy SSD";
+
+ /**
+ * Performs the health check of distribution service.
+ *
+ * @return Report containing health check status
+ */
+ public HealthCheckReport performHealthCheck() {
+ final HealthCheckReport report = new HealthCheckReport();
+ report.setName(NAME);
+ report.setUrl(URL);
+ report.setHealthy(DistributionActivator.isAlive());
+ report.setCode(DistributionActivator.isAlive() ? 200 : 500);
+ report.setMessage(DistributionActivator.isAlive() ? ALIVE : NOT_ALIVE);
+ return report;
+ }
+}
import org.onap.policy.distribution.forwarding.PolicyForwardingException;
import org.onap.policy.distribution.main.PolicyDistributionException;
import org.onap.policy.distribution.main.parameters.DistributionParameterGroup;
+import org.onap.policy.distribution.main.rest.DistributionRestServer;
import org.onap.policy.distribution.reception.decoding.PolicyDecodingException;
import org.onap.policy.distribution.reception.handling.AbstractReceptionHandler;
import org.onap.policy.distribution.reception.parameters.ReceptionHandlerParameters;
// The map of reception handlers initialized by this distribution activator
private final Map<String, AbstractReceptionHandler> receptionHandlersMap = new HashMap<>();
+ private static boolean alive = false;
+
+ private DistributionRestServer restServer;
+
/**
* Instantiate the activator for policy distribution as a complete service.
*
@SuppressWarnings("unchecked")
public void initialize() throws PolicyDistributionException {
LOGGER.debug("Policy distribution starting as a service . . .");
+ startDistributionRestServer();
registerToParameterService(distributionParameterGroup);
- for (final ReceptionHandlerParameters rHParameters : distributionParameterGroup.getReceptionHandlerParameters()
- .values()) {
+ for (final ReceptionHandlerParameters receptionHandlerParameters : distributionParameterGroup
+ .getReceptionHandlerParameters().values()) {
try {
- final Class<AbstractReceptionHandler> receptionHandlerClass =
- (Class<AbstractReceptionHandler>) Class.forName(rHParameters.getReceptionHandlerClassName());
+ final Class<AbstractReceptionHandler> receptionHandlerClass = (Class<AbstractReceptionHandler>) Class
+ .forName(receptionHandlerParameters.getReceptionHandlerClassName());
final AbstractReceptionHandler receptionHandler = receptionHandlerClass.newInstance();
- receptionHandler.initialize(rHParameters.getName());
- receptionHandlersMap.put(rHParameters.getName(), receptionHandler);
+ receptionHandler.initialize(receptionHandlerParameters.getName());
+ receptionHandlersMap.put(receptionHandlerParameters.getName(), receptionHandler);
+ alive = true;
} catch (final ClassNotFoundException | InstantiationException | IllegalAccessException
| PolicyDecodingException | PolicyForwardingException exp) {
throw new PolicyDistributionException(exp.getMessage(), exp);
LOGGER.debug("Policy distribution started as a service");
}
+ /**
+ * Starts the distribution rest server using configuration parameters.
+ *
+ * @throws PolicyDistributionException if server start fails
+ */
+ private void startDistributionRestServer() throws PolicyDistributionException {
+ distributionParameterGroup.getRestServerParameters().setName(distributionParameterGroup.getName());
+ restServer = new DistributionRestServer(distributionParameterGroup.getRestServerParameters());
+ if (!restServer.start()) {
+ throw new PolicyDistributionException(
+ "Failed to start distribution rest server. Check log for more details...");
+ }
+ }
+
/**
* Terminate policy distribution.
*
}
receptionHandlersMap.clear();
deregisterToParameterService(distributionParameterGroup);
+ alive = false;
+
+ // Stop the distribution rest server
+ restServer.stop();
} catch (final Exception exp) {
LOGGER.error("Policy distribution service termination failed", exp);
throw new PolicyDistributionException(exp.getMessage(), exp);
/**
* Method to register the parameters to Common Parameter Service.
*
- * @param distributionParameterGroup
+ * @param distributionParameterGroup the distribution parameter group
*/
public void registerToParameterService(final DistributionParameterGroup distributionParameterGroup) {
ParameterService.register(distributionParameterGroup);
/**
* Method to deregister the parameters from Common Parameter Service.
*
- * @param distributionParameterGroup
+ * @param distributionParameterGroup the distribution parameter group
*/
public void deregisterToParameterService(final DistributionParameterGroup distributionParameterGroup) {
ParameterService.deregister(distributionParameterGroup.getName());
for (final ReceptionHandlerParameters params : distributionParameterGroup.getReceptionHandlerParameters()
.values()) {
- params.setName(distributionParameterGroup.getName());
- params.getPluginHandlerParameters().setName(distributionParameterGroup.getName());
ParameterService.deregister((params.getName()));
ParameterService.deregister((params.getPSSDConfigurationParametersGroup().getName()));
ParameterService.deregister((params.getPluginHandlerParameters().getName()));
}
}
+
+ /**
+ * Returns the alive status of distribution service.
+ *
+ * @return the alive
+ */
+ public static boolean isAlive() {
+ return alive;
+ }
}
+++ /dev/null
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2018 Ericsson. All rights reserved.
- * ================================================================================
- * 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.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-/**
- * Provides ONAP policy distribution as a complete service together with all its reception and forwarding support.
- * A main method to allow ONAP policy distribution execution from the command line is also provided.
- */
-package org.onap.policy.distribution.main.startstop;
*/
public class CommonTestData {
+ private static final String REST_SERVER_PASSWORD = "zb!XztG34";
+ private static final String REST_SERVER_USER = "healthcheck";
+ private static final int REST_SERVER_PORT = 6969;
+ private static final String REST_SERVER_HOST = "0.0.0.0";
public static final String DISTRIBUTION_GROUP_NAME = "SDCDistributionGroup";
public static final String DECODER_TYPE = "TOSCA";
public static final String DECODER_CLASS_NAME =
public static final String PAP_ENGINE_FORWARDER_KEY = "PAPEngineForwarder";
public static final String TOSCA_DECODER_KEY = "TOSCADecoder";
+ /**
+ * Returns an instance of ReceptionHandlerParameters for test cases.
+ *
+ * @param isEmpty boolean value to represent that object created should be empty or not
+ * @return the restServerParameters object
+ */
+ public RestServerParameters getRestServerParameters(final boolean isEmpty) {
+ final RestServerParameters restServerParameters;
+ if (!isEmpty) {
+ restServerParameters = new RestServerParameters(REST_SERVER_HOST, REST_SERVER_PORT, REST_SERVER_USER,
+ REST_SERVER_PASSWORD);
+ } else {
+ restServerParameters = new RestServerParameters(null, 0, null, null);
+ }
+ return restServerParameters;
+ }
+
/**
* Returns an instance of ReceptionHandlerParameters for test cases.
*
final Map<String, PolicyForwarderParameters> policyForwarders = getPolicyForwarders(isEmpty);
final PSSDConfigurationParametersGroup pssdConfiguration = getPSSDConfigurationParametersGroup(isEmpty);;
final PluginHandlerParameters pHParameters = new PluginHandlerParameters(policyDecoders, policyForwarders);
- final ReceptionHandlerParameters rhParameters =
- new ReceptionHandlerParameters(RECEPTION_HANDLER_TYPE, RECEPTION_HANDLER_CLASS_NAME,
- pssdConfiguration, pHParameters);
+ final ReceptionHandlerParameters rhParameters = new ReceptionHandlerParameters(RECEPTION_HANDLER_TYPE,
+ RECEPTION_HANDLER_CLASS_NAME, pssdConfiguration, pHParameters);
receptionHandlerParameters.put(SDC_RECEPTION_HANDLER_KEY, rhParameters);
}
return receptionHandlerParameters;
final List<String> artifactTypes = new ArrayList<>();
artifactTypes.add("TOSCA_CSAR");
pssdConfiguration = new PSSDConfigurationParametersGroup.PSSDConfigurationBuilder()
- .setAsdcAddress("localhost").setMessageBusAddress(messageBusAddress)
- .setUser("policy").setPassword("policy").setPollingInterval(20)
- .setPollingTimeout(30).setConsumerId("policy-id").setArtifactTypes(artifactTypes)
- .setConsumerGroup("policy-group").setEnvironmentName("TEST").setKeystorePath("")
- .setKeystorePassword("").setActiveserverTlsAuth(false)
- .setIsFilterinEmptyResources(true).setIsUseHttpsWithDmaap(false).build();
+ .setAsdcAddress("localhost").setMessageBusAddress(messageBusAddress).setUser("policy")
+ .setPassword("policy").setPollingInterval(20).setPollingTimeout(30).setConsumerId("policy-id")
+ .setArtifactTypes(artifactTypes).setConsumerGroup("policy-group").setEnvironmentName("TEST")
+ .setKeystorePath("").setKeystorePassword("").setActiveserverTlsAuth(false)
+ .setIsFilterinEmptyResources(true).setIsUseHttpsWithDmaap(false).build();
} else {
pssdConfiguration = new PSSDConfigurationParametersGroup.PSSDConfigurationBuilder().build();
}
@Test
public void testDistributionParameterGroup() {
+ final RestServerParameters restServerParameters = commonTestData.getRestServerParameters(false);
final Map<String, ReceptionHandlerParameters> receptionHandlerParameters =
commonTestData.getReceptionHandlerParameters(false);
- final DistributionParameterGroup distributionParameters =
- new DistributionParameterGroup(CommonTestData.DISTRIBUTION_GROUP_NAME, receptionHandlerParameters);
+ final DistributionParameterGroup distributionParameters = new DistributionParameterGroup(
+ CommonTestData.DISTRIBUTION_GROUP_NAME, restServerParameters, receptionHandlerParameters);
final GroupValidationResult validationResult = distributionParameters.validate();
assertTrue(validationResult.isValid());
+ assertEquals(restServerParameters.getHost(), distributionParameters.getRestServerParameters().getHost());
+ assertEquals(restServerParameters.getPort(), distributionParameters.getRestServerParameters().getPort());
+ assertEquals(restServerParameters.getUserName(),
+ distributionParameters.getRestServerParameters().getUserName());
+ assertEquals(restServerParameters.getPassword(),
+ distributionParameters.getRestServerParameters().getPassword());
assertEquals(CommonTestData.DISTRIBUTION_GROUP_NAME, distributionParameters.getName());
assertEquals(receptionHandlerParameters.get(CommonTestData.SDC_RECEPTION_HANDLER_KEY).getReceptionHandlerType(),
distributionParameters.getReceptionHandlerParameters().get(CommonTestData.SDC_RECEPTION_HANDLER_KEY)
@Test
public void testDistributionParameterGroup_NullName() {
+ final RestServerParameters restServerParameters = commonTestData.getRestServerParameters(false);
final Map<String, ReceptionHandlerParameters> receptionHandlerParameters =
commonTestData.getReceptionHandlerParameters(false);
final DistributionParameterGroup distributionParameters =
- new DistributionParameterGroup(null, receptionHandlerParameters);
+ new DistributionParameterGroup(null, restServerParameters, receptionHandlerParameters);
final GroupValidationResult validationResult = distributionParameters.validate();
assertFalse(validationResult.isValid());
assertEquals(null, distributionParameters.getName());
@Test
public void testDistributionParameterGroup_EmptyName() {
+ final RestServerParameters restServerParameters = commonTestData.getRestServerParameters(false);
final Map<String, ReceptionHandlerParameters> receptionHandlerParameters =
commonTestData.getReceptionHandlerParameters(false);
final DistributionParameterGroup distributionParameters =
- new DistributionParameterGroup("", receptionHandlerParameters);
+ new DistributionParameterGroup("", restServerParameters, receptionHandlerParameters);
final GroupValidationResult validationResult = distributionParameters.validate();
assertFalse(validationResult.isValid());
assertEquals("", distributionParameters.getName());
@Test
public void testDistributionParameterGroup_NullReceptionHandlerParameters() {
+ final RestServerParameters restServerParameters = commonTestData.getRestServerParameters(false);
try {
final DistributionParameterGroup distributionParameters =
- new DistributionParameterGroup(CommonTestData.DISTRIBUTION_GROUP_NAME, null);
+ new DistributionParameterGroup(CommonTestData.DISTRIBUTION_GROUP_NAME, restServerParameters, null);
distributionParameters.validate();
fail("test should throw an exception here");
} catch (final Exception e) {
@Test
public void testDistributionParameterGroup_EmptyReceptionHandlerParameters() {
+ final RestServerParameters restServerParameters = commonTestData.getRestServerParameters(false);
final Map<String, ReceptionHandlerParameters> receptionHandlerParameters =
commonTestData.getReceptionHandlerParameters(true);
try {
- final DistributionParameterGroup distributionParameters =
- new DistributionParameterGroup(CommonTestData.DISTRIBUTION_GROUP_NAME, receptionHandlerParameters);
+ final DistributionParameterGroup distributionParameters = new DistributionParameterGroup(
+ CommonTestData.DISTRIBUTION_GROUP_NAME, restServerParameters, receptionHandlerParameters);
distributionParameters.validate();
fail("test should throw an exception here");
} catch (final Exception e) {
}
}
+
+ @Test
+ public void testDistributionParameterGroup_EmptyRestServerParameters() {
+ final RestServerParameters restServerParameters = commonTestData.getRestServerParameters(true);
+ final Map<String, ReceptionHandlerParameters> receptionHandlerParameters =
+ commonTestData.getReceptionHandlerParameters(false);
+
+ final DistributionParameterGroup distributionParameters = new DistributionParameterGroup(
+ CommonTestData.DISTRIBUTION_GROUP_NAME, restServerParameters, receptionHandlerParameters);
+ final GroupValidationResult validationResult = distributionParameters.validate();
+ assertFalse(validationResult.isValid());
+ assertTrue(validationResult.getResult()
+ .contains("\"org.onap.policy.distribution.main.parameters.RestServerParameters\" INVALID, "
+ + "parameter group has status INVALID"));
+ }
}
assertTrue(e.getMessage().contains("policy forwarder class not found in classpath"));
}
}
+
+ @Test
+ public void testDistributionParameterGroup_InvalidRestServerHost() throws PolicyDistributionException {
+ final String[] distributionConfigParameters =
+ { "-c", "parameters/DistributionConfigParameters_InvalidRestServerHost.json" };
+
+ final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+ arguments.parse(distributionConfigParameters);
+
+ try {
+ new DistributionParameterHandler().getParameters(arguments);
+ fail("test should throw an exception here");
+ } catch (final Exception e) {
+ assertTrue(e.getMessage().contains(
+ "must be a non-blank string containing hostname/ipaddress of the distribution rest server"));
+ }
+ }
+
+ @Test
+ public void testDistributionParameterGroup_InvalidRestServerPort() throws PolicyDistributionException {
+ final String[] distributionConfigParameters =
+ { "-c", "parameters/DistributionConfigParameters_InvalidRestServerPort.json" };
+
+ final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+ arguments.parse(distributionConfigParameters);
+
+ try {
+ new DistributionParameterHandler().getParameters(arguments);
+ fail("test should throw an exception here");
+ } catch (final Exception e) {
+ assertTrue(e.getMessage()
+ .contains("must be a positive integer containing port of the distribution rest server"));
+ }
+ }
+
+ @Test
+ public void testDistributionParameterGroup_InvalidRestServerUser() throws PolicyDistributionException {
+ final String[] distributionConfigParameters =
+ { "-c", "parameters/DistributionConfigParameters_InvalidRestServerUser.json" };
+
+ final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+ arguments.parse(distributionConfigParameters);
+
+ try {
+ new DistributionParameterHandler().getParameters(arguments);
+ fail("test should throw an exception here");
+ } catch (final Exception e) {
+ assertTrue(e.getMessage().contains(
+ "must be a non-blank string containing userName for distribution rest server credentials"));
+ }
+ }
+
+ @Test
+ public void testDistributionParameterGroup_InvalidRestServerPassword() throws PolicyDistributionException {
+ final String[] distributionConfigParameters =
+ { "-c", "parameters/DistributionConfigParameters_InvalidRestServerPassword.json" };
+
+ final DistributionCommandLineArguments arguments = new DistributionCommandLineArguments();
+ arguments.parse(distributionConfigParameters);
+
+ try {
+ new DistributionParameterHandler().getParameters(arguments);
+ fail("test should throw an exception here");
+ } catch (final Exception e) {
+ assertTrue(e.getMessage().contains(
+ "must be a non-blank string containing password for distribution rest server credentials"));
+ }
+ }
}
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.distribution.main.rest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+import javax.ws.rs.client.Invocation;
+import javax.ws.rs.client.WebTarget;
+import javax.ws.rs.core.MediaType;
+
+import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
+import org.junit.Test;
+import org.onap.policy.common.endpoints.report.HealthCheckReport;
+import org.onap.policy.distribution.main.PolicyDistributionException;
+import org.onap.policy.distribution.main.parameters.CommonTestData;
+import org.onap.policy.distribution.main.parameters.RestServerParameters;
+import org.onap.policy.distribution.main.startstop.Main;
+
+/**
+ * Class to perform unit test of HealthCheckMonitor.
+ *
+ * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
+ */
+public class TestDistributionRestServer {
+
+ private static final String NOT_ALIVE = "not alive";
+ private static final String ALIVE = "alive";
+ private static final String SELF = "self";
+ private static final String NAME = "Policy SSD";
+
+ @Test
+ public void testHealthCheckSuccess() throws PolicyDistributionException, InterruptedException {
+ final String reportString = "Report [name=Policy SSD, url=self, healthy=true, code=200, message=alive]";
+ final Main main = startDistributionService();
+ final HealthCheckReport report = performHealthCheck();
+ validateReport(NAME, SELF, true, 200, ALIVE, reportString, report);
+ stopDistributionService(main);
+ }
+
+ @Test
+ public void testHealthCheckFailure() throws InterruptedException {
+ final String reportString = "Report [name=Policy SSD, url=self, healthy=false, code=500, message=not alive]";
+ final RestServerParameters restServerParams = new CommonTestData().getRestServerParameters(false);
+ restServerParams.setName(CommonTestData.DISTRIBUTION_GROUP_NAME);
+ final DistributionRestServer restServer = new DistributionRestServer(restServerParams);
+ restServer.start();
+ final HealthCheckReport report = performHealthCheck();
+ validateReport(NAME, SELF, false, 500, NOT_ALIVE, reportString, report);
+ assertTrue(restServer.isAlive());
+ assertTrue(restServer.toString().startsWith("DistributionRestServer [servers="));
+ restServer.shutdown();
+ }
+
+ private Main startDistributionService() {
+ final String[] distributionConfigParameters = { "-c", "parameters/DistributionConfigParameters.json" };
+ return new Main(distributionConfigParameters);
+ }
+
+ private void stopDistributionService(final Main main) throws PolicyDistributionException {
+ main.shutdown();
+ }
+
+ private HealthCheckReport performHealthCheck() throws InterruptedException {
+ HealthCheckReport response;
+ final ClientConfig clientConfig = new ClientConfig();
+
+ final HttpAuthenticationFeature feature = HttpAuthenticationFeature.basic("healthcheck", "zb!XztG34");
+ clientConfig.register(feature);
+
+ final Client client = ClientBuilder.newClient(clientConfig);
+ final WebTarget webTarget = client.target("http://localhost:6969/healthcheck");
+
+ final Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);
+ try {
+ response = invocationBuilder.get(HealthCheckReport.class);
+ } catch (final Exception exp) {
+ // may be the server is not started yet. Wait for couple of seconds and retry.
+ Thread.sleep(2000);
+ response = invocationBuilder.get(HealthCheckReport.class);
+ }
+
+ return response;
+ }
+
+ private void validateReport(final String name, final String url, final boolean healthy, final int code,
+ final String message, final String reportString, final HealthCheckReport report) {
+ assertEquals(name, report.getName());
+ assertEquals(url, report.getUrl());
+ assertEquals(healthy, report.isHealthy());
+ assertEquals(code, report.getCode());
+ assertEquals(message, report.getMessage());
+ assertEquals(reportString, report.toString());
+ }
+}
activator.getParameterGroup().getReceptionHandlerParameters()
.get(CommonTestData.SDC_RECEPTION_HANDLER_KEY).getPluginHandlerParameters()
.getPolicyForwarders().get(CommonTestData.PAP_ENGINE_FORWARDER_KEY).getForwarderType());
- activator.deregisterToParameterService(parGroup);
+ activator.terminate();
}
}
{
"name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ },
"receptionHandlerParameters":{
"SDCReceptionHandler":{
"receptionHandlerType":"SDC",
{
"name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ },
"receptionHandlerParameters":{
"SDCReceptionHandler":{
"receptionHandlerType":"SDC",
{
"name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ },
"receptionHandlerParameters":{
"SDCReceptionHandler":{
"receptionHandlerType":"SDC",
{
"name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ },
"receptionHandlerParameters":{
}
}
\ No newline at end of file
{
"name":" ",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ },
"receptionHandlerParameters":{
"SDCReceptionHandler":{
"receptionHandlerType":"SDC",
{
"name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ },
"receptionHandlerParameters":{
"SDCReceptionHandler":{
"receptionHandlerType":"SDC",
{
"name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ },
"receptionHandlerParameters":{
"SDCReceptionHandler":{
"receptionHandlerType":"SDC",
{
"name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ },
"receptionHandlerParameters":{
"SDCReceptionHandler":{
"receptionHandlerType":"SDC",
{
"name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ },
"receptionHandlerParameters":{
"SDCReceptionHandler":{
"receptionHandlerType":"SDC",
{
"name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ },
"receptionHandlerParameters":{
"SDCReceptionHandler":{
"receptionHandlerType":"SDC",
{
"name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ },
"receptionHandlerParameters":{
"SDCReceptionHandler":{
"receptionHandlerType":" ",
--- /dev/null
+{
+ "name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ },
+ "receptionHandlerParameters":{
+ "SDCReceptionHandler":{
+ "receptionHandlerType":"SDC",
+ "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandler",
+ "pssdConfiguration":{
+ "asdcAddress": "localhost",
+ "messageBusAddress": [
+ "a.com",
+ "b.com",
+ "c.com"
+ ],
+ "user": "tbdsdc-1480",
+ "password": "tbdsdc-1480",
+ "pollingInterval":20,
+ "pollingTimeout":30,
+ "consumerId": "policy-id",
+ "artifactTypes": [
+ "TOSCA_CSAR",
+ "HEAT"
+ ],
+ "consumerGroup": "policy-group",
+ "environmentName": "environmentName",
+ "keystorePath": "null",
+ "keystorePassword": "null",
+ "activeserverTlsAuth": false,
+ "isFilterinEmptyResources": true,
+ "isUseHttpsWithDmaap": false
+ },
+ "pluginHandlerParameters":{
+ "policyDecoders":{
+ "TOSCADecoder":{
+ "decoderType":"TOSCA",
+ "decoderClassName":"org.onap.policy.distribution.reception.decoding.pdpx.PolicyDecoderToscaPdpx"
+ }
+ },
+ "policyForwarders":{
+ "PAPEngineForwarder":{
+ "forwarderType":"PAPEngine",
+ "forwarderClassName":"org.onap.policy.distribution.forwarding.pap.engine.XacmlPapServletPolicyForwarder"
+ }
+ }
+ }
+ }
+ }
+}
--- /dev/null
+{
+ "name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":""
+ },
+ "receptionHandlerParameters":{
+ "SDCReceptionHandler":{
+ "receptionHandlerType":"SDC",
+ "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandler",
+ "pssdConfiguration":{
+ "asdcAddress": "localhost",
+ "messageBusAddress": [
+ "a.com",
+ "b.com",
+ "c.com"
+ ],
+ "user": "tbdsdc-1480",
+ "password": "tbdsdc-1480",
+ "pollingInterval":20,
+ "pollingTimeout":30,
+ "consumerId": "policy-id",
+ "artifactTypes": [
+ "TOSCA_CSAR",
+ "HEAT"
+ ],
+ "consumerGroup": "policy-group",
+ "environmentName": "environmentName",
+ "keystorePath": "null",
+ "keystorePassword": "null",
+ "activeserverTlsAuth": false,
+ "isFilterinEmptyResources": true,
+ "isUseHttpsWithDmaap": false
+ },
+ "pluginHandlerParameters":{
+ "policyDecoders":{
+ "TOSCADecoder":{
+ "decoderType":"TOSCA",
+ "decoderClassName":"org.onap.policy.distribution.reception.decoding.pdpx.PolicyDecoderToscaPdpx"
+ }
+ },
+ "policyForwarders":{
+ "PAPEngineForwarder":{
+ "forwarderType":"PAPEngine",
+ "forwarderClassName":"org.onap.policy.distribution.forwarding.pap.engine.XacmlPapServletPolicyForwarder"
+ }
+ }
+ }
+ }
+ }
+}
--- /dev/null
+{
+ "name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":-1,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ },
+ "receptionHandlerParameters":{
+ "SDCReceptionHandler":{
+ "receptionHandlerType":"SDC",
+ "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandler",
+ "pssdConfiguration":{
+ "asdcAddress": "localhost",
+ "messageBusAddress": [
+ "a.com",
+ "b.com",
+ "c.com"
+ ],
+ "user": "tbdsdc-1480",
+ "password": "tbdsdc-1480",
+ "pollingInterval":20,
+ "pollingTimeout":30,
+ "consumerId": "policy-id",
+ "artifactTypes": [
+ "TOSCA_CSAR",
+ "HEAT"
+ ],
+ "consumerGroup": "policy-group",
+ "environmentName": "environmentName",
+ "keystorePath": "null",
+ "keystorePassword": "null",
+ "activeserverTlsAuth": false,
+ "isFilterinEmptyResources": true,
+ "isUseHttpsWithDmaap": false
+ },
+ "pluginHandlerParameters":{
+ "policyDecoders":{
+ "TOSCADecoder":{
+ "decoderType":"TOSCA",
+ "decoderClassName":"org.onap.policy.distribution.reception.decoding.pdpx.PolicyDecoderToscaPdpx"
+ }
+ },
+ "policyForwarders":{
+ "PAPEngineForwarder":{
+ "forwarderType":"PAPEngine",
+ "forwarderClassName":"org.onap.policy.distribution.forwarding.pap.engine.XacmlPapServletPolicyForwarder"
+ }
+ }
+ }
+ }
+ }
+}
--- /dev/null
+{
+ "name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"",
+ "password":"zb!XztG34"
+ },
+ "receptionHandlerParameters":{
+ "SDCReceptionHandler":{
+ "receptionHandlerType":"SDC",
+ "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandler",
+ "pssdConfiguration":{
+ "asdcAddress": "localhost",
+ "messageBusAddress": [
+ "a.com",
+ "b.com",
+ "c.com"
+ ],
+ "user": "tbdsdc-1480",
+ "password": "tbdsdc-1480",
+ "pollingInterval":20,
+ "pollingTimeout":30,
+ "consumerId": "policy-id",
+ "artifactTypes": [
+ "TOSCA_CSAR",
+ "HEAT"
+ ],
+ "consumerGroup": "policy-group",
+ "environmentName": "environmentName",
+ "keystorePath": "null",
+ "keystorePassword": "null",
+ "activeserverTlsAuth": false,
+ "isFilterinEmptyResources": true,
+ "isUseHttpsWithDmaap": false
+ },
+ "pluginHandlerParameters":{
+ "policyDecoders":{
+ "TOSCADecoder":{
+ "decoderType":"TOSCA",
+ "decoderClassName":"org.onap.policy.distribution.reception.decoding.pdpx.PolicyDecoderToscaPdpx"
+ }
+ },
+ "policyForwarders":{
+ "PAPEngineForwarder":{
+ "forwarderType":"PAPEngine",
+ "forwarderClassName":"org.onap.policy.distribution.forwarding.pap.engine.XacmlPapServletPolicyForwarder"
+ }
+ }
+ }
+ }
+ }
+}
{
"name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ },
"receptionHandlerParameters":{
"SDCReceptionHandler":{
"receptionHandlerType":"SDC",
{
"name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ },
"receptionHandlerParameters":{
"SDCReceptionHandler":{
"receptionHandlerType":"SDC",
{
- "name":"SDCDistributionGroup"
+ "name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ }
}
\ No newline at end of file
{
"name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ },
"receptionHandlerParameters":{
"SDCReceptionHandler":{
"receptionHandlerType":"SDC",
{
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ }
}
\ No newline at end of file