summaryrefslogtreecommitdiffstats
path: root/ms
diff options
context:
space:
mode:
authorottero <rodrigo.ottero@est.tech>2019-03-11 14:03:09 +0000
committerottero <rodrigo.ottero@est.tech>2019-03-11 14:03:09 +0000
commita47cb28a3c6e7694233c3de1127f8ce9a1aa739c (patch)
tree4ff0f8a071b496887c12ab3bbc946a1cb35c28b4 /ms
parent59d003559d4e8c398930db4dcdb0451a759df788 (diff)
Blueprint for configuring a PNF
This is the first version of a blueprint, intended to be used to configure PNFs. The design considers that a blueprint will be created for each possible PNF. Change-Id: I4994149441257eb417b6d5f611e12cd81595177f Issue-ID: CCSDK-1107 Signed-off-by: ottero <rodrigo.ottero@est.tech>
Diffstat (limited to 'ms')
-rwxr-xr-xms/blueprintsprocessor/application/pom.xml4
-rwxr-xr-xms/blueprintsprocessor/application/src/main/resources/application-dev.properties9
-rwxr-xr-xms/blueprintsprocessor/application/src/main/resources/application.properties11
-rw-r--r--ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/scripts/InternalSimpleRestconf.cba.kts18
-rw-r--r--ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintArtifactDefinitionValidatorImpl.kt2
-rw-r--r--ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt2
6 files changed, 24 insertions, 22 deletions
diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml
index f42cdfad..c96bd086 100755
--- a/ms/blueprintsprocessor/application/pom.xml
+++ b/ms/blueprintsprocessor/application/pom.xml
@@ -60,6 +60,10 @@
<artifactId>netconf-executor</artifactId>
</dependency>
<dependency>
+ <groupId>org.onap.ccsdk.apps.blueprintsprocessor.functions</groupId>
+ <artifactId>restconf-executor</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
<artifactId>selfservice-api</artifactId>
</dependency>
diff --git a/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
index b1f16898..380eb201 100755
--- a/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
+++ b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
@@ -38,4 +38,11 @@ blueprintsprocessor.db.primary.hibernateDialect=org.hibernate.dialect.MySQL5Inno
# Python executor
blueprints.processor.functions.python.executor.executionPath=./../../../components/scripts/python/ccsdk_blueprints
-blueprints.processor.functions.python.executor.modulePaths=./../../../components/scripts/python/ccsdk_blueprints \ No newline at end of file
+blueprints.processor.functions.python.executor.modulePaths=./../../../components/scripts/python/ccsdk_blueprints
+
+# SDN-C's ODL Restconf Connection Details
+blueprintsprocessor.restconfEnabled=true
+blueprintsprocessor.restclient.sdncodl.type=basic-auth
+blueprintsprocessor.restclient.sdncodl.url=http://localhost:8282/
+blueprintsprocessor.restclient.sdncodl.userId=admin
+blueprintsprocessor.restclient.sdncodl.token=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U \ No newline at end of file
diff --git a/ms/blueprintsprocessor/application/src/main/resources/application.properties b/ms/blueprintsprocessor/application/src/main/resources/application.properties
index e955c97c..8cafceba 100755
--- a/ms/blueprintsprocessor/application/src/main/resources/application.properties
+++ b/ms/blueprintsprocessor/application/src/main/resources/application.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2017-2019 AT&T, IBM, Bell Canada.
+# Copyright (c) 2017-2019 AT&T, IBM, Bell Canada, Nordix Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -21,9 +21,11 @@ server.port=8080
blueprintsprocessor.grpcEnable=false
blueprintsprocessor.httpPort=8080
blueprintsprocessor.grpcPort=9111
+
# Blueprint Processor File Execution and Handling Properties
blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy
blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive
+
# Primary Database Configuration
blueprintsprocessor.db.primary.url=jdbc:mysql://db:3306/sdnctl
blueprintsprocessor.db.primary.username=sdnctl
@@ -33,9 +35,16 @@ blueprintsprocessor.db.primary.hibernateHbm2ddlAuto=update
blueprintsprocessor.db.primary.hibernateDDLAuto=update
blueprintsprocessor.db.primary.hibernateNamingStrategy=org.hibernate.cfg.ImprovedNamingStrategy
blueprintsprocessor.db.primary.hibernateDialect=org.hibernate.dialect.MySQL5InnoDBDialect
+
# Python executor
blueprints.processor.functions.python.executor.executionPath=/opt/app/onap/scripts/jython/ccsdk_blueprints
blueprints.processor.functions.python.executor.modulePaths=/opt/app/onap/scripts/jython/ccsdk_blueprints,/opt/app/onap/scripts/jython/ccsdk_netconf
security.user.password: {bcrypt}$2a$10$duaUzVUVW0YPQCSIbGEkQOXwafZGwQ/b32/Ys4R1iwSSawFgz7QNu
security.user.name: ccsdkapps
+
+# SDN-C's ODL Restconf Connection Details
+blueprintsprocessor.restconfEnabled=true
+blueprintsprocessor.restclient.sdncodl.type=basic-auth
+blueprintsprocessor.restclient.sdncodl.url=http://sdnc:8282/
+blueprintsprocessor.restclient.sdncodl.userId=admin
diff --git a/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/scripts/InternalSimpleRestconf.cba.kts b/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/scripts/InternalSimpleRestconf.cba.kts
index dbbebe52..588f7f10 100644
--- a/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/scripts/InternalSimpleRestconf.cba.kts
+++ b/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/scripts/InternalSimpleRestconf.cba.kts
@@ -52,7 +52,6 @@ open class MountNEditConfigure : RestconfComponentFunction() {
override fun process(executionRequest: ExecutionServiceInput) {
val webClientService = restClientService("odlparent")
- println("foi?")
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
@@ -60,7 +59,6 @@ open class MountNEditConfigure : RestconfComponentFunction() {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
-
}
/**
@@ -82,19 +80,3 @@ open class TestRestconfConfigure : RestconfComponentFunction() {
log.info("recovering..")
}
}
-
-
-
-println("zzzzzzzzzzzzz")
-val x = MountNEditConfigure()
-println(x.getName())
-val executionServiceInput = ExecutionServiceInput().apply {
- commonHeader = CommonHeader().apply {
- requestId = "1234"
- }
- actionIdentifiers = ActionIdentifiers().apply {
- actionName = "activate"
- }
- payload = JacksonUtils.jsonNode("{}") as ObjectNode
-}
-x.process(executionServiceInput); \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintArtifactDefinitionValidatorImpl.kt b/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintArtifactDefinitionValidatorImpl.kt
index 4ea5ab5b..8072f283 100644
--- a/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintArtifactDefinitionValidatorImpl.kt
+++ b/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintArtifactDefinitionValidatorImpl.kt
@@ -58,7 +58,7 @@ open class BluePrintArtifactDefinitionValidatorImpl(
val completePath = bluePrintContext.rootPath.plus(File.separator).plus(file)
check(File(completePath).exists()) {
- throw BluePrintException("couldn't file ($completePath)")
+ throw BluePrintException("couldn't find file ($completePath)")
}
// Perform Extension Validation
diff --git a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt
index ccacee02..3bfb3d2b 100644
--- a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt
+++ b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt
@@ -65,7 +65,7 @@ class BluePrintEnhancerServiceImplTest {
val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
val targetPath = Paths.get("target", "bp-enhance").toUri().path
-
+
val bluePrintContext = bluePrintEnhancerService.enhance(basePath, targetPath)
Assert.assertNotNull("failed to get blueprintContext ", bluePrintContext)