Add Blueprint Runtime Input/Output logic
authorMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Tue, 4 Dec 2018 15:25:44 +0000 (10:25 -0500)
committerMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Tue, 4 Dec 2018 15:31:15 +0000 (10:31 -0500)
Change-Id: I0355e78862096b7b4074faa882d66ce27d6e1844
Issue-ID: CCSDK-670
Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
13 files changed:
components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/BluePrintConstants.kt
components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/CustomFunctions.kt
components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt
components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt
components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/PropertyAssignmentService.kt
components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintArchiveUtils.kt [new file with mode: 0644]
components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/activation-blueprint.json
components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/data_types.json
components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/node_types.json
components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Plans/CONFIG_ActivateNetconf_1.0.0.xml
components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Plans/CONFIG_AssignActivateNetconf_1.0.0.xml [new file with mode: 0644]
components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Plans/CONFIG_ResourceAssignment_1.0.0.xml [new file with mode: 0644]
components/parent/pom.xml

index 0517e90..167496e 100644 (file)
@@ -29,6 +29,9 @@ object BluePrintConstants {
     const val RESPONSE_HEADER_PATCH_VERSION: String = "X-PatchVersion"\r
     const val RESPONSE_HEADER_LATEST_VERSION: String = "X-LatestVersion"\r
 \r
+    const val STATUS_SUCCESS: String = "success"\r
+    const val STATUS_FAILURE: String = "failure"\r
+\r
     const val TYPE_DEFAULT: String = "default"\r
 \r
     const val DATA_TYPE_STRING: String = "string"\r
index c32e15f..2329fc9 100644 (file)
@@ -75,17 +75,17 @@ fun <T : Any> MutableMap<String, *>.castValue(key: String, valueType: KClass<T>)
 fun MutableMap<String, JsonNode>.putJsonElement(key: String, value: Any) {\r
     when (value) {\r
         is JsonNode ->\r
-            this.put(key, value)\r
+            this[key] = value\r
         is String ->\r
-            this.put(key, TextNode(value))\r
+            this[key] = TextNode(value)\r
         is Boolean ->\r
-            this.put(key, BooleanNode.valueOf(value))\r
+            this[key] = BooleanNode.valueOf(value)\r
         is Int ->\r
-            this.put(key, IntNode.valueOf(value.toInt()))\r
+            this[key] = IntNode.valueOf(value.toInt())\r
         is Double ->\r
-            this.put(key, DoubleNode.valueOf(value.toDouble()))\r
+            this[key] = DoubleNode.valueOf(value.toDouble())\r
         else ->\r
-            this.put(key, JacksonUtils.jsonNodeFromObject(value))\r
+            this[key] = JacksonUtils.jsonNodeFromObject(value)\r
     }\r
 }\r
 \r
@@ -97,6 +97,14 @@ fun MutableMap<String, JsonNode>.getAsBoolean(key: String): Boolean {
     return this[key]?.asBoolean() ?: throw BluePrintException("couldn't find value for key($key)")\r
 }\r
 \r
+fun MutableMap<String, JsonNode>.getAsInt(key: String): Int {\r
+    return this[key]?.asInt() ?: throw BluePrintException("couldn't find value for key($key)")\r
+}\r
+\r
+fun MutableMap<String, JsonNode>.getAsDouble(key: String): Double {\r
+    return this[key]?.asDouble() ?: throw BluePrintException("couldn't find value for key($key)")\r
+}\r
+\r
 // Checks\r
 \r
 fun checkNotEmpty(value: String?): Boolean {\r
index cce6d90..84af3f9 100644 (file)
@@ -57,6 +57,8 @@ class BluePrintContext(val serviceTemplate: ServiceTemplate) {
     fun workflowByName(workFlowName: String): Workflow = workflows?.get(workFlowName)\r
             ?: throw BluePrintException("could't get workflow($workFlowName)")\r
 \r
+    fun workflowInputs(workFlowName: String) = workflowByName(workFlowName).inputs\r
+\r
     fun workflowStepByName(workFlowName: String, stepName: String): Step {\r
         return workflowByName(workFlowName).steps?.get(stepName)\r
                 ?: throw BluePrintException("could't get step($stepName) for workflow($workFlowName)")\r
index 84ba104..448a06a 100644 (file)
@@ -25,7 +25,6 @@ import com.fasterxml.jackson.databind.node.NullNode
 import com.fasterxml.jackson.databind.node.ObjectNode\r
 import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper\r
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants\r
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException\r
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException\r
 import org.onap.ccsdk.apps.controllerblueprints.core.data.ArtifactDefinition\r
 import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeTemplate\r
@@ -211,15 +210,13 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl
 \r
         val propertyAssignments: MutableMap<String, Any> =\r
                 bluePrintContext.nodeTemplateInterfaceOperationInputs(nodeTemplateName, interfaceName, operationName) as? MutableMap<String, Any>\r
-                        ?: throw BluePrintException(String.format("failed to get input definitions for node template (%s), " +\r
-                                "interface name (%s), operationName(%s)", nodeTemplateName, interfaceName, operationName))\r
+                        ?: hashMapOf()\r
 \r
         val nodeTypeName = bluePrintContext.nodeTemplateByName(nodeTemplateName).type\r
 \r
         val nodeTypeInterfaceOperationInputs: MutableMap<String, PropertyDefinition> =\r
                 bluePrintContext.nodeTypeInterfaceOperationInputs(nodeTypeName, interfaceName, operationName)\r
-                        ?: throw BluePrintException(String.format("failed to get input definitions for node type (%s), " +\r
-                                "interface name (%s), operationName(%s)", nodeTypeName, interfaceName, operationName))\r
+                        ?: hashMapOf()\r
 \r
         log.info("input definition for node template ({}), values ({})", nodeTemplateName, propertyAssignments)\r
 \r
@@ -258,15 +255,13 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl
 \r
         val propertyAssignments: MutableMap<String, Any> =\r
                 bluePrintContext.nodeTemplateInterfaceOperationOutputs(nodeTemplateName, interfaceName, operationName) as? MutableMap<String, Any>\r
-                        ?: throw BluePrintException(String.format("failed to get output definitions for node template (%s), " +\r
-                                "interface name (%s), operationName(%s)", nodeTemplateName, interfaceName, operationName))\r
+                        ?: hashMapOf()\r
 \r
         val nodeTypeName = bluePrintContext.nodeTemplateByName(nodeTemplateName).type\r
 \r
         val nodeTypeInterfaceOperationOutputs: MutableMap<String, PropertyDefinition> =\r
                 bluePrintContext.nodeTypeInterfaceOperationOutputs(nodeTypeName, interfaceName, operationName)\r
-                        ?: throw BluePrintException(String.format("failed to get input definitions for node type (%s), " +\r
-                                "interface name (%s), operationName(%s)", nodeTypeName, interfaceName, operationName))\r
+                        ?: hashMapOf()\r
 \r
         // Iterate Node Type Properties\r
         nodeTypeInterfaceOperationOutputs.forEach { nodeTypePropertyName, nodeTypeProperty ->\r
@@ -435,10 +430,25 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl
     override fun assignWorkflowInputs(workflowName: String, jsonNode: JsonNode) {\r
         log.info("assign workflow {} input value ({})", workflowName, jsonNode.toString())\r
 \r
+        val dynamicInputPropertiesName = "$workflowName-properties"\r
+\r
         bluePrintContext.workflowByName(workflowName).inputs?.forEach { propertyName, property ->\r
-            val valueNode: JsonNode = jsonNode.at(BluePrintConstants.PATH_DIVIDER + propertyName)\r
-                    ?: NullNode.getInstance()\r
-            setInputValue(propertyName, property, valueNode)\r
+            if (propertyName != dynamicInputPropertiesName) {\r
+                val valueNode: JsonNode = jsonNode.at(BluePrintConstants.PATH_DIVIDER + propertyName)\r
+                        ?: NullNode.getInstance()\r
+                setInputValue(propertyName, property, valueNode)\r
+            }\r
+        }\r
+\r
+        val workflowDynamicInputs: JsonNode? = jsonNode.get(dynamicInputPropertiesName)\r
+\r
+        workflowDynamicInputs?.let {\r
+            bluePrintContext.dataTypeByName(dynamicInputPropertiesName)?.properties?.forEach { propertyName, property ->\r
+                val valueNode: JsonNode = workflowDynamicInputs.at(BluePrintConstants.PATH_DIVIDER + propertyName)\r
+                        ?: NullNode.getInstance()\r
+                setInputValue(propertyName, property, valueNode)\r
+\r
+            }\r
         }\r
     }\r
 \r
index 947eb41..36c141f 100644 (file)
@@ -197,8 +197,7 @@ If Property Assignment is Expression.
     }\r
 \r
     fun artifactContent(artifactDefinition: ArtifactDefinition): String {\r
-        val bluePrintBasePath: String = bluePrintRuntimeService.get(BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH)?.asText()\r
-                ?: throw BluePrintException("failed to get property (${BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH}) from getStore")\r
+        val bluePrintBasePath: String = bluePrintContext.rootPath\r
 \r
         if (artifactDefinition.repository != null) {\r
             TODO()\r
diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintArchiveUtils.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintArchiveUtils.kt
new file mode 100644 (file)
index 0000000..f02524f
--- /dev/null
@@ -0,0 +1,148 @@
+/*
+ * 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.
+ */
+
+package org.onap.ccsdk.apps.controllerblueprints.core.utils
+
+import org.apache.commons.compress.archivers.zip.ZipArchiveEntry
+import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream
+import org.apache.commons.io.IOUtils
+import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
+import java.io.*
+import java.nio.charset.Charset
+import java.util.zip.ZipFile
+
+class BluePrintArchiveUtils {
+
+    companion object {
+
+
+        fun compress(source: String, destination: String, absolute: Boolean): Boolean {
+            val rootDir = File(source)
+            val saveFile = File(destination)
+            return compress(rootDir, saveFile, absolute)
+        }
+
+        /**
+         * Create a new Zip from a root directory
+         *
+         * @param directory the base directory
+         * @param filename the output filename
+         * @param absolute store absolute filepath (from directory) or only filename
+         * @return True if OK
+         */
+        fun compress(source: File, destination: File, absolute: Boolean): Boolean {
+            // recursive call
+            val zaos: ZipArchiveOutputStream
+            try {
+                zaos = ZipArchiveOutputStream(FileOutputStream(destination))
+            } catch (e: FileNotFoundException) {
+                return false
+            }
+
+            try {
+                recurseFiles(source, source, zaos, absolute)
+            } catch (e2: IOException) {
+                try {
+                    zaos.close()
+                } catch (e: IOException) {
+                    // ignore
+                }
+
+                return false
+            }
+
+            try {
+                zaos.finish()
+            } catch (e1: IOException) {
+                // ignore
+            }
+
+            try {
+                zaos.flush()
+            } catch (e: IOException) {
+                // ignore
+            }
+
+            try {
+                zaos.close()
+            } catch (e: IOException) {
+                // ignore
+            }
+
+            return true
+        }
+
+        /**
+         * Recursive traversal to add files
+         *
+         * @param root
+         * @param file
+         * @param zaos
+         * @param absolute
+         * @throws IOException
+         */
+        @Throws(IOException::class)
+        private fun recurseFiles(root: File, file: File, zaos: ZipArchiveOutputStream,
+                                 absolute: Boolean) {
+            if (file.isDirectory) {
+                // recursive call
+                val files = file.listFiles()
+                for (file2 in files!!) {
+                    recurseFiles(root, file2, zaos, absolute)
+                }
+            } else if (!file.name.endsWith(".zip") && !file.name.endsWith(".ZIP")) {
+                var filename: String? = null
+                if (absolute) {
+                    filename = file.absolutePath.substring(root.absolutePath.length)
+                } else {
+                    filename = file.name
+                }
+                val zae = ZipArchiveEntry(filename)
+                zae.setSize(file.length())
+                zaos.putArchiveEntry(zae)
+                val fis = FileInputStream(file)
+                IOUtils.copy(fis, zaos)
+                zaos.closeArchiveEntry()
+            }
+        }
+
+
+        fun deCompress(zipFile: File, targetPath: String): File {
+            val zip = ZipFile(zipFile, Charset.defaultCharset())
+            val enumeration = zip.entries()
+            while (enumeration.hasMoreElements()) {
+                val entry = enumeration.nextElement()
+                val destFilePath = File(targetPath, entry.name)
+                destFilePath.parentFile.mkdirs()
+                if (entry.isDirectory)
+                    continue
+                val bufferedIs = BufferedInputStream(zip.getInputStream(entry))
+                bufferedIs.use {
+                    destFilePath.outputStream().buffered(1024).use { bos ->
+                        bufferedIs.copyTo(bos)
+                    }
+                }
+            }
+
+            val destinationDir = File(targetPath)
+            check(destinationDir.isDirectory && destinationDir.exists()) {
+                throw BluePrintProcessorException("failed to decompress blueprint(${zipFile.absolutePath}) to ($targetPath) ")
+            }
+            return destinationDir
+        }
+    }
+
+}
\ No newline at end of file
index 04e0efc..b538f50 100644 (file)
       }
     },
     "node_templates": {
+      "resource-assignment-process": {
+        "type": "dg-activate",
+        "properties": {
+          "process-name": {
+            "get_input": "action-name"
+          },
+          "version": {
+            "get_property": [
+              "SELF",
+              "process-name"
+            ]
+          },
+          "content": {
+            "get_artifact": [
+              "SELF",
+              "dg-resource-assignment-process"
+            ]
+          }
+        },
+        "artifacts": {
+          "dg-resource-assignment-process": {
+            "type": "artifact-directed-graph",
+            "file": "Plans/CONFIG_ResourceAssignment_1.0.0.xml"
+          }
+        }
+      },
       "activate-process": {
         "type": "dg-activate",
         "properties": {
           }
         }
       },
+      "assign-activate-process": {
+        "type": "dg-activate",
+        "properties": {
+          "process-name": {
+            "get_input": "action-name"
+          },
+          "version": {
+            "get_property": [
+              "SELF",
+              "process-name"
+            ]
+          },
+          "content": {
+            "get_artifact": [
+              "SELF",
+              "dg-assign-activate-process"
+            ]
+          }
+        },
+        "artifacts": {
+          "dg-assign-activate-process": {
+            "type": "artifact-directed-graph",
+            "file": "Plans/CONFIG_AssignActivateNetconf_1.0.0.xml"
+          }
+        }
+      },
       "resource-assignment": {
         "type": "component-resource-assignment",
         "properties": {
     "workflows": {
       "resource-assignment": {
         "inputs": {
-          "request-id": {
+          "resource-assignment-properties": {
             "required": true,
-            "type": "string"
-          },
-          "action-name": {
-            "required": true,
-            "type": "string"
-          },
-          "scope-type": {
-            "required": true,
-            "type": "string"
-          },
-          "hostname": {
-            "required": true,
-            "type": "string"
+            "type": "resource-assignment-properties"
           }
         },
         "steps": {
           "call-resource-assignment": {
             "description": "Resource Assignment Workflow",
-            "target": "resource-assignment",
+            "target": "resource-assignment-process",
             "activities": [
               {
-                "call_operation": "ResourceAssignmentComponent.process"
+                "call_operation": "CONFIG.ResourceAssignment"
               }
             ]
           }
       },
       "activate": {
         "inputs": {
-          "request-id": {
-            "required": true,
-            "type": "string"
-          },
-          "action-name": {
+          "activate-properties": {
             "required": true,
-            "type": "string"
-          },
-          "scope-type": {
-            "required": true,
-            "type": "string"
-          },
-          "hostname": {
-            "required": true,
-            "type": "string"
+            "type": "activate-properties"
           }
         },
         "steps": {
             "target": "activate-process",
             "activities": [
               {
-                "call_operation": "ResourceAssignmentComponent.process"
+                "call_operation": "CONFIG.ActivateProcess"
+              }
+            ]
+          }
+        }
+      },
+      "assign-activate": {
+        "inputs": {
+          "assign-activate-properties": {
+            "required": true,
+            "type": "assign-activate-properties"
+          }
+        },
+        "steps": {
+          "activate-process": {
+            "description": "Resource Assign and Netconf Activation Workflow",
+            "target": "assign-activate-process",
+            "activities": [
+              {
+                "call_operation": "CONFIG.AssignActivateProcess"
               }
             ]
           }
index 6ca1ffd..569b668 100644 (file)
         }
       },
       "derived_from": "tosca.datatypes.Root"
+    },
+    "activate-properties": {
+      "description": "This is Dynamically generated data type for workflow activate",
+      "version": "1.0.0",
+      "properties": {
+        "request-id": {
+          "required": true,
+          "type": "string"
+        },
+        "action-name": {
+          "required": true,
+          "type": "string"
+        },
+        "scope-type": {
+          "required": true,
+          "type": "string"
+        },
+        "hostname": {
+          "required": true,
+          "type": "string"
+        }
+      },
+      "derived_from": "tosca.datatypes.Root"
+    },
+    "resource-assignment-properties": {
+      "description": "This is Dynamically generated data type for workflow activate",
+      "version": "1.0.0",
+      "properties": {
+        "request-id": {
+          "required": true,
+          "type": "string"
+        },
+        "action-name": {
+          "required": true,
+          "type": "string"
+        },
+        "scope-type": {
+          "required": true,
+          "type": "string"
+        },
+        "hostname": {
+          "required": true,
+          "type": "string"
+        }
+      },
+      "derived_from": "tosca.datatypes.Root"
+    },
+    "assign-activate-properties": {
+      "description": "This is Dynamically generated data type for workflow assign-activate",
+      "version": "1.0.0",
+      "properties": {
+        "request-id": {
+          "required": true,
+          "type": "string"
+        },
+        "action-name": {
+          "required": true,
+          "type": "string"
+        },
+        "scope-type": {
+          "required": true,
+          "type": "string"
+        },
+        "hostname": {
+          "required": true,
+          "type": "string"
+        }
+      },
+      "derived_from": "tosca.datatypes.Root"
     }
   }
 }
\ No newline at end of file
index 139ebb1..b83fd2a 100644 (file)
@@ -1,7 +1,7 @@
 {
   "node_types": {
     "dg-activate": {
-      "description": "This is BPMN Activate node type",
+      "description": "This is Generic Directed Graph Type",
       "version": "1.0.0",
       "properties": {
         "content": {
index d256bbd..2f6d2ed 100644 (file)
@@ -19,7 +19,7 @@
         xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='CONFIG' version='1.0.0'>
     <method rpc='ActivateNetconf' mode='sync'>
         <block atomic="true">
-            <execute plugin="resource-assignment" method="process">
+            <execute plugin="activate-jython" method="process">
                 <outcome value='failure'>
                     <return status="failure">
                     </return>
diff --git a/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Plans/CONFIG_AssignActivateNetconf_1.0.0.xml b/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Plans/CONFIG_AssignActivateNetconf_1.0.0.xml
new file mode 100644 (file)
index 0000000..eb41b7d
--- /dev/null
@@ -0,0 +1,42 @@
+<!--
+  ~ 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.
+  -->
+
+<service-logic
+        xmlns='http://www.onap.org/sdnc/svclogic'
+        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='CONFIG' version='1.0.0'>
+    <method rpc='ResourceAssignAndActivate' mode='sync'>
+        <block atomic="true">
+            <execute plugin="resource-assignment" method="process">
+                <outcome value='failure'>
+                    <return status="failure">
+                    </return>
+                </outcome>
+                <outcome value='success'>
+                    <execute plugin="activate-jython" method="process">
+                        <outcome value='failure'>
+                            <return status="failure">
+                            </return>
+                        </outcome>
+                        <outcome value='success'>
+                            <return status='success'>
+                            </return>
+                        </outcome>
+                    </execute>
+                </outcome>
+            </execute>
+        </block>
+    </method>
+</service-logic>
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Plans/CONFIG_ResourceAssignment_1.0.0.xml b/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Plans/CONFIG_ResourceAssignment_1.0.0.xml
new file mode 100644 (file)
index 0000000..a197877
--- /dev/null
@@ -0,0 +1,34 @@
+<!--
+  ~ 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.
+  -->
+
+<service-logic
+        xmlns='http://www.onap.org/sdnc/svclogic'
+        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='CONFIG' version='1.0.0'>
+    <method rpc='ResourceAssignment' mode='sync'>
+        <block atomic="true">
+            <execute plugin="resource-assignment" method="process">
+                 <outcome value='failure'>
+                    <return status="failure">
+                    </return>
+                </outcome>
+                <outcome value='success'>
+                    <return status='success'>
+                    </return>
+                </outcome>
+            </execute>
+        </block>
+    </method>
+</service-logic>
\ No newline at end of file
index 8a779c1..5c46208 100644 (file)
                 <artifactId>commons-io</artifactId>
                 <version>2.6</version>
             </dependency>
+            <dependency>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-compress</artifactId>
+                <version>1.15</version>
+            </dependency>
             <dependency>
                 <groupId>org.apache.velocity</groupId>
                 <artifactId>velocity</artifactId>
             <groupId>commons-io</groupId>
             <artifactId>commons-io</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-compress</artifactId>
+        </dependency>
         <dependency>
             <groupId>com.jayway.jsonpath</groupId>
             <artifactId>json-path</artifactId>