summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/blueprint-scripts/src/test/resources/scripts2/simple.cba.kts
diff options
context:
space:
mode:
authorJessica Wagantall <jwagantall@linuxfoundation.org>2019-03-22 11:09:33 -0700
committerJessica Wagantall <jwagantall@linuxfoundation.org>2019-03-22 11:09:51 -0700
commitffb6bdfd6de2afa23d95d0884c9db4059982deed (patch)
treec528a1106245ee1b4ad77cd7586d6452d6e34d40 /ms/controllerblueprints/modules/blueprint-scripts/src/test/resources/scripts2/simple.cba.kts
parent1a47dc3ce480c4735cbf019918372a0e1ff367bc (diff)
parent1d32aa56013891203fafb2f32d2dc5b9ada0a384 (diff)
Migrate "ms/controllerblueprints" from ccsdk/apps
Migrate code from ccsdk/apps ms/controllerblueprints subfolder into ccsdk/cds Issue-ID: CIMAN-245 Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Diffstat (limited to 'ms/controllerblueprints/modules/blueprint-scripts/src/test/resources/scripts2/simple.cba.kts')
-rw-r--r--ms/controllerblueprints/modules/blueprint-scripts/src/test/resources/scripts2/simple.cba.kts55
1 files changed, 55 insertions, 0 deletions
diff --git a/ms/controllerblueprints/modules/blueprint-scripts/src/test/resources/scripts2/simple.cba.kts b/ms/controllerblueprints/modules/blueprint-scripts/src/test/resources/scripts2/simple.cba.kts
new file mode 100644
index 000000000..845172548
--- /dev/null
+++ b/ms/controllerblueprints/modules/blueprint-scripts/src/test/resources/scripts2/simple.cba.kts
@@ -0,0 +1,55 @@
+/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ *
+ * 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.
+ */
+
+import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate
+import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BlueprintFunctionNode
+import org.springframework.stereotype.Service
+
+@Service
+open class SampleComponentFunction : BlueprintFunctionNode<String, String> {
+
+ override fun getName(): String {
+ println("Printing Name....." + "sample".asJsonPrimitive())
+ return "my Name"
+ }
+
+ override fun prepareRequest(executionRequest: String): String {
+ TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
+ }
+
+ override fun process(executionRequest: String) {
+ TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
+ }
+
+ override fun recover(runtimeException: RuntimeException, executionRequest: String) {
+ TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
+ }
+
+ override fun prepareResponse(): String {
+ TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
+ }
+
+ override fun apply(t: String): String {
+ return "Script 2 response - $t"
+ }
+}
+
+val blueprintFunction = SampleComponentFunction()
+
+val serviceTemplate = ServiceTemplate()
+
+println("Simple script printing....")