summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapter/acumos-deployment/values.yaml6
-rw-r--r--mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/service/base/BlueprintHelperService.java3
-rw-r--r--mod/bpgenerator/onap/src/test/java/org/onap/blueprintgenerator/service/common/AppConfigServiceTest.java175
-rw-r--r--mod/onboardingapi/ChangeLog.md8
-rw-r--r--mod/runtimeapi/pom.xml2
-rw-r--r--mod/runtimeapi/runtime-core/pom.xml6
-rw-r--r--mod/runtimeapi/runtime-web/pom.xml6
-rw-r--r--releases/1.2.1-runtimeapi-container.yaml9
-rw-r--r--releases/1.7.2-blueprint-generator.yaml4
-rw-r--r--releases/2.12.4-onboardingapi-container.yaml9
10 files changed, 218 insertions, 10 deletions
diff --git a/adapter/acumos-deployment/values.yaml b/adapter/acumos-deployment/values.yaml
index 78f4400..4b4a1b7 100644
--- a/adapter/acumos-deployment/values.yaml
+++ b/adapter/acumos-deployment/values.yaml
@@ -28,7 +28,8 @@ global:
ingress:
enabled: true
virtualhost:
- enabled: false
+ enabled: true
+ baseurl: "simpledemo.onap.org"
config:
distributorAPIURL: /distributor
@@ -50,9 +51,10 @@ service:
ingress:
enabled: true
service:
- - baseaddr: "acumos-adapter"
+ - baseaddr: "dcaemod"
name: "dcae-acumos-adapter"
port: 9000
+ path: "/acumos-adapter"
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "false"
# Adapter can take a long time to respond, since
diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/service/base/BlueprintHelperService.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/service/base/BlueprintHelperService.java
index 0526f48..a84afb6 100644
--- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/service/base/BlueprintHelperService.java
+++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/service/base/BlueprintHelperService.java
@@ -178,7 +178,7 @@ public class BlueprintHelperService {
* <p>
* Default input type: "string".
*
- * @param inputType Input type, supported: "boolean", "integer"
+ * @param inputType Input type, supported: "boolean", "integer", "number"
* @param defaultValue Default value of Type
* @return
*/
@@ -187,6 +187,7 @@ public class BlueprintHelperService {
case "boolean":
return createBooleanInput(defaultValue);
case "integer":
+ case "number":
return createIntegerInput(defaultValue);
default:
return createStringInput(defaultValue);
diff --git a/mod/bpgenerator/onap/src/test/java/org/onap/blueprintgenerator/service/common/AppConfigServiceTest.java b/mod/bpgenerator/onap/src/test/java/org/onap/blueprintgenerator/service/common/AppConfigServiceTest.java
new file mode 100644
index 0000000..61f9353
--- /dev/null
+++ b/mod/bpgenerator/onap/src/test/java/org/onap/blueprintgenerator/service/common/AppConfigServiceTest.java
@@ -0,0 +1,175 @@
+/*
+ *
+ * * ============LICENSE_START=======================================================
+ * * org.onap.dcae
+ * * ================================================================================
+ * * Copyright (c) 2021 Nokia 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.blueprintgenerator.service.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.when;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mockito;
+import org.onap.blueprintgenerator.model.common.Appconfig;
+import org.onap.blueprintgenerator.model.common.GetInput;
+import org.onap.blueprintgenerator.model.componentspec.OnapComponentSpec;
+import org.onap.blueprintgenerator.model.componentspec.common.Parameters;
+import org.onap.blueprintgenerator.service.InfoService;
+import org.onap.blueprintgenerator.service.base.BlueprintHelperService;
+import org.onap.blueprintgenerator.service.common.kafka.KafkaStreamService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.ConfigFileApplicationContextInitializer;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(classes = {AppConfigService.class, BlueprintHelperService.class, DmaapService.class,
+ InfoService.class, StreamService.class, KafkaStreamService.class},
+ initializers = ConfigFileApplicationContextInitializer.class)
+public class AppConfigServiceTest {
+
+ private static final String TEST_PARAMETER_NAME = "testParameter";
+ private static final String INPUTS = "inputs";
+ private static final String TYPE = "type";
+ private static final String DEFAULT = "default";
+
+ private static final String PARAMETERS_TYPE_STRING = "string";
+ private static final String PARAMETERS_TYPE_INTEGER = "integer";
+ private static final String PARAMETERS_TYPE_BOOLEAN = "boolean";
+ private static final String PARAMETERS_TYPE_NUMBER = "number";
+
+ private static final String STRING_INPUT_TYPE = "string";
+ private static final String INTEGER_INPUT_TYPE = "integer";
+ private static final String BOOLEAN_INPUT_TYPE = "boolean";
+ private static final String UNKNOWN_TYPE = "test_unknown_type";
+
+ private static final boolean BOOLEAN_TEST_VALUE = true;
+ private static final String TEST_STRING_VALUE = "testValue";
+ private static final String APP_CONFIG = "appconfig";
+
+ @Autowired
+ private AppConfigService appConfigService;
+
+ private OnapComponentSpec componentSpec;
+
+ @Before
+ public void setUp() {
+ componentSpec = Mockito.mock(OnapComponentSpec.class);
+ }
+
+ @Test
+ public void shouldCreateStringInputForStringParameter() {
+
+ mockParameters(PARAMETERS_TYPE_STRING, TEST_STRING_VALUE);
+ Map<String, LinkedHashMap<String, Object>> inputs = new HashMap<>();
+
+ Map<String, Object> appConfig = appConfigService.createAppconfig(inputs, componentSpec, false);
+ Map<String, Object> createdInputs = (Map<String, Object>) appConfig.get(INPUTS);
+ Map<String, Object> createdParameters = (Map<String, Object>) createdInputs.get(TEST_PARAMETER_NAME);
+
+ assertAppConfigContainsParameterWithCorrectInputName(appConfig);
+ assertEquals(STRING_INPUT_TYPE, createdParameters.get(TYPE));
+ assertEquals(TEST_STRING_VALUE, createdParameters.get(DEFAULT));
+ }
+
+ @Test
+ public void shouldCreateStringInputForUnknownParameter() {
+
+ mockParameters(UNKNOWN_TYPE, TEST_STRING_VALUE);
+ Map<String, LinkedHashMap<String, Object>> inputs = new HashMap<>();
+
+ Map<String, Object> appConfig = appConfigService.createAppconfig(inputs, componentSpec, false);
+ Map<String, Object> createdInputs = (Map<String, Object>) appConfig.get(INPUTS);
+ Map<String, Object> createdParameters = (Map<String, Object>) createdInputs.get(TEST_PARAMETER_NAME);
+
+ assertAppConfigContainsParameterWithCorrectInputName(appConfig);
+ assertEquals(STRING_INPUT_TYPE, createdParameters.get(TYPE));
+ assertEquals(TEST_STRING_VALUE, createdParameters.get(DEFAULT));
+ }
+
+ @Test
+ public void shouldCreateBooleanInputForBooleanParameter() {
+
+ mockParameters(PARAMETERS_TYPE_BOOLEAN, BOOLEAN_TEST_VALUE);
+ Map<String, LinkedHashMap<String, Object>> inputs = new HashMap<>();
+
+ Map<String, Object> appConfig = appConfigService.createAppconfig(inputs, componentSpec, false);
+ Map<String, Object> createdInputs = (Map<String, Object>) appConfig.get(INPUTS);
+ Map<String, Object> createdParameters = (Map<String, Object>) createdInputs.get(TEST_PARAMETER_NAME);
+
+ assertAppConfigContainsParameterWithCorrectInputName(appConfig);
+ assertEquals(BOOLEAN_INPUT_TYPE, createdParameters.get(TYPE));
+ assertEquals(BOOLEAN_TEST_VALUE, createdParameters.get(DEFAULT));
+ }
+
+ @Test
+ public void shouldCreateIntegerInputForIntegerParameter() {
+
+ mockParameters(PARAMETERS_TYPE_INTEGER, 123);
+ Map<String, LinkedHashMap<String, Object>> inputs = new HashMap<>();
+
+ Map<String, Object> appConfig = appConfigService.createAppconfig(inputs, componentSpec, false);
+ Map<String, Object> createdInputs = (Map<String, Object>) appConfig.get(INPUTS);
+ Map<String, Object> createdParameters = (Map<String, Object>) createdInputs.get(TEST_PARAMETER_NAME);
+
+ assertAppConfigContainsParameterWithCorrectInputName(appConfig);
+ assertEquals(INTEGER_INPUT_TYPE, createdParameters.get(TYPE));
+ assertEquals(123, createdParameters.get(DEFAULT));
+ }
+
+ @Test
+ public void shouldCreateIntegerInputForNumberParameter() {
+
+ mockParameters(PARAMETERS_TYPE_NUMBER, 123);
+ Map<String, LinkedHashMap<String, Object>> inputs = new HashMap<>();
+
+ Map<String, Object> appConfig = appConfigService.createAppconfig(inputs, componentSpec, false);
+ Map<String, Object> createdInputs = (Map<String, Object>) appConfig.get(INPUTS);
+ Map<String, Object> createdParameters = (Map<String, Object>) createdInputs.get(TEST_PARAMETER_NAME);
+
+
+ assertAppConfigContainsParameterWithCorrectInputName(appConfig);
+ assertEquals(INTEGER_INPUT_TYPE, createdParameters.get(TYPE));
+ assertEquals(123, createdParameters.get(DEFAULT));
+ }
+
+ private void assertAppConfigContainsParameterWithCorrectInputName(Map<String, Object> appConfig) {
+ Appconfig appConfigModel = (Appconfig) appConfig.get(APP_CONFIG);
+ Object bpInputName = ((GetInput) appConfigModel.getParams().get(TEST_PARAMETER_NAME)).getBpInputName();
+ assertEquals(bpInputName, TEST_PARAMETER_NAME);
+ }
+
+ private void mockParameters(String type, Object value) {
+ Parameters testParameter = new Parameters();
+ testParameter.setName(TEST_PARAMETER_NAME);
+ testParameter.setType(type);
+ testParameter.setSourced_at_deployment(true);
+ testParameter.setValue(value);
+ Parameters[] parametersArray = new Parameters[1];
+ parametersArray[0] = testParameter;
+ when(componentSpec.getParameters()).thenReturn(parametersArray);
+ }
+}
diff --git a/mod/onboardingapi/ChangeLog.md b/mod/onboardingapi/ChangeLog.md
index 28578d2..4413ded 100644
--- a/mod/onboardingapi/ChangeLog.md
+++ b/mod/onboardingapi/ChangeLog.md
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
+## [2.12.4]
+
+* Update component-spec-schema to support: kafka stream subscribes and publishes, config maps as volumes
+
+## [2.12.3]
+
+* Add Python 3.8 support
+* Use Integration base image
## [2.12.1]
diff --git a/mod/runtimeapi/pom.xml b/mod/runtimeapi/pom.xml
index 61f6558..f3d72da 100644
--- a/mod/runtimeapi/pom.xml
+++ b/mod/runtimeapi/pom.xml
@@ -34,7 +34,7 @@ limitations under the License.
</parent>
<groupId>org.onap.dcaegen2.platform.mod</groupId>
<artifactId>runtimeapi</artifactId>
- <version>1.2.0</version>
+ <version>1.2.1</version>
<name>dcaegen2-platform-mod-runtimeapi</name>
<description>MOD Runtime API</description>
<properties>
diff --git a/mod/runtimeapi/runtime-core/pom.xml b/mod/runtimeapi/runtime-core/pom.xml
index 7031714..9310bd3 100644
--- a/mod/runtimeapi/runtime-core/pom.xml
+++ b/mod/runtimeapi/runtime-core/pom.xml
@@ -25,12 +25,12 @@ limitations under the License.
<parent>
<artifactId>runtimeapi</artifactId>
<groupId>org.onap.dcaegen2.platform.mod</groupId>
- <version>1.2.0</version>
+ <version>1.2.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>runtime-core</artifactId>
- <version>1.2.0</version>
+ <version>1.2.1</version>
<dependencies>
<dependency>
@@ -46,7 +46,7 @@ limitations under the License.
<dependency>
<groupId>org.onap.dcaegen2.platform.mod</groupId>
<artifactId>blueprint-generator-onap</artifactId>
- <version>1.7.1</version>
+ <version>1.7.2</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
diff --git a/mod/runtimeapi/runtime-web/pom.xml b/mod/runtimeapi/runtime-web/pom.xml
index 4c1a7c4..44a1fd4 100644
--- a/mod/runtimeapi/runtime-web/pom.xml
+++ b/mod/runtimeapi/runtime-web/pom.xml
@@ -24,10 +24,10 @@ limitations under the License.
<parent>
<groupId>org.onap.dcaegen2.platform.mod</groupId>
<artifactId>runtimeapi</artifactId>
- <version>1.2.0</version>
+ <version>1.2.1</version>
</parent>
<artifactId>runtime-web</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>runtime-web</name>
<description>MOD Runtime Web Module</description>
@@ -35,7 +35,7 @@ limitations under the License.
<dependency>
<groupId>org.onap.dcaegen2.platform.mod</groupId>
<artifactId>runtime-core</artifactId>
- <version>1.2.0</version>
+ <version>1.2.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
diff --git a/releases/1.2.1-runtimeapi-container.yaml b/releases/1.2.1-runtimeapi-container.yaml
new file mode 100644
index 0000000..c6e04fc
--- /dev/null
+++ b/releases/1.2.1-runtimeapi-container.yaml
@@ -0,0 +1,9 @@
+distribution_type: 'container'
+container_release_tag: '1.2.1'
+project: 'dcaegen2-platform'
+log_dir: 'dcaegen2-platform-mod-master-runtimeapi-merge-java/26'
+ref: 898cf07d59c3586180b43bc4b1289d5c20d019fd
+containers:
+ - name: 'org.onap.dcaegen2.platform.mod.runtime-web'
+ version: '1.2.1-SNAPSHOT-20210129T134650Z'
+git_tag: '1.2.1-mod-runtimeapi'
diff --git a/releases/1.7.2-blueprint-generator.yaml b/releases/1.7.2-blueprint-generator.yaml
new file mode 100644
index 0000000..7d979a9
--- /dev/null
+++ b/releases/1.7.2-blueprint-generator.yaml
@@ -0,0 +1,4 @@
+distribution_type: 'maven'
+version: '1.7.2'
+project: 'dcaegen2/platform'
+log_dir: 'dcaegen2-platform-mod-bpgenerator-maven-stage-master/362'
diff --git a/releases/2.12.4-onboardingapi-container.yaml b/releases/2.12.4-onboardingapi-container.yaml
new file mode 100644
index 0000000..67e33d8
--- /dev/null
+++ b/releases/2.12.4-onboardingapi-container.yaml
@@ -0,0 +1,9 @@
+distribution_type: 'container'
+container_release_tag: '2.12.4'
+project: 'dcaegen2-platform'
+log_dir: 'dcaegen2-platform-mod-onboardingapi-docker-merge-master/53'
+ref: 59a85d1e280b011d05416ac3dbe6d823f60834f6
+containers:
+ - name: 'org.onap.dcaegen2.platform.mod.onboardingapi'
+ version: '2.12.4-SNAPSHOT-20210128T161153Z'
+git_tag: '2.12.4-mod-onboardingapi'