<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-jdbc</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
spring:
datasource:
- jdbc-url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb
+ url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
driver-class-name: org.mariadb.jdbc.Driver
# H2
spring:
datasource:
- jdbc-url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;
+ url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;
username: sa
password: sa
driver-class-name: org.h2.Driver
retryMultiplier: 60000
spring:
datasource:
- type: com.zaxxer.hikari.HikariDataSource
url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-jdbc</artifactId>
+ </exclusion>
+ </exclusions>
<optional>true</optional>
</dependency>
<dependency>
-# will be used as entry in DB to say SITE OFF/ON for healthcheck
-
-server:
- port: 8090
- tomcat:
- max-threads: 50
-ssl-enable: false
-mso:
- adapters:
- requestDb:
- auth: Basic YnBlbDptc28tZGItMTUwNyE=
- endpoint: http://localhost:8081
- logPath: logs
- site-name: localSite
- infra-requests:
- archived:
- period: 180
-spring:
- datasource:
- jdbc-url: jdbc:mariadb://localhost:3306/requestdb
- username: catalog
- password: catalog123
- driver-class-name: org.mariadb.jdbc.Driver
- initialize: true
- initialization-mode: never
- jpa:
- generate-ddl: false
- show-sql: false
- hibernate:
- ddl-auto: validate
- naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
- enable-lazy-load-no-trans: true
- database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
- security:
- usercredentials:
- -
- username: bpel
- password: '$2a$12$1xyutEZNfjGewIZRfKaE8eZE99f5sYFUmmM80BobI65KNjmcK0JuO'
- role: BPEL-Client
- -
- username: mso_admin
- password: '$2a$12$tidKuu.h88E2nuL95pTVY.ZOYMN/1dp29A9b1o.0GFDsVVSYlMkHa'
- role: ACTUATOR
-
-
-flyway:
- baseline-on-migrate: false
- url: jdbc:mariadb://localhost:3306/requestdb
- user: catalog
- password: catalog123
+# will be used as entry in DB to say SITE OFF/ON for healthcheck\r
+\r
+server:\r
+ port: 8090\r
+ tomcat:\r
+ max-threads: 50\r
+ssl-enable: false\r
+mso:\r
+ adapters:\r
+ requestDb:\r
+ auth: Basic YnBlbDptc28tZGItMTUwNyE=\r
+ endpoint: http://localhost:8081\r
+ logPath: logs\r
+ site-name: localSite\r
+ infra-requests:\r
+ archived:\r
+ period: 180\r
+spring:\r
+ datasource:\r
+ url: jdbc:mariadb://localhost:3306/requestdb\r
+ username: catalog\r
+ password: catalog123\r
+ driver-class-name: org.mariadb.jdbc.Driver\r
+ initialize: true\r
+ initialization-mode: never\r
+ jpa:\r
+ generate-ddl: false\r
+ show-sql: false\r
+ hibernate:\r
+ ddl-auto: validate\r
+ naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy\r
+ enable-lazy-load-no-trans: true\r
+ database-platform: org.hibernate.dialect.MySQL5InnoDBDialect\r
+ security:\r
+ usercredentials:\r
+ -\r
+ username: bpel\r
+ password: '$2a$12$1xyutEZNfjGewIZRfKaE8eZE99f5sYFUmmM80BobI65KNjmcK0JuO'\r
+ role: BPEL-Client\r
+ - \r
+ username: mso_admin\r
+ password: '$2a$12$tidKuu.h88E2nuL95pTVY.ZOYMN/1dp29A9b1o.0GFDsVVSYlMkHa'\r
+ role: ACTUATOR\r
+\r
+\r
+flyway:\r
+ baseline-on-migrate: false\r
+ url: jdbc:mariadb://localhost:3306/requestdb\r
+ user: catalog\r
+ password: catalog123\r
\ No newline at end of file
# H2
spring:
datasource:
- jdbc-url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/requestdb
+ url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/requestdb
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
driver-class-name: org.mariadb.jdbc.Driver
- dbcp2:
- initial-size: 5
- max-total: 20
- validation-query: select 1
- test-on-borrow: true
jpa:
show-sql: false
hibernate:
-# will be used as entry in DB to say SITE OFF/ON for healthcheck
-security:
- basic:
- enabled: false
-server:
- port: 8080
- tomcat:
- max-threads: 50
-ssl-enable: false
-mso:
- adapters:
- requestDb:
- auth: Basic YnBlbDptc28tZGItMTUwNyE=
- endpoint: http://localhost:8081
- logPath: logs
- site-name: localSite
- infra-requests:
- archived:
- period: 0
-spring:
- datasource:
- jdbc-url: jdbc:mariadb://localhost:3307/requestdb
- username: root
- password: password
- driver-class-name: org.mariadb.jdbc.Driver
- initialize: true
- initialization-mode: never
- jpa:
- generate-ddl: false
- show-sql: false
- hibernate:
- ddl-auto: validate
- naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
- enable-lazy-load-no-trans: true
- database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
- security:
- usercredentials:
- -
- username: bpel
- password: '$2a$12$1xyutEZNfjGewIZRfKaE8eZE99f5sYFUmmM80BobI65KNjmcK0JuO'
- role: BPEL-Client
- -
- username: mso_admin
- password: '$2a$12$tidKuu.h88E2nuL95pTVY.ZOYMN/1dp29A9b1o.0GFDsVVSYlMkHa'
- role: ACTUATOR
-mariaDB4j:
- dataDir:
- port: 3307
- databaseName: requestdb
-
-management:
- endpoints:
- web:
- base-path: /manage
- server:
- servlet:
- context-path: /manage
- metrics:
- se-global-registry: false
- export:
- prometheus:
- enabled: true # Whether exporting of metrics to Prometheus is enabled.
- step: 1m # Step size (i.e. reporting frequency) to use.
-
-
-flyway:
- baseline-on-migrate: false
- jdbc-url: jdbc:mariadb://localhost:3307/requestdb
- user: root
- password: password
+# will be used as entry in DB to say SITE OFF/ON for healthcheck\r
+security:\r
+ basic:\r
+ enabled: false\r
+server:\r
+ port: 8080\r
+ tomcat:\r
+ max-threads: 50\r
+ssl-enable: false\r
+mso:\r
+ adapters:\r
+ requestDb:\r
+ auth: Basic YnBlbDptc28tZGItMTUwNyE=\r
+ endpoint: http://localhost:8081\r
+ logPath: logs\r
+ site-name: localSite\r
+ infra-requests:\r
+ archived:\r
+ period: 0\r
+spring:\r
+ datasource:\r
+ url: jdbc:mariadb://localhost:3307/requestdb\r
+ username: root\r
+ password: password\r
+ driver-class-name: org.mariadb.jdbc.Driver\r
+ initialize: true\r
+ initialization-mode: never\r
+ jpa: \r
+ generate-ddl: false\r
+ show-sql: false\r
+ hibernate: \r
+ ddl-auto: validate\r
+ naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy\r
+ enable-lazy-load-no-trans: true\r
+ database-platform: org.hibernate.dialect.MySQL5InnoDBDialect\r
+ security:\r
+ usercredentials:\r
+ -\r
+ username: bpel\r
+ password: '$2a$12$1xyutEZNfjGewIZRfKaE8eZE99f5sYFUmmM80BobI65KNjmcK0JuO'\r
+ role: BPEL-Client\r
+ - \r
+ username: mso_admin\r
+ password: '$2a$12$tidKuu.h88E2nuL95pTVY.ZOYMN/1dp29A9b1o.0GFDsVVSYlMkHa'\r
+ role: ACTUATOR\r
+mariaDB4j:\r
+ dataDir: \r
+ port: 3307\r
+ databaseName: requestdb\r
+\r
+management:\r
+ endpoints:\r
+ web:\r
+ base-path: /manage\r
+ server:\r
+ servlet:\r
+ context-path: /manage\r
+ metrics:\r
+ se-global-registry: false\r
+ export:\r
+ prometheus:\r
+ enabled: true # Whether exporting of metrics to Prometheus is enabled.\r
+ step: 1m # Step size (i.e. reporting frequency) to use. \r
+\r
+\r
+flyway:\r
+ baseline-on-migrate: false\r
+ url: jdbc:mariadb://localhost:3307/requestdb\r
+ user: root\r
+ password: password\r
package org.onap.so.client.dmaapproperties;
-import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
-import static com.github.tomakehurst.wiremock.client.WireMock.post;
-import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
import java.io.File;
import java.io.IOException;
-import org.apache.http.HttpStatus;
+import org.junit.Before;
import org.junit.Test;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.onap.so.BaseTest;
import org.onap.so.client.avpn.dmaap.beans.AVPNDmaapBean;
import org.onap.so.client.exception.MapperException;
-import org.onap.so.BaseTest;
+import org.onap.so.client.dmaapproperties.GlobalDmaapPublisher;
import org.springframework.beans.factory.annotation.Autowired;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
-import static com.github.tomakehurst.wiremock.client.WireMock.*;
public class DmaapPropertiesClientTest extends BaseTest{
@Test
public void testDmaapPublishRequest() throws JsonProcessingException, MapperException {
- stubFor(post(urlEqualTo("/events/com.att.mso.asyncStatusUpdate?timeout=60000"))
- .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_ACCEPTED)));
-
- dmaapPropertiesClient.dmaapPublishRequest(requestId, clientSource, correlator, serviceInstanceId, startTime, finishTime, requestScope,
- requestType, timestamp, requestState, statusMessage, percentProgress, false);
+ DmaapPropertiesClient client = Mockito.spy(DmaapPropertiesClient.class);
+ GlobalDmaapPublisher mockedClientDmaapPublisher = Mockito.mock(GlobalDmaapPublisher.class);
+ AVPNDmaapBean mockedDmaapBean = Mockito.mock(AVPNDmaapBean.class);
+ String request = "test";
+
+ doReturn(mockedDmaapBean).when(client).buildRequestJson(requestId, clientSource, correlator, serviceInstanceId, startTime, finishTime, requestScope,
+ requestType, timestamp, requestState, statusMessage, percentProgress, false);
+
+ AVPNDmaapBean actualDmaapBean = client.buildRequestJson(requestId, clientSource, correlator, serviceInstanceId, startTime, finishTime, requestScope,
+ requestType, timestamp, requestState, statusMessage, percentProgress, false);
+ mockedClientDmaapPublisher.send(request);
+
+ doNothing().when(mockedClientDmaapPublisher).send(anyString());
+
+ verify(client, times(1)).buildRequestJson(requestId, clientSource, correlator, serviceInstanceId, startTime,
+ finishTime, requestScope, requestType, timestamp, requestState, statusMessage, percentProgress, false);
+ verify(mockedClientDmaapPublisher, times(1)).send(request);
+
+ assertNotNull(actualDmaapBean);
}
}
package org.onap.so.client.dmaapproperties;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.onap.so.BaseTest;
import org.springframework.beans.factory.annotation.Autowired;
public class GlobalDmaapPublisherTest extends BaseTest{
+ @BeforeClass
+ public static void setUp() throws Exception {
+ System.setProperty("mso.global.dmaap.host", "http://test:1234");
+ }
+
@Autowired
private GlobalDmaapPublisher globalDmaapPublisher;
-
-
+
@Test
public void testGetters() {
assertEquals("81B7E3533B91A6706830611FB9A8ECE529BBCCE754B1F1520FA7C8698B42F97235BEFA993A387E664D6352C63A6185D68DA7F0B1D360637CBA102CB166E3E62C11EB1F75386D3506BCECE51E54", globalDmaapPublisher.getAuth());
assertEquals("07a7159d3bf51a0e53be7a8f89699be7", globalDmaapPublisher.getKey());
assertEquals("com.att.mso.asyncStatusUpdate", globalDmaapPublisher.getTopic());
- assertEquals("http://localhost:" + wireMockPort, globalDmaapPublisher.getHost().get());
+ assertEquals("http://test:1234", globalDmaapPublisher.getHost().get());
}
}
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-jdbc</artifactId>
+ </exclusion>
+ </exclusions>
<optional>true</optional>
</dependency>
<dependency>
spring:
datasource:
driver-class-name: org.mariadb.jdbc.Driver
- jdbc-url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/camundabpmn
+ url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/camundabpmn
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
http:
headers.latestVersion: 2
spring:
datasource:
- jdbc-url: jdbc:mariadb://localhost:3307/camundabpmn
+ url: jdbc:mariadb://localhost:3307/camundabpmn
username: root
password: password
driver-class-name: org.mariadb.jdbc.Driver
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
import org.onap.so.bpmn.common.scripts.ExceptionUtil;
-import org.onap.so.logger.MsoLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
public class PnfCheckInputs implements JavaDelegate {
public static final String UUID_REGEX = "(?i)^[0-9a-f]{8}-[0-9a-f]{4}-[1-5]{1}[0-9a-f]{3}-[89ab]{1}[0-9a-f]{3}-[0-9a-f]{12}$";
- private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL, PnfCheckInputs.class);
- private String defaultTimeout;
+ private String pnfEntryNotificationTimeout;
@Autowired
- public PnfCheckInputs(@Value("${aai.pnfEntryNotificationTimeout}") String defaultTimeout) {
- this.defaultTimeout = defaultTimeout;
+ public PnfCheckInputs(@Value("${aai.pnfEntryNotificationTimeout}") String pnfEntryNotificationTimeout) {
+ this.pnfEntryNotificationTimeout = pnfEntryNotificationTimeout;
}
@Override
}
private void validateTimeout(DelegateExecution execution) {
- String timeout = (String) execution.getVariable(TIMEOUT_FOR_NOTIFICATION);
- if (Strings.isNullOrEmpty(timeout)) {
- LOGGER.debug("timeoutForPnfEntryNotification variable not found, setting default");
- if (defaultTimeout == null) {
- new ExceptionUtil().buildAndThrowWorkflowException(execution, 9999,
- "default timeoutForPnfEntryNotification value not defined");
- }
- execution.setVariable(TIMEOUT_FOR_NOTIFICATION, defaultTimeout);
+ if (Strings.isNullOrEmpty(pnfEntryNotificationTimeout)) {
+ new ExceptionUtil().buildAndThrowWorkflowException(execution, 9999,
+ "timeoutForPnfEntryNotification value not defined");
}
+ execution.setVariable(TIMEOUT_FOR_NOTIFICATION, pnfEntryNotificationTimeout);
}
private void validateServiceInstanceId(DelegateExecution execution) {
* ================================================================================
* Copyright (C) 2018 Huawei Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* 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
return newRequest;
}
- List<Resource> addResourceList = new ArrayList<Resource>();
+ List<Resource> addResourceList = new ArrayList<>();
addResourceList.addAll(serviceDecomposition.getServiceResources());
serviceDecomposition.setVnfResources(null);
String url = getInventoryOSSEndPoint();
url += "/oss/inventory?location=" + UriUtils.encode(locationAddress,"UTF-8");
String responseContent = sendRequest(url, "GET", "");
- List<Object> accessTPs = new ArrayList<Object>();
+ List<Object> accessTPs = new ArrayList<>();
if (null != responseContent) {
accessTPs = getJsonObject(responseContent, List.class);
}
@SuppressWarnings("unchecked")
private void putResourceRequestInputs(Map<String, Object> resource, Map<String, Object> resourceInputs) {
- Map<String, Object> resourceParametersObject = new HashMap<String, Object>();
- Map<String, Object> resourceRequestInputs = new HashMap<String, Object>();
+ Map<String, Object> resourceParametersObject = new HashMap<>();
+ Map<String, Object> resourceRequestInputs = new HashMap<>();
resourceRequestInputs.put("requestInputs", resourceInputs);
resourceParametersObject.put("parameters", resourceRequestInputs);
// this method check if pInterface is remote
private boolean isRemotePInterface(AAIResourcesClient client, AAIResourceUri uri) {
- Map<String, String> keys = uri.getURIKeys();
String uriString = uri.build().toString();
if (uriString != null) {
}
private List<Object> queryTerminalPointsFromServiceProviderSystem(String srcLocation, String dstLocation) {
- Map<String, String> locationSrc = new HashMap<String, String>();
+ Map<String, String> locationSrc = new HashMap<>();
locationSrc.put("location", srcLocation);
- Map<String, String> locationDst = new HashMap<String, String>();
+ Map<String, String> locationDst = new HashMap<>();
locationDst.put("location", dstLocation);
- List<Map<String, String>> locations = new ArrayList<Map<String, String>>();
+ List<Map<String, String>> locations = new ArrayList<>();
locations.add(locationSrc);
locations.add(locationDst);
- List<Object> returnList = new ArrayList<Object>();
+ List<Object> returnList = new ArrayList<>();
String reqContent = getJsonString(locations);
String url = getThirdSPEndPoint();
String responseContent = sendRequest(url, "POST", reqContent);
Map<String, Object> serviceObject = (Map<String, Object>) uuiObject.get("service");
Map<String, Object> serviceParametersObject = (Map<String, Object>) serviceObject.get("parameters");
Map<String, Object> serviceRequestInputs = (Map<String, Object>) serviceParametersObject.get("requestInputs");
- Map<String, Object> oofQueryObject = new HashMap<String, Object>();
+ Map<String, Object> oofQueryObject = new HashMap<>();
List<Object> resources = (List<Object>) serviceParametersObject.get("resources");
oofQueryObject.put("src-access-provider-id", serviceRequestInputs.get("inner-src-access-provider-id"));
oofQueryObject.put("src-access-client-id", serviceRequestInputs.get("inner-src-access-client-id"));
String url = getOOFCalcEndPoint();
String responseContent = sendRequest(url, "POST", oofRequestReq);
- List<Object> returnList = new ArrayList<Object>();
+ List<Object> returnList = new ArrayList<>();
if (null != responseContent) {
returnList = getJsonObject(responseContent, List.class);
}
}
private Map<String, Object> getReturnRoute(List<Object> returnList){
- Map<String, Object> returnRoute = new HashMap<String,Object>();
+ Map<String, Object> returnRoute = new HashMap<>();
for(Object returnVpn :returnList){
Map<String, Object> returnVpnInfo = (Map<String, Object>) returnVpn;
String accessTopoId = (String)returnVpnInfo.get("access-topology-id");
private Map<String, Object> getResourceParams(Execution execution, String resourceCustomizationUuid,
String serviceParameters) {
List<String> resourceList = jsonUtil.StringArrayToList(execution,
- (String) JsonUtils.getJsonValue(serviceParameters, "resources"));
+ JsonUtils.getJsonValue(serviceParameters, "resources"));
// Get the right location str for resource. default is an empty array.
String resourceInputsFromUui = "";
for (String resource : resourceList) {
- String resCusUuid = (String) JsonUtils.getJsonValue(resource, "resourceCustomizationUuid");
+ String resCusUuid = JsonUtils.getJsonValue(resource, "resourceCustomizationUuid");
if (resourceCustomizationUuid.equals(resCusUuid)) {
String resourceParameters = JsonUtils.getJsonValue(resource, "parameters");
resourceInputsFromUui = JsonUtils.getJsonValue(resourceParameters, "requestInputs");
method = httpDelete;
}
- // now have no auth
- // String userCredentials =
- // SDNCAdapterProperties.getEncryptedProperty(Constants.SDNC_AUTH_PROP,
- // Constants.DEFAULT_SDNC_AUTH, Constants.ENCRYPTION_KEY);
- // String authorization = "Basic " +
- // DatatypeConverter.printBase64Binary(userCredentials.getBytes());
- // method.setHeader("Authorization", authorization);
-
httpResponse = client.execute(method);
String responseContent = null;
if (null != httpResponse && httpResponse.getEntity() != null) {
package org.onap.so.bpmn.infrastructure.pnf.delegate;
-import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_UUID;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.SERVICE_INSTANCE_ID;
-import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.TIMEOUT_FOR_NOTIFICATION;
import java.util.UUID;
+import org.apache.commons.lang3.StringUtils;
import org.camunda.bpm.engine.delegate.BpmnError;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake;
public class PnfCheckInputsTest {
- private static final String DEFAULT_TIMEOUT = "P1D";
+ private static final String PNF_ENTRY_NOTIFICATION_TIMEOUT = "P1D";
private static final String VALID_UUID = UUID.nameUUIDFromBytes("testUuid".getBytes()).toString();
private static final String RESERVED_UUID = new UUID(0, 0).toString();
private static final String DEFAULT_SERVICE_INSTANCE_ID = "da7d07d9-b71c-4128-809d-2ec01c807169";
@Test
public void shouldThrowException_whenCorrelationIdNotSet() {
- PnfCheckInputs testedObject = new PnfCheckInputs(DEFAULT_TIMEOUT);
+ PnfCheckInputs testedObject = new PnfCheckInputs(PNF_ENTRY_NOTIFICATION_TIMEOUT);
DelegateExecution execution = delegateExecutionBuilder.setCorrelationId(null).setPnfUuid(VALID_UUID).build();
assertThatThrownBy(() -> testedObject.execute(execution)).isInstanceOf(BpmnError.class);
}
@Test
- public void shouldThrowException_whenTimeoutIsEmptyStringAndDefaultIsNotDefined() {
+ public void shouldThrowException_whenPnfEntryNotificationTimeoutIsNull() {
PnfCheckInputs testedObject = new PnfCheckInputs(null);
- DelegateExecution execution = delegateExecutionBuilder.setTimeoutForNotification("").build();
+ DelegateExecution execution = delegateExecutionBuilder.build();
assertThatThrownBy(() -> testedObject.execute(execution)).isInstanceOf(BpmnError.class);
}
@Test
- public void shouldSetDefaultTimeout_whenTimeoutIsNotSet() {
- PnfCheckInputs testedObject = new PnfCheckInputs(DEFAULT_TIMEOUT);
- DelegateExecution execution = delegateExecutionBuilder.setTimeoutForNotification(null).build();
- testedObject.execute(execution);
- assertThat(execution.getVariable(TIMEOUT_FOR_NOTIFICATION)).isEqualTo(DEFAULT_TIMEOUT);
+ public void shouldThrowException_whenPnfEntryNotificationTimeoutIsEmpty() {
+ PnfCheckInputs testedObject = new PnfCheckInputs(StringUtils.EMPTY);
+ DelegateExecution execution = delegateExecutionBuilder.build();
+ assertThatThrownBy(() -> testedObject.execute(execution)).isInstanceOf(BpmnError.class);
}
@Test
public void shouldThrowException_whenPnfUuidIsNotSet() {
- PnfCheckInputs testedObject = new PnfCheckInputs(DEFAULT_TIMEOUT);
+ PnfCheckInputs testedObject = new PnfCheckInputs(PNF_ENTRY_NOTIFICATION_TIMEOUT);
DelegateExecution execution = delegateExecutionBuilder.setPnfUuid(null).build();
assertThatThrownBy(() -> testedObject.execute(execution)).isInstanceOf(BpmnError.class);
}
@Test
public void shouldThrowException_whenPnfUuidIsEmptyString() {
- PnfCheckInputs testedObject = new PnfCheckInputs(DEFAULT_TIMEOUT);
- DelegateExecution execution = delegateExecutionBuilder.setPnfUuid("").build();
+ PnfCheckInputs testedObject = new PnfCheckInputs(PNF_ENTRY_NOTIFICATION_TIMEOUT);
+ DelegateExecution execution = delegateExecutionBuilder.setPnfUuid(StringUtils.EMPTY).build();
assertThatThrownBy(() -> testedObject.execute(execution)).isInstanceOf(BpmnError.class);
}
@Test
public void shouldThrowException_whenPnfUuidIsReservedUuid() {
- PnfCheckInputs testedObject = new PnfCheckInputs(DEFAULT_TIMEOUT);
+ PnfCheckInputs testedObject = new PnfCheckInputs(PNF_ENTRY_NOTIFICATION_TIMEOUT);
DelegateExecution execution = delegateExecutionBuilder.setPnfUuid(RESERVED_UUID).build();
assertThatThrownBy(() -> testedObject.execute(execution)).isInstanceOf(BpmnError.class);
}
@Test
public void shouldThrowException_whenServiceInstanceIdIsNotSet() {
- PnfCheckInputs testedObject = new PnfCheckInputs(DEFAULT_TIMEOUT);
+ PnfCheckInputs testedObject = new PnfCheckInputs(PNF_ENTRY_NOTIFICATION_TIMEOUT);
DelegateExecution execution = delegateExecutionBuilder.setServiceInstanceId(null).build();
assertThatThrownBy(() -> testedObject.execute(execution)).isInstanceOf(BpmnError.class);
}
private String correlationId = DEFAULT_CORRELATION_ID;
private String pnfUuid = VALID_UUID;
private String serviceInstanceId = DEFAULT_SERVICE_INSTANCE_ID;
- private String timeoutForNotification;
public DelegateExecutionBuilder setCorrelationId(String correlationId) {
this.correlationId = correlationId;
return this;
}
- public DelegateExecutionBuilder setTimeoutForNotification(String timeoutForNotification) {
- this.timeoutForNotification = timeoutForNotification;
- return this;
- }
-
public DelegateExecution build() {
DelegateExecution execution = new DelegateExecutionFake();
execution.setVariable("testProcessKey", "testProcessKeyValue");
execution.setVariable(CORRELATION_ID, this.correlationId);
execution.setVariable(PNF_UUID, this.pnfUuid);
execution.setVariable(SERVICE_INSTANCE_ID, this.serviceInstanceId);
- execution.setVariable(TIMEOUT_FOR_NOTIFICATION, this.timeoutForNotification);
return execution;
}
}
import javax.ws.rs.core.Response;
import org.onap.so.client.ResponseExceptionMapper;
-import org.onap.so.client.RestClientSSL;
import org.onap.so.client.graphinventory.GraphInventoryPatchConverter;
+import org.onap.so.client.graphinventory.GraphInventoryRestClient;
import org.onap.so.client.policy.CommonObjectMapperProvider;
import org.onap.so.utils.TargetEntity;
-public class AAIRestClient extends RestClientSSL {
+public class AAIRestClient extends GraphInventoryRestClient {
private final AAIProperties aaiProperties;
- private static final AAICommonObjectMapperProvider standardProvider = new AAICommonObjectMapperProvider();
- private final GraphInventoryPatchConverter patchConverter = new GraphInventoryPatchConverter();
-
protected AAIRestClient(AAIProperties props, URI uri) {
- super(props, Optional.of(uri));
+ super(props, uri);
this.aaiProperties = props;
}
return Optional.of(new AAIClientResponseExceptionMapper());
}
- @Override
- protected CommonObjectMapperProvider getCommonObjectMapperProvider() {
- return standardProvider;
- }
-
- @Override
- public Response patch(Object obj) {
- return super.patch(convertToPatchFormat(obj));
- }
-
- @Override
- public <T> T patch(Object obj, Class<T> resultClass) {
- return super.patch(convertToPatchFormat(obj), resultClass);
- }
-
protected GraphInventoryPatchConverter getPatchConverter() {
return this.patchConverter;
}
-
- protected String convertToPatchFormat(Object obj) {
- return getPatchConverter().convertPatchFormat(obj);
- }
}
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class AAIResultWrapper extends GraphInventoryResultWrapper implements Serializable {
+public class AAIResultWrapper extends GraphInventoryResultWrapper<Relationships> implements Serializable {
private static final long serialVersionUID = 5895841925807816737L;
private final static transient Logger logger = LoggerFactory.getLogger(AAIResultWrapper.class);
public AAIResultWrapper(Object aaiObject) {
super(aaiObject, logger);
}
+
+ @Override
+ protected Relationships createRelationships(String json) {
+ return new Relationships(json);
+ }
}
package org.onap.so.client.aai.entities;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import java.util.function.Predicate;
import javax.ws.rs.core.UriBuilder;
-import org.onap.so.client.aai.AAICommonObjectMapperProvider;
import org.onap.so.client.aai.AAIObjectType;
import org.onap.so.client.aai.AAIResourcesClient;
import org.onap.so.client.aai.entities.uri.AAIResourceUri;
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.client.graphinventory.GraphInventoryObjectName;
-import org.onap.so.jsonpath.JsonPathUtil;
+import org.onap.so.client.graphinventory.entities.GraphInventoryRelationships;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.base.CaseFormat;
+public class Relationships extends GraphInventoryRelationships<AAIResultWrapper, AAIResourceUri, AAIObjectType>{
-public class Relationships {
-
- private final ObjectMapper mapper;
- private Map<String, Object> map;
- private final String jsonBody;
public Relationships(String json) {
- this.jsonBody = json;
- this.mapper = new AAICommonObjectMapperProvider().getMapper();
- try {
- this.map = mapper.readValue(json, new TypeReference<Map<String, Object>>() {});
- } catch (IOException e) {
- this.map = new HashMap<>();
- }
- }
-
- public List<AAIResultWrapper> getByType(GraphInventoryObjectName type) {
-
- return this.getAll(Optional.of(type));
- }
-
- public List<AAIResultWrapper> getAll() {
-
- return this.getAll(Optional.empty());
- }
-
-
- public List<String> getRelatedLinks() {
- return this.getRelatedLinks(Optional.empty());
- }
-
- public List<String> getRelatedLinks(GraphInventoryObjectName type) {
- return this.getRelatedLinks(Optional.of(type));
+ super(json);
}
+ @Deprecated
+ /**
+ * Use getRelatedUris instead
+ * @return
+ */
public List<AAIResourceUri> getRelatedAAIUris() {
- return this.getRelatedAAIUris(x -> true);
+ return this.getRelatedUris();
}
+ @Deprecated
+ /**
+ * Use getRelatedUris instead
+ * @return
+ */
public List<AAIResourceUri> getRelatedAAIUris(GraphInventoryObjectName type) {
- return this.getRelatedAAIUris(x -> type.typeName().equals(x));
- }
- protected List<AAIResourceUri> getRelatedAAIUris(Predicate<String> p) {
- List<AAIResourceUri> result = new ArrayList<>();
- if (map.containsKey("relationship")) {
- List<Map<String, Object>> relationships = (List<Map<String, Object>>)map.get("relationship");
- for (Map<String, Object> relationship : relationships) {
- final String relatedTo = (String)relationship.get("related-to");
- if (p.test(relatedTo)) {
- AAIObjectType type;
- type = AAIObjectType.fromTypeName(relatedTo);
- final String relatedLink = (String)relationship.get("related-link");
-
- result.add(AAIUriFactory.createResourceFromExistingURI(type, UriBuilder.fromPath(relatedLink).build()));
- }
- }
- }
- return result;
+ return this.getRelatedUris(type);
}
-
- protected List<AAIResultWrapper> getAll(final Optional<GraphInventoryObjectName> type) {
- List<AAIResourceUri> relatedLinks;
- if (type.isPresent()) {
- relatedLinks = this.getRelatedAAIUris(type.get());
- } else {
- relatedLinks = this.getRelatedAAIUris();
- }
- ArrayList<AAIResultWrapper> result = new ArrayList<>();
- for (AAIResourceUri link : relatedLinks) {
- result.add(this.get(link));
- }
- return result;
- }
-
protected AAIResultWrapper get(AAIResourceUri uri) {
return new AAIResourcesClient().get(uri);
}
-
- protected List<String> getRelatedLinks(Optional<GraphInventoryObjectName> type) {
- String matcher = "";
- if (type.isPresent()) {
- matcher = "[?(@.related-to=='" + type.get() + "')]";
- }
- return JsonPathUtil.getInstance().locateResultList(this.jsonBody, String.format("$.relationship%s.related-link", matcher));
+
+ @Override
+ protected AAIResourceUri createUri(AAIObjectType type, String relatedLink) {
+
+ return AAIUriFactory.createResourceFromExistingURI(type, UriBuilder.fromPath(relatedLink).build());
}
-
- public String getJson() {
- return this.jsonBody;
+
+ @Override
+ protected AAIObjectType fromTypeName(String name) {
+ return AAIObjectType.fromTypeName(name);
}
}
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.client.graphinventory;
+
+import java.net.URI;
+import java.util.Map;
+import java.util.Optional;
+
+import javax.ws.rs.core.Response;
+
+import org.onap.so.client.ResponseExceptionMapper;
+import org.onap.so.client.RestClientSSL;
+import org.onap.so.client.RestProperties;
+import org.onap.so.client.policy.CommonObjectMapperProvider;
+import org.onap.so.utils.TargetEntity;
+
+public abstract class GraphInventoryRestClient extends RestClientSSL {
+
+ protected static final GraphInventoryCommonObjectMapperProvider standardProvider = new GraphInventoryCommonObjectMapperProvider();
+
+ protected final GraphInventoryPatchConverter patchConverter = new GraphInventoryPatchConverter();
+
+ protected GraphInventoryRestClient(RestProperties props, URI uri) {
+ super(props, Optional.of(uri));
+ }
+
+ @Override
+ public abstract TargetEntity getTargetEntity();
+
+ @Override
+ protected abstract void initializeHeaderMap(Map<String, String> headerMap);
+
+ @Override
+ protected abstract Optional<ResponseExceptionMapper> addResponseExceptionMapper();
+
+ @Override
+ protected CommonObjectMapperProvider getCommonObjectMapperProvider() {
+ return standardProvider;
+ }
+
+ @Override
+ public Response patch(Object obj) {
+ return super.patch(convertToPatchFormat(obj));
+ }
+
+ @Override
+ public <T> T patch(Object obj, Class<T> resultClass) {
+ return super.patch(convertToPatchFormat(obj), resultClass);
+ }
+
+ protected GraphInventoryPatchConverter getPatchConverter() {
+ return this.patchConverter;
+ }
+
+ protected String convertToPatchFormat(Object obj) {
+ return getPatchConverter().convertPatchFormat(obj);
+ }
+
+}
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.client.graphinventory.entities;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.function.Predicate;
+
+import org.onap.so.client.aai.AAICommonObjectMapperProvider;
+import org.onap.so.client.aai.AAIObjectType;
+import org.onap.so.client.aai.entities.AAIResultWrapper;
+import org.onap.so.client.aai.entities.uri.AAIResourceUri;
+import org.onap.so.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
+import org.onap.so.client.graphinventory.GraphInventoryObjectName;
+import org.onap.so.client.graphinventory.GraphInventoryObjectType;
+import org.onap.so.client.graphinventory.entities.uri.GraphInventoryResourceUri;
+import org.onap.so.jsonpath.JsonPathUtil;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public abstract class GraphInventoryRelationships<Wrapper extends GraphInventoryResultWrapper, Uri extends GraphInventoryResourceUri, Type extends GraphInventoryObjectType> {
+
+ protected final ObjectMapper mapper;
+ protected Map<String, Object> map;
+ protected final String jsonBody;
+
+ public GraphInventoryRelationships(String json) {
+ this.jsonBody = json;
+ this.mapper = new GraphInventoryCommonObjectMapperProvider().getMapper();
+ try {
+ this.map = mapper.readValue(json, new TypeReference<Map<String, Object>>() {});
+ } catch (IOException e) {
+ this.map = new HashMap<>();
+ }
+ }
+
+ public List<Wrapper> getByType(GraphInventoryObjectName type) {
+
+ return this.getAll(Optional.of(type));
+ }
+
+ public List<Wrapper> getAll() {
+
+ return this.getAll(Optional.empty());
+ }
+
+
+ public List<String> getRelatedLinks() {
+ return this.getRelatedLinks(Optional.empty());
+ }
+
+ public List<String> getRelatedLinks(GraphInventoryObjectName type) {
+ return this.getRelatedLinks(Optional.of(type));
+ }
+
+ public List<Uri> getRelatedUris() {
+ return this.getRelatedUris(x -> true);
+ }
+
+ public List<Uri> getRelatedUris(GraphInventoryObjectName type) {
+ return this.getRelatedUris(x -> type.typeName().equals(x));
+ }
+ protected List<Uri> getRelatedUris(Predicate<String> p) {
+ List<Uri> result = new ArrayList<>();
+ if (map.containsKey("relationship")) {
+ List<Map<String, Object>> relationships = (List<Map<String, Object>>)map.get("relationship");
+ for (Map<String, Object> relationship : relationships) {
+ final String relatedTo = (String)relationship.get("related-to");
+ if (p.test(relatedTo)) {
+ Type type;
+ type = fromTypeName(relatedTo);
+ final String relatedLink = (String)relationship.get("related-link");
+
+ result.add(createUri(type, relatedLink));
+ }
+ }
+ }
+ return result;
+ }
+
+
+
+ protected List<Wrapper> getAll(final Optional<GraphInventoryObjectName> type) {
+ List<Uri> relatedLinks;
+ if (type.isPresent()) {
+ relatedLinks = this.getRelatedUris(type.get());
+ } else {
+ relatedLinks = this.getRelatedUris();
+ }
+ ArrayList<Wrapper> result = new ArrayList<>();
+ for (Uri link : relatedLinks) {
+ result.add(this.get(link));
+ }
+ return result;
+ }
+
+ protected abstract Wrapper get(Uri uri);
+
+ protected abstract Uri createUri(Type type, String relatedLink);
+
+ protected abstract Type fromTypeName(String name);
+
+ protected List<String> getRelatedLinks(Optional<GraphInventoryObjectName> type) {
+ String matcher = "";
+ if (type.isPresent()) {
+ matcher = "[?(@.related-to=='" + type.get() + "')]";
+ }
+ return JsonPathUtil.getInstance().locateResultList(this.jsonBody, String.format("$.relationship%s.related-link", matcher));
+ }
+
+ public String getJson() {
+ return this.jsonBody;
+ }
+}
import java.util.Map;
import java.util.Optional;
-import org.onap.so.client.aai.AAICommonObjectMapperProvider;
-import org.onap.so.client.aai.entities.Relationships;
+import org.onap.so.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
import org.onap.so.jsonpath.JsonPathUtil;
import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
-public class GraphInventoryResultWrapper implements Serializable {
+public abstract class GraphInventoryResultWrapper<R extends GraphInventoryRelationships<?, ?, ?>> implements Serializable {
private static final long serialVersionUID = 5895841925807816727L;
protected final String jsonBody;
protected GraphInventoryResultWrapper(String json, Logger logger) {
this.jsonBody = json;
- this.mapper = new AAICommonObjectMapperProvider().getMapper();
+ this.mapper = new GraphInventoryCommonObjectMapperProvider().getMapper();
this.logger = logger;
}
protected GraphInventoryResultWrapper(Object aaiObject, Logger logger) {
- this.mapper = new AAICommonObjectMapperProvider().getMapper();
+ this.mapper = new GraphInventoryCommonObjectMapperProvider().getMapper();
this.jsonBody = mapObjectToString(aaiObject);
this.logger = logger;
}
return "{}";
}
}
- public Optional<Relationships> getRelationships() {
+ public Optional<R> getRelationships() {
final String path = "$.relationship-list";
if (isEmpty()) {
return Optional.empty();
}
Optional<String> result = JsonPathUtil.getInstance().locateResult(jsonBody, path);
if (result.isPresent()) {
- return Optional.of(new Relationships(result.get()));
+ return Optional.of(createRelationships(result.get()));
} else {
return Optional.empty();
}
}
+ protected abstract R createRelationships(String json);
public String getJson() {
if(jsonBody == null) {
import javax.ws.rs.core.UriBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.onap.so.client.aai.entities.uri.AAIUri;
import org.onap.so.client.graphinventory.Format;
import org.onap.so.client.graphinventory.GraphInventoryObjectPlurals;
import org.onap.so.client.graphinventory.GraphInventoryObjectType;
@Override
public boolean equals(Object o) {
- if (o instanceof AAIUri) {
- return this.build().equals(((AAIUri)o).build());
+ if (o instanceof GraphInventoryUri) {
+ return this.build().equals(((GraphInventoryUri)o).build());
}
return false;
}
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-jdbc</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
-# will be used as entry in DB to say SITE OFF/ON for healthcheck
-
-server:
- port: 8080
- tomcat:
- max-threads: 50
-ssl-enable: false
-
-apih-healthcheck-urn: /ecomp/mso/healthcheck,/ecomp/mso/homing/healthcheck,/ecomp/mso/infra/healthcheck,/asdc/healthcheck,/dbadapters/healthcheck,/ecomp/mso/catalog/v2/healthcheck
-jra-healthcheck-urn: /networks/rest/healthcheck,/adapters/rest/healthcheck,/vnfs/rest/healthcheck,/tenants/rest/healthcheck,/appc/rest/healthcheck,/workflows/messages/healthcheck
-camunda-healthcheck-urn: /mso/healthcheck
-
-apih-nodehealthcheck-urn: /ecomp/mso/infra/nodehealthcheck
-jra-nodehealthcheck-urn: /adapters/rest/nodehealthcheck
-camunda-nodehealthcheck-urn: /mso/nodehealthcheck
-
-
-
-mso:
- health:
- endpoints:
- catalogdb: http://localhost:8800
- sdnc: http://localhost:8400
- openstack: http://localhost:8300
- requestdb: http://localhost:8700
- bpmn: http://localhost:8200
- asdc: http://localhost:8400
- requestdbattsvc: http://localhost:8600
-
- adapters:
- requestDb:
- auth: Basic YnBlbDptc28tZGItMTUwNyE=
- endpoint: http://localhost:8081
- logPath: logs
- site-name: mtanj
- catalog:
- db:
- spring:
- endpoint: "http://localhost:8080"
- db:
- auth: Basic YnBlbDptc28tZGItMTUwNyE=
- config:
- path: /src/main/resources/
- infra:
- default:
- alacarte:
- orchestrationUri: /mso/async/services/ALaCarteOrchestrator
- recipeTimeout: 180
- testApi: VNF_API
- service:
- macro:
- default:
- testApi: GR_API
- apih:
- homing:
- sdna:
- url: http://localhost:8089/
- password: 4E0BDC08EE8EDC0572ABBE9FD2D59B62DB725A00B8469E39393D6C86D64284C5D34A57D56F7B58C375316F
- camundaURL: http://localhost:8089/
- camundaAuth: E8E19DD16CC90D2E458E8FF9A884CC0452F8F3EB8E321F96038DE38D5C1B0B02DFAE00B88E2CF6E2A4101AB2C011FC161212EE
- async:
- core-pool-size: 50
- max-pool-size: 50
- queue-capacity: 500
- sdc:
- client:
- auth: 97FF88AB352DA16E00DDD81E3876431DEF8744465DACA489EB3B3BE1F10F63EDA1715E626D0A4827A3E19CD88421BF
- activate:
- instanceid: test
- userid: cs0008
- endpoint: http://localhost:28090
- msoKey: 07a7159d3bf51a0e53be7a8f89699be7
- tenant:
- isolation:
- retry:
- count: 3
- aai:
- endpoint: http://localhost:28090
- auth: 5E12ACACBD552A415E081E29F2C4772F9835792A51C766CCFDD7433DB5220B59969CB2798C
- grm:
- endpoint: http://localhost:28090
- username: gmruser
- password: test
- so:
- operational-environment:
- dmaap:
- username: testuser
- password: VjR5NDcxSzA=
- host: http://localhost:28090
- publisher:
- topic: com.att.ecomp.mso.operationalEnvironmentEvent
-
-# controls what actions the infra API (APIH) allows sent in on REST request
-vnf:
- v1:
- ApiAllowableActions:
- v2:
- ApiAllowableActions:
- v3:
- ApiAllowableActions:
-
-network:
- v1:
- ApiAllowableActions:
- v2:
- ApiAllowableActions:
- v3:
- ApiAllowableActions:
-
-volume:
- v1:
- ApiAllowableActions:
- v2:
- ApiAllowableActions:
- v3:
- ApiAllowableActions:
-
-# H2
-spring:
- datasource:
- jdbc-url: jdbc:h2:mem:AZ;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
- username: sa
- password: sa
- driver-class-name: org.h2.Driver
- intialize: true
- h2:
- console:
- enabled: true
- path: /h2
-
- jpa:
- show-sql: true
- hibernate:
- dialect: org.hibernate.dialect.H2Dialect
- ddl-auto: validate
- naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
- enable_lazy_load_no_trans: true
- jersey:
- type: filter
- security:
- usercredentials:
- -
- username: sitecontrol
- password: '$2a$12$VBUF.qBmeK1FNyO2MqTpD.P2M1tvlesZlhCkAjjHvF9hmYNVdMDmu'
- role: SiteControl-Client
- -
- username: gui
- password: '$2a$12$9Y4daXavh.oX5fz6t/e7TuCdj7EKW5B5ibqq425fN3/xpp0/Fhyti'
- role: GUI-Client
- -
- username: infraportal
- password: '$2a$12$IpUEhQijWTNbq0fGYVkA9upZrDvdIK6QfblIaKAiwi0vBQRE.C6Ri'
- role: InfraPortal-Client
- -
- username: bpel
- password: '$2a$12$1xyutEZNfjGewIZRfKaE8eZE99f5sYFUmmM80BobI65KNjmcK0JuO'
- role: BPEL-Client
- -
- username: mso_admin
- password: '$2a$12$tidKuu.h88E2nuL95pTVY.ZOYMN/1dp29A9b1o.0GFDsVVSYlMkHa'
- role: ACTUATOR
-request:
- datasource:
- jdbc-url: jdbc:h2:mem:AZ;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
- username: sa
- password: sa
- driver-class-name: org.h2.Driver
- intialize: true
-
-#Actuator
-management:
- context-path: /manage
-
-org:
- onap:
- so:
- adapters:
- network:
- encryptionKey: aa3871669d893c7fb8abbcda31b88b4f
+# will be used as entry in DB to say SITE OFF/ON for healthcheck\r
+\r
+server:\r
+ port: 8080\r
+ tomcat:\r
+ max-threads: 50\r
+ssl-enable: false\r
+\r
+apih-healthcheck-urn: /ecomp/mso/healthcheck,/ecomp/mso/homing/healthcheck,/ecomp/mso/infra/healthcheck,/asdc/healthcheck,/dbadapters/healthcheck,/ecomp/mso/catalog/v2/healthcheck\r
+jra-healthcheck-urn: /networks/rest/healthcheck,/adapters/rest/healthcheck,/vnfs/rest/healthcheck,/tenants/rest/healthcheck,/appc/rest/healthcheck,/workflows/messages/healthcheck\r
+camunda-healthcheck-urn: /mso/healthcheck\r
+\r
+apih-nodehealthcheck-urn: /ecomp/mso/infra/nodehealthcheck\r
+jra-nodehealthcheck-urn: /adapters/rest/nodehealthcheck\r
+camunda-nodehealthcheck-urn: /mso/nodehealthcheck\r
+\r
+\r
+\r
+mso:\r
+ health:\r
+ endpoints:\r
+ catalogdb: http://localhost:8800\r
+ sdnc: http://localhost:8400\r
+ openstack: http://localhost:8300\r
+ requestdb: http://localhost:8700\r
+ bpmn: http://localhost:8200\r
+ asdc: http://localhost:8400\r
+ requestdbattsvc: http://localhost:8600\r
+ \r
+ adapters:\r
+ requestDb:\r
+ auth: Basic YnBlbDptc28tZGItMTUwNyE=\r
+ endpoint: http://localhost:8081\r
+ logPath: logs\r
+ site-name: mtanj\r
+ catalog:\r
+ db:\r
+ spring:\r
+ endpoint: "http://localhost:8080"\r
+ db:\r
+ auth: Basic YnBlbDptc28tZGItMTUwNyE=\r
+ config: \r
+ path: /src/main/resources/\r
+ infra:\r
+ default:\r
+ alacarte:\r
+ orchestrationUri: /mso/async/services/ALaCarteOrchestrator\r
+ recipeTimeout: 180\r
+ testApi: VNF_API\r
+ service:\r
+ macro:\r
+ default:\r
+ testApi: GR_API\r
+ apih:\r
+ homing:\r
+ sdna:\r
+ url: http://localhost:8089/\r
+ password: 4E0BDC08EE8EDC0572ABBE9FD2D59B62DB725A00B8469E39393D6C86D64284C5D34A57D56F7B58C375316F\r
+ camundaURL: http://localhost:8089/\r
+ camundaAuth: E8E19DD16CC90D2E458E8FF9A884CC0452F8F3EB8E321F96038DE38D5C1B0B02DFAE00B88E2CF6E2A4101AB2C011FC161212EE\r
+ async:\r
+ core-pool-size: 50\r
+ max-pool-size: 50\r
+ queue-capacity: 500\r
+ sdc:\r
+ client:\r
+ auth: 97FF88AB352DA16E00DDD81E3876431DEF8744465DACA489EB3B3BE1F10F63EDA1715E626D0A4827A3E19CD88421BF\r
+ activate:\r
+ instanceid: test\r
+ userid: cs0008\r
+ endpoint: http://localhost:28090\r
+ msoKey: 07a7159d3bf51a0e53be7a8f89699be7\r
+ tenant:\r
+ isolation:\r
+ retry:\r
+ count: 3\r
+ aai:\r
+ endpoint: http://localhost:28090\r
+ auth: 5E12ACACBD552A415E081E29F2C4772F9835792A51C766CCFDD7433DB5220B59969CB2798C\r
+ grm:\r
+ endpoint: http://localhost:28090\r
+ username: gmruser\r
+ password: test\r
+ so:\r
+ operational-environment:\r
+ dmaap:\r
+ username: testuser\r
+ password: VjR5NDcxSzA=\r
+ host: http://localhost:28090\r
+ publisher:\r
+ topic: com.att.ecomp.mso.operationalEnvironmentEvent\r
+\r
+# controls what actions the infra API (APIH) allows sent in on REST request\r
+vnf:\r
+ v1:\r
+ ApiAllowableActions: \r
+ v2:\r
+ ApiAllowableActions: \r
+ v3:\r
+ ApiAllowableActions: \r
+ \r
+network:\r
+ v1:\r
+ ApiAllowableActions: \r
+ v2:\r
+ ApiAllowableActions: \r
+ v3:\r
+ ApiAllowableActions: \r
+ \r
+volume:\r
+ v1:\r
+ ApiAllowableActions: \r
+ v2:\r
+ ApiAllowableActions: \r
+ v3:\r
+ ApiAllowableActions: \r
+\r
+# H2\r
+spring:\r
+ datasource:\r
+ url: jdbc:h2:mem:AZ;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE\r
+ username: sa\r
+ password: sa\r
+ driver-class-name: org.h2.Driver\r
+ intialize: true\r
+ h2:\r
+ console:\r
+ enabled: true\r
+ path: /h2\r
+\r
+ jpa:\r
+ show-sql: true\r
+ hibernate:\r
+ dialect: org.hibernate.dialect.H2Dialect\r
+ ddl-auto: validate\r
+ naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy\r
+ enable_lazy_load_no_trans: true\r
+ jersey:\r
+ type: filter\r
+ security:\r
+ usercredentials:\r
+ - \r
+ username: sitecontrol\r
+ password: '$2a$12$VBUF.qBmeK1FNyO2MqTpD.P2M1tvlesZlhCkAjjHvF9hmYNVdMDmu'\r
+ role: SiteControl-Client \r
+ - \r
+ username: gui\r
+ password: '$2a$12$9Y4daXavh.oX5fz6t/e7TuCdj7EKW5B5ibqq425fN3/xpp0/Fhyti'\r
+ role: GUI-Client \r
+ - \r
+ username: infraportal\r
+ password: '$2a$12$IpUEhQijWTNbq0fGYVkA9upZrDvdIK6QfblIaKAiwi0vBQRE.C6Ri'\r
+ role: InfraPortal-Client \r
+ - \r
+ username: bpel\r
+ password: '$2a$12$1xyutEZNfjGewIZRfKaE8eZE99f5sYFUmmM80BobI65KNjmcK0JuO'\r
+ role: BPEL-Client \r
+ - \r
+ username: mso_admin\r
+ password: '$2a$12$tidKuu.h88E2nuL95pTVY.ZOYMN/1dp29A9b1o.0GFDsVVSYlMkHa'\r
+ role: ACTUATOR \r
+request:\r
+ datasource:\r
+ url: jdbc:h2:mem:AZ;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE\r
+ username: sa\r
+ password: sa\r
+ driver-class-name: org.h2.Driver\r
+ intialize: true \r
+\r
+#Actuator\r
+management: \r
+ context-path: /manage\r
+\r
+org:\r
+ onap:\r
+ so:\r
+ adapters:\r
+ network:\r
+ encryptionKey: aa3871669d893c7fb8abbcda31b88b4f\r
spring:
datasource:
- jdbc-url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb
+ url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
driver-class-name: org.mariadb.jdbc.Driver
- dbcp2:
- initial-size: 5
- max-total: 20
- validation-query: select 1
- test-on-borrow: true
jpa:
show-sql: true
request:
datasource:
- jdbc-url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/requestdb
+ url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/requestdb
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
- driver-class-name: org.mariadb.jdbc.Driver
- dbcp2:
- initial-size: 5
- max-total: 20
- validation-query: select 1
- test-on-borrow: true
+ driver-class-name: org.mariadb.jdbc.Driver
#Actuator
management:
spring:
datasource:
- jdbc-url: jdbc:mariadb://localhost:3307/catalogdb
+ url: jdbc:mariadb://localhost:3307/catalogdb
username: root
password: password
driver-class-name: org.mariadb.jdbc.Driver
role: InfraPortal-Client
request:
datasource:
- jdbc-url: jdbc:mariadb://localhost:3307/requestdb
+ url: jdbc:mariadb://localhost:3307/requestdb
username: root
password: password
driver-class-name: org.mariadb.jdbc.Driver
<module>bpmn</module>
<module>cloudify-client</module>
<module>cxf-logging</module>
- <module>so-monitoring</module>
<module>packages</module>
</modules>
<properties>