aboutsummaryrefslogtreecommitdiffstats
path: root/components/core
diff options
context:
space:
mode:
Diffstat (limited to 'components/core')
-rw-r--r--components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/interfaces/BluePrintRepoService.kt47
-rw-r--r--components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRepoFileService.kt (renamed from components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRepoService.kt)29
-rw-r--r--components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRepoFileServiceTest.kt10
-rw-r--r--components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt2
4 files changed, 53 insertions, 35 deletions
diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/interfaces/BluePrintRepoService.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/interfaces/BluePrintRepoService.kt
new file mode 100644
index 00000000..efcb0c38
--- /dev/null
+++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/interfaces/BluePrintRepoService.kt
@@ -0,0 +1,47 @@
+/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * 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.
+ */
+
+package org.onap.ccsdk.apps.controllerblueprints.core.interfaces
+
+import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.apps.controllerblueprints.core.data.*
+import java.io.Serializable
+
+/**
+ * BluePrintRepoFileService
+ * @author Brinda Santh
+ *
+ */
+
+interface BluePrintRepoService : Serializable {
+
+ @Throws(BluePrintException::class)
+ fun getNodeType(nodeTypeName: String): NodeType
+
+ @Throws(BluePrintException::class)
+ fun getDataType(dataTypeName: String): DataType
+
+ @Throws(BluePrintException::class)
+ fun getArtifactType(artifactTypeName: String): ArtifactType
+
+ @Throws(BluePrintException::class)
+ fun getRelationshipType(relationshipTypeName: String): RelationshipType
+
+ @Throws(BluePrintException::class)
+ fun getCapabilityDefinition(capabilityDefinitionName: String): CapabilityDefinition
+
+} \ No newline at end of file
diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRepoService.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRepoFileService.kt
index 5ca43952..de338664 100644
--- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRepoService.kt
+++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRepoFileService.kt
@@ -1,6 +1,5 @@
/*
* Copyright © 2017-2018 AT&T Intellectual Property.
- * Modifications Copyright © 2018 IBM.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,34 +21,8 @@ import com.att.eelf.configuration.EELFManager
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.apps.controllerblueprints.core.data.*
+import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintRepoService
import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import java.io.Serializable
-
-/**
- * BluePrintRepoFileService
- * @author Brinda Santh
- *
- */
-
-interface BluePrintRepoService : Serializable {
-
- @Throws(BluePrintException::class)
- fun getNodeType(nodeTypeName: String): NodeType
-
- @Throws(BluePrintException::class)
- fun getDataType(dataTypeName: String): DataType
-
- @Throws(BluePrintException::class)
- fun getArtifactType(artifactTypeName: String): ArtifactType
-
- @Throws(BluePrintException::class)
- fun getRelationshipType(relationshipTypeName: String): RelationshipType
-
- @Throws(BluePrintException::class)
- fun getCapabilityDefinition(capabilityDefinitionName: String): CapabilityDefinition
-
-}
-
open class BluePrintRepoFileService(modelTypePath: String) : BluePrintRepoService {
diff --git a/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRepoFileServiceTest.kt b/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRepoFileServiceTest.kt
index f7f995fb..f7ffc394 100644
--- a/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRepoFileServiceTest.kt
+++ b/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRepoFileServiceTest.kt
@@ -29,29 +29,29 @@ import kotlin.test.assertNotNull
class BluePrintRepoFileServiceTest {
private val basePath = "load/model_type"
- private val bluePrintEnhancerRepoFileService = BluePrintRepoFileService(basePath)
+ private val bluePrintRepoFileService = BluePrintRepoFileService(basePath)
@Test
fun testGetDataType() {
- val dataType = bluePrintEnhancerRepoFileService.getDataType("dt-v4-aggregate")
+ val dataType = bluePrintRepoFileService.getDataType("dt-v4-aggregate")
assertNotNull(dataType, "Failed to get DataType from repo")
}
@Test
fun testGetNodeType() {
- val nodeType = bluePrintEnhancerRepoFileService.getNodeType("component-resource-assignment")
+ val nodeType = bluePrintRepoFileService.getNodeType("component-resource-assignment")
assertNotNull(nodeType, "Failed to get NodeType from repo")
}
@Test
fun testGetArtifactType() {
- val nodeType = bluePrintEnhancerRepoFileService.getArtifactType("artifact-template-velocity")
+ val nodeType = bluePrintRepoFileService.getArtifactType("artifact-template-velocity")
assertNotNull(nodeType, "Failed to get ArtifactType from repo")
}
@Test(expected = FileNotFoundException::class)
fun testModelNotFound() {
- val dataType = bluePrintEnhancerRepoFileService.getDataType("dt-not-found")
+ val dataType = bluePrintRepoFileService.getDataType("dt-not-found")
assertNotNull(dataType, "Failed to get DataType from repo")
}
} \ No newline at end of file
diff --git a/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt b/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
index 2f519802..cbcadeb3 100644
--- a/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
+++ b/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
@@ -53,8 +53,6 @@ class BluePrintRuntimeServiceTest {
val propContext: MutableMap<String, JsonNode> = bluePrintRuntimeService.resolveNodeTemplateProperties("activate-process")
assertNotNull(propContext, "Failed to populate interface property values")
- assertEquals(propContext["process-name"], jsonNodeFromObject("sample-action"), "Failed to populate parameter process-name")
- assertEquals(propContext["version"], jsonNodeFromObject("sample-action"), "Failed to populate parameter version")
}
@Test