Change to native helm, and removed generate-name capability reference.
Issue-ID: SO-3835
Change-Id: I59f4271872db1e94c189a3b375da1fe30d1089a3
Signed-off-by: sangeeta.bellara <sangeeta.bellara@t-systems.com>
{
- "tosca_definitions_version": "controller_blueprint_1_0_0",
- "metadata": {
- "template_author": "Thamlur Raju <TR00568434@TechMahindra.com>",
- "author-email": "TR00568434@TechMahindra.com",
- "user-groups": "ADMIN, OPERATION",
- "template_name": "5G_Core",
- "template_version": "1.0.37",
- "template_tags": "Thamlur Raju, Malinconico Aniello Paolo, Vamshi Namilikonda, 5G_Core",
- "template_type": "DEFAULT"
+ "tosca_definitions_version" : "controller_blueprint_1_0_0",
+ "metadata" : {
+ "template_author" : "Thamlur Raju <TR00568434@TechMahindra.com>, Sangeeta Bellara<sangeeta.bellara@t-systems.com>",
+ "author-email" : "TR00568434@TechMahindra.com,sangeeta.bellara@t-systems.com",
+ "user-groups" : "ADMIN, OPERATION",
+ "template_name" : "5G_Core",
+ "template_version" : "2.0.0",
+ "template_tags" : "Thamlur Raju, Malinconico Aniello Paolo,Vamshi, 5G_Core",
+ "template_type" : "DEFAULT"
},
- "imports": [
- {
- "file": "Definitions/data_types.json"
+ "imports" : [ {
+ "file" : "Definitions/data_types.json"
+ }, {
+ "file" : "Definitions/relationship_types.json"
+ }, {
+ "file" : "Definitions/artifact_types.json"
+ }, {
+ "file" : "Definitions/node_types.json"
+ }, {
+ "file" : "Definitions/policy_types.json"
+ } ],
+ "dsl_definitions" : {
+ "vpkg-rest-api" : {
+ "type" : "basic-auth",
+ "url" : "http://",
+ "username" : "admin",
+ "password" : "admin"
},
- {
- "file": "Definitions/relationship_types.json"
+ "multicloud-k8s-api" : {
+ "type" : "basic-auth",
+ "username" : "admin",
+ "password" : "admin",
+ "url" : "http://multicloud-k8s:9015"
},
- {
- "file": "Definitions/artifact_types.json"
+ "aai-api" : {
+ "type" : "basic-auth",
+ "username" : "AAI",
+ "password" : "AAI",
+ "url" : "https://aai.onap:8443"
},
- {
- "file": "Definitions/node_types.json"
- },
- {
- "file": "Definitions/policy_types.json"
- }
- ],
- "dsl_definitions": {
- "vpkg-rest-api": {
- "type": "basic-auth",
- "url": "http://",
- "username": "admin",
- "password": "admin"
- },
- "multicloud-k8s-api": {
- "type": "basic-auth",
- "username": "admin",
- "password": "admin",
- "url": "http://multicloud-k8s:9015"
- },
- "aai-api": {
- "type": "basic-auth",
- "username": "AAI",
- "password": "AAI",
- "url": "https://aai.onap:8443"
- },
- "profile-upload-properties": {
- "assignment-params": {
- "get_attribute": [
- "resource-assignment",
- "assignment-params"
- ]
+ "profile-upload-properties" : {
+ "assignment-params" : {
+ "get_attribute" : [ "resource-assignment", "assignment-params" ]
},
- "api-access": "*multicloud-k8s-api"
+ "api-access" : "*multicloud-k8s-api"
},
- "config-deploy-properties": {
- "resolution-key": {
- "get_input": "resolution-key"
+ "config-deploy-properties" : {
+ "resolution-key" : {
+ "get_input" : "resolution-key"
},
- "api-access": "*multicloud-k8s-api",
- "aai-access": "*aai-api"
+ "api-access" : "*multicloud-k8s-api",
+ "aai-access" : "*aai-api"
},
- "config-deploy-day-2-properties": {
- "resolution-key": {
- "get_input": "resolution-key"
+ "config-deploy-day-2-properties" : {
+ "resolution-key" : {
+ "get_input" : "resolution-key"
},
- "api-access": "*multicloud-k8s-api",
- "aai-access": "*aai-api"
+ "api-access" : "*multicloud-k8s-api",
+ "aai-access" : "*aai-api"
}
},
- "topology_template": {
- "workflows": {
- "resource-assignment": {
- "steps": {
- "resource-assignment": {
- "description": "Resource Assign Workflow",
- "target": "resource-assignment",
- "activities": [
- {
- "call_operation": "ResourceResolutionComponent.process"
- }
- ],
- "on_success": [
- "profile-upload"
- ]
+ "topology_template" : {
+ "workflows" : {
+ "resource-assignment" : {
+ "steps" : {
+ "resource-assignment" : {
+ "description" : "Resource Assign Workflow",
+ "target" : "resource-assignment",
+ "activities" : [ {
+ "call_operation" : "ResourceResolutionComponent.process"
+ } ],
+ "on_success" : [ "profile-upload" ]
},
- "profile-upload": {
- "description": "Upload K8s Profile",
- "target": "profile-upload",
- "activities": [
- {
- "call_operation": "ComponentScriptExecutor.process"
- }
- ]
+ "profile-upload" : {
+ "description" : "Upload K8s Profile",
+ "target" : "profile-upload",
+ "activities" : [ {
+ "call_operation" : "ComponentScriptExecutor.process"
+ } ]
}
},
- "inputs": {
- "template-prefix": {
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
+ "inputs" : {
+ "template-prefix" : {
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
}
},
- "resolution-key": {
- "required": false,
- "type": "string",
- "entry_schema": {
- "type": ""
+ "resolution-key" : {
+ "required" : false,
+ "type" : "string",
+ "entry_schema" : {
+ "type" : ""
}
},
- "resource-assignment-properties": {
- "description": "Dynamic PropertyDefinition for workflow(resource-assignment).",
- "required": true,
- "type": "dt-resource-assignment-properties"
+ "resource-assignment-properties" : {
+ "description" : "Dynamic PropertyDefinition for workflow(resource-assignment).",
+ "required" : true,
+ "type" : "dt-resource-assignment-properties"
}
},
- "outputs": {
- "meshed-template": {
- "type": "json",
- "value": {
- "get_attribute": [
- "resource-assignment",
- "assignment-params"
- ]
+ "outputs" : {
+ "meshed-template" : {
+ "type" : "json",
+ "value" : {
+ "get_attribute" : [ "resource-assignment", "assignment-params" ]
}
}
}
},
- "config-assign": {
- "steps": {
- "config-assign": {
- "description": "Config Assign Workflow",
- "target": "config-assign",
- "activities": [
- {
- "call_operation": ""
- }
- ]
+ "config-assign" : {
+ "steps" : {
+ "config-assign" : {
+ "description" : "Config Assign Workflow",
+ "target" : "config-assign",
+ "activities" : [ {
+ "call_operation" : ""
+ } ]
}
},
- "inputs": {
- "resolution-key": {
- "required": true,
- "type": "string"
+ "inputs" : {
+ "resolution-key" : {
+ "required" : true,
+ "type" : "string"
},
- "store-result": {
- "required": true,
- "type": "boolean"
+ "store-result" : {
+ "required" : true,
+ "type" : "boolean"
},
- "config-assign-properties": {
- "description": "Dynamic PropertyDefinition for workflow(config-assign).",
- "required": true,
- "type": "dt-config-assign-properties"
+ "config-assign-properties" : {
+ "description" : "Dynamic PropertyDefinition for workflow(config-assign).",
+ "required" : true,
+ "type" : "dt-config-assign-properties"
}
},
- "outputs": {
- "dry-run": {
- "type": "json",
- "value": {
- "get_attribute": [
- "config-assign",
- "assignment-params"
- ]
+ "outputs" : {
+ "dry-run" : {
+ "type" : "json",
+ "value" : {
+ "get_attribute" : [ "config-assign", "assignment-params" ]
}
}
}
},
- "config-assign-day-2": {
- "steps": {
- "config-assign": {
- "description": "Config Assign Workflow",
- "target": "config-assign-day-2",
- "activities": [
- {
- "call_operation": ""
- }
- ]
+ "config-assign-day-2" : {
+ "steps" : {
+ "config-assign" : {
+ "description" : "Config Assign Workflow",
+ "target" : "config-assign-day-2",
+ "activities" : [ {
+ "call_operation" : ""
+ } ]
}
},
- "inputs": {
- "resolution-key": {
- "required": true,
- "type": "string"
+ "inputs" : {
+ "resolution-key" : {
+ "required" : true,
+ "type" : "string"
},
- "store-result": {
- "required": true,
- "type": "boolean"
+ "store-result" : {
+ "required" : true,
+ "type" : "boolean"
},
- "config-assign-day-2-properties": {
- "description": "Dynamic PropertyDefinition for workflow(config-assign).",
- "required": true,
- "type": "dt-config-assign-day-2-properties"
+ "config-assign-day-2-properties" : {
+ "description" : "Dynamic PropertyDefinition for workflow(config-assign-day-2).",
+ "required" : true,
+ "type" : "dt-config-assign-day-2-properties"
}
},
- "outputs": {
- "dry-run": {
- "type": "json",
- "value": {
- "get_attribute": [
- "config-assign-day-2",
- "assignment-params"
- ]
+ "outputs" : {
+ "dry-run" : {
+ "type" : "json",
+ "value" : {
+ "get_attribute" : [ "config-assign-day-2", "assignment-params" ]
}
}
}
},
- "config-deploy": {
- "steps": {
- "imperative-workflow-step-1": {
- "description": "Config Deploy workflow",
- "target": "execute-post",
- "activities": [
- {
- "call_operation": "ComponentScriptExecutor.process"
- }
- ]
+ "config-deploy" : {
+ "steps" : {
+ "config-deploy" : {
+ "description" : "Config Deploy Workflow",
+ "target" : "config-deploy-process"
}
},
- "inputs": {
- "resolution-key": {
- "required": false,
- "type": "string"
+ "inputs" : {
+ "resolution-key" : {
+ "required" : false,
+ "type" : "string"
},
- "service-instance-id": {
- "required": false,
- "type": "string"
+ "store-result" : {
+ "required" : true,
+ "type" : "boolean"
},
- "config-deploy-properties": {
- "description": "Dynamic PropertyDefinition for workflow(config-deploy).",
- "required": true,
- "type": "dt-config-deploy-properties"
+ "service-instance-id" : {
+ "required" : false,
+ "type" : "string"
+ },
+ "config-deploy-properties" : {
+ "description" : "Dynamic PropertyDefinition for workflow(config-deploy).",
+ "required" : true,
+ "type" : "dt-config-deploy-properties"
}
}
},
- "config-deploy-day-2": {
- "steps": {
- "imperative-workflow-step-1": {
- "description": "Config Deploy workflow",
- "target": "execute-put",
- "activities": [
- {
- "call_operation": "ComponentScriptExecutor.process"
- }
- ]
+ "config-deploy-day-2" : {
+ "steps" : {
+ "config-deploy" : {
+ "description" : "Config Deploy Day 2 Workflow",
+ "target" : "config-deploy-process-2"
}
},
- "inputs": {
- "resolution-key": {
- "required": false,
- "type": "string"
+ "inputs" : {
+ "resolution-key" : {
+ "required" : false,
+ "type" : "string"
},
- "service-instance-id": {
- "required": false,
- "type": "string"
+ "store-result" : {
+ "required" : true,
+ "type" : "boolean"
},
- "config-deploy-day-2-properties": {
- "description": "Dynamic PropertyDefinition for workflow(config-deploy).",
- "required": true,
- "type": "dt-config-deploy-day-2-properties"
+ "service-instance-id" : {
+ "required" : false,
+ "type" : "string"
}
}
}
},
- "node_templates": {
- "resource-assignment": {
- "type": "component-resource-resolution",
- "interfaces": {
- "ResourceResolutionComponent": {
- "operations": {
- "process": {
- "inputs": {
- "artifact-prefix-names": {
- "get_input": "template-prefix"
+ "node_templates" : {
+ "resource-assignment" : {
+ "type" : "component-resource-resolution",
+ "interfaces" : {
+ "ResourceResolutionComponent" : {
+ "operations" : {
+ "process" : {
+ "inputs" : {
+ "artifact-prefix-names" : {
+ "get_input" : "template-prefix"
}
}
}
}
}
},
- "artifacts": {
- "base_template-template": {
- "type": "artifact-template-velocity",
- "file": "Templates/base_template-template.vtl"
- },
- "base_template-mapping": {
- "type": "artifact-mapping-resource",
- "file": "Templates/base_template-mapping.json"
+ "artifacts" : {
+ "helm_amf-template" : {
+ "type" : "artifact-template-velocity",
+ "file" : "Templates/helm_amf-template.vtl"
},
- "amf-template": {
- "type": "artifact-template-velocity",
- "file": "Templates/amf-template.vtl"
+ "helm_amf-mapping" : {
+ "type" : "artifact-mapping-resource",
+ "file" : "Templates/helm_amf-mapping.json"
},
- "amf-mapping": {
- "type": "artifact-mapping-resource",
- "file": "Templates/amf-mapping.json"
+ "helm_smf-template" : {
+ "type" : "artifact-template-velocity",
+ "file" : "Templates/helm_smf-template.vtl"
},
- "smf-template": {
- "type": "artifact-template-velocity",
- "file": "Templates/smf-template.vtl"
+ "helm_smf-mapping" : {
+ "type" : "artifact-mapping-resource",
+ "file" : "Templates/helm_smf-mapping.json"
},
- "smf-mapping": {
- "type": "artifact-mapping-resource",
- "file": "Templates/smf-mapping.json"
+ "helm_upf-template" : {
+ "type" : "artifact-template-velocity",
+ "file" : "Templates/helm_upf-template.vtl"
},
- "upf-template": {
- "type": "artifact-template-velocity",
- "file": "Templates/upf-template.vtl"
+ "helm_upf-mapping" : {
+ "type" : "artifact-mapping-resource",
+ "file" : "Templates/helm_upf-mapping.json"
},
- "upf-mapping": {
- "type": "artifact-mapping-resource",
- "file": "Templates/upf-mapping.json"
+ "vnf-template" : {
+ "type" : "artifact-template-velocity",
+ "file" : "Templates/vnf-template.vtl"
},
- "vnf-template": {
- "type": "artifact-template-velocity",
- "file": "Templates/vnf-template.vtl"
- },
- "vnf-mapping": {
- "type": "artifact-mapping-resource",
- "file": "Templates/vnf-mapping.json"
+ "vnf-mapping" : {
+ "type" : "artifact-mapping-resource",
+ "file" : "Templates/vnf-mapping.json"
}
}
},
- "profile-upload": {
- "type": "component-script-executor",
- "interfaces": {
- "ComponentScriptExecutor": {
- "operations": {
- "process": {
- "inputs": {
- "script-type": "kotlin",
- "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.K8sProfileUpload",
- "dynamic-properties": "*profile-upload-properties"
+ "profile-upload" : {
+ "type" : "component-script-executor",
+ "interfaces" : {
+ "ComponentScriptExecutor" : {
+ "operations" : {
+ "process" : {
+ "inputs" : {
+ "script-type" : "kotlin",
+ "script-class-reference" : "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.K8sProfileUpload",
+ "dynamic-properties" : "*profile-upload-properties"
}
}
}
}
}
},
- "config-assign": {
- "type": "component-resource-resolution",
- "interfaces": {
- "ResourceResolutionComponent": {
- "operations": {
- "process": {
- "inputs": {
- "resolution-key": {
- "get_input": "resolution-key"
+ "config-assign" : {
+ "type" : "component-resource-resolution",
+ "interfaces" : {
+ "ResourceResolutionComponent" : {
+ "operations" : {
+ "process" : {
+ "inputs" : {
+ "resolution-key" : {
+ "get_input" : "resolution-key"
},
- "store-result": true,
- "artifact-prefix-names": [
- "baseconfig"
- ]
+ "store-result" : true,
+ "artifact-prefix-names" : [ "baseconfig" ]
}
}
}
}
},
- "artifacts": {
- "baseconfig-template": {
- "type": "artifact-template-velocity",
- "file": "Templates/baseconfig-template.vtl"
+ "artifacts" : {
+ "baseconfig-template" : {
+ "type" : "artifact-template-velocity",
+ "file" : "Templates/baseconfig-template.vtl"
},
- "baseconfig-mapping": {
- "type": "artifact-mapping-resource",
- "file": "Templates/baseconfig-mapping.json"
+ "baseconfig-mapping" : {
+ "type" : "artifact-mapping-resource",
+ "file" : "Templates/baseconfig-mapping.json"
}
}
},
- "config-assign-day-2": {
- "type": "component-resource-resolution",
- "interfaces": {
- "ResourceResolutionComponent": {
- "operations": {
- "process": {
- "inputs": {
- "resolution-key": {
- "get_input": "resolution-key"
+ "config-assign-day-2" : {
+ "type" : "component-resource-resolution",
+ "interfaces" : {
+ "ResourceResolutionComponent" : {
+ "operations" : {
+ "process" : {
+ "inputs" : {
+ "resolution-key" : {
+ "get_input" : "resolution-key"
},
- "store-result": true,
- "artifact-prefix-names": [
- "baseconfigput"
- ]
+ "store-result" : true,
+ "artifact-prefix-names" : [ "baseconfigput" ]
}
}
}
}
},
- "artifacts": {
- "baseconfigput-template": {
- "type": "artifact-template-velocity",
- "file": "Templates/baseconfigput-template.vtl"
+ "artifacts" : {
+ "baseconfigput-template" : {
+ "type" : "artifact-template-velocity",
+ "file" : "Templates/baseconfigput-template.vtl"
},
- "baseconfigput-mapping": {
- "type": "artifact-mapping-resource",
- "file": "Templates/baseconfigput-mapping.json"
+ "baseconfigput-mapping" : {
+ "type" : "artifact-mapping-resource",
+ "file" : "Templates/baseconfigput-mapping.json"
}
}
},
- "execute-post": {
- "type": "component-script-executor",
- "interfaces": {
- "ComponentScriptExecutor": {
- "operations": {
- "process": {
- "inputs": {
- "script-type": "kotlin",
- "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.DayOneConfig",
- "dynamic-properties": "*config-deploy-properties"
+ "config-deploy-process" : {
+ "type" : "component-script-executor",
+ "interfaces" : {
+ "ComponentScriptExecutor" : {
+ "operations" : {
+ "process" : {
+ "implementation" : {
+ "primary" : "component-script",
+ "timeout" : 180,
+ "operation_host" : "SELF"
+ },
+ "inputs" : {
+ "script-type" : "kotlin",
+ "script-class-reference" : "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.DayOneConfig",
+ "instance-dependencies" : [ "bluePrintPropertiesService" ],
+ "dynamic-properties" : "*config-deploy-properties"
+ },
+ "outputs" : {
+ "response-data" : "",
+ "status" : "success"
}
}
}
}
+ },
+ "artifacts" : {
+ "config-deploy-aai-template" : {
+ "type" : "artifact-template-velocity",
+ "file" : "Templates/config-deploy-aai-template.vtl"
+ },
+ "config-deploy-aai-mapping" : {
+ "type" : "artifact-mapping-resource",
+ "file" : "Templates/config-deploy-aai-mapping.json"
+ },
+ "config-deploy-sdnc-template" : {
+ "type" : "artifact-template-velocity",
+ "file" : "Templates/config-deploy-sdnc-template.vtl"
+ },
+ "config-deploy-sdnc-mapping" : {
+ "type" : "artifact-mapping-resource",
+ "file" : "Templates/config-deploy-sdnc-mapping.json"
+ }
}
},
- "execute-put": {
- "type": "component-script-executor",
- "interfaces": {
- "ComponentScriptExecutor": {
- "operations": {
- "process": {
- "inputs": {
- "script-type": "kotlin",
- "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.KotlinK8sUpdateConfig",
- "dynamic-properties": "*config-deploy-day-2-properties"
+ "config-deploy-process-2" : {
+ "type" : "component-script-executor",
+ "interfaces" : {
+ "ComponentScriptExecutor" : {
+ "operations" : {
+ "process" : {
+ "inputs" : {
+ "script-type" : "kotlin",
+ "script-class-reference" : "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.KotlinK8sUpdateConfig",
+ "instance-dependencies" : [ "bluePrintPropertiesService" ],
+ "dynamic-properties" : "*config-deploy-day-2-properties"
}
}
}
{
- "artifact_types": {
- "artifact-directed-graph": {
- "description": "Directed Graph File",
- "version": "1.0.0",
- "derived_from": "tosca.artifacts.Implementation",
- "file_ext": [
- "json",
- "xml"
- ]
+ "artifact_types" : {
+ "artifact-mapping-resource" : {
+ "description" : "Resource Mapping File used along with Configuration template",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.artifacts.Implementation",
+ "file_ext" : [ "json" ]
},
- "artifact-mapping-resource": {
- "description": "Resource Mapping File used along with Configuration template",
- "version": "1.0.0",
- "derived_from": "tosca.artifacts.Implementation",
- "file_ext": [
- "json"
- ]
- },
- "artifact-template-velocity": {
- "description": " Velocity Template used for Configuration",
- "version": "1.0.0",
- "derived_from": "tosca.artifacts.Implementation",
- "file_ext": [
- "vtl"
- ]
+ "artifact-template-velocity" : {
+ "description" : " Velocity Template used for Configuration",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.artifacts.Implementation",
+ "file_ext" : [ "vtl" ]
}
}
-}
+}
\ No newline at end of file
{
- "data_types": {
- "dt-config-assign-day-2-properties": {
- "description": "Dynamic DataType definition for workflow(config-assign-day-2).",
- "version": "1.0.0",
- "properties": {
- "vnf-id": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "supportedNssai": {
- "description": "5GC Simulator CNF CDS use case parameter - Parameter used to pass the supported NSSAI during the day2 for each 5G Core resources",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "service-instance-id": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "entry_schema": {
- "type": ""
- }
+ "data_types" : {
+ "dt-config-assign-day-2-properties" : {
+ "description" : "Dynamic DataType definition for workflow(config-assign-day-2).",
+ "version" : "1.0.0",
+ "properties" : {
+ "vnf-id" : {
+ "description" : "",
+ "required" : false,
+ "type" : "string",
+ "status" : "",
+ "constraints" : [ { } ],
+ "entry_schema" : {
+ "type" : ""
+ }
+ },
+ "service-instance-id" : {
+ "description" : "",
+ "required" : false,
+ "type" : "string",
+ "status" : "",
+ "constraints" : [ { } ],
+ "entry_schema" : {
+ "type" : ""
+ }
+ },
+ "supportedNssai" : {
+ "description" : "",
+ "required" : false,
+ "type" : "string",
+ "default" : "hello"
}
},
- "derived_from": "tosca.datatypes.Dynamic"
+ "derived_from" : "tosca.datatypes.Dynamic"
},
- "dt-config-assign-properties": {
- "description": "Dynamic DataType definition for workflow(config-assign).",
- "version": "1.0.0",
- "properties": {
- "vnf-id": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "supportedNssai": {
- "description": "5GC Simulator CNF CDS use case parameter - Parameter used to pass the supported NSSAI during the day2 for each 5G Core resources",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "service-instance-id": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "entry_schema": {
- "type": ""
+ "dt-config-assign-properties" : {
+ "description" : "Dynamic DataType definition for workflow(config-assign).",
+ "version" : "1.0.0",
+ "properties" : {
+ "vnf-id" : {
+ "description" : "",
+ "required" : false,
+ "type" : "string",
+ "status" : "",
+ "constraints" : [ { } ],
+ "entry_schema" : {
+ "type" : ""
+ }
+ },
+ "service-instance-id" : {
+ "description" : "",
+ "required" : false,
+ "type" : "string",
+ "status" : "",
+ "constraints" : [ { } ],
+ "entry_schema" : {
+ "type" : ""
}
}
},
- "derived_from": "tosca.datatypes.Dynamic"
+ "derived_from" : "tosca.datatypes.Dynamic"
},
- "dt-config-deploy-properties": {
- "description": "Dynamic DataType definition for workflow(config-deploy).",
- "version": "1.0.0",
- "properties": {
- "vnf-id": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "service-instance-id": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "entry_schema": {
- "type": ""
+ "dt-config-deploy-properties" : {
+ "description" : "Dynamic DataType definition for workflow(config-deploy).",
+ "version" : "1.0.0",
+ "properties" : {
+ "vf-modules-list-aai" : {
+ "description" : "list of modules associated with vnf from AAI",
+ "type" : "json"
+ },
+ "vf-modules-list-sdnc" : {
+ "description" : "list of modules associated with vnf from MDSAL",
+ "type" : "json"
+ },
+ "vnf-id" : {
+ "description" : "",
+ "required" : false,
+ "type" : "string"
+ },
+ "service-instance-id" : {
+ "description" : "",
+ "required" : false,
+ "type" : "string",
+ "status" : "",
+ "constraints" : [ { } ],
+ "entry_schema" : {
+ "type" : ""
}
}
},
- "derived_from": "tosca.datatypes.Dynamic"
+ "derived_from" : "tosca.datatypes.Dynamic"
},
- "dt-config-deploy-day-2-properties": {
- "description": "Dynamic DataType definition for workflow(config-deploy-day-2).",
- "version": "1.0.0",
- "properties": {
- "vnf-id": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "service-instance-id": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "entry_schema": {
- "type": ""
- }
- }
- },
- "derived_from": "tosca.datatypes.Dynamic"
- },
- "dt-resource-assignment-properties": {
- "description": "Dynamic DataType definition for workflow(resource-assignment).",
- "version": "1.0.0",
- "properties": {
- "vpg-management-port": {
- "description": "SSH external port of ssh. When 0 ssh service will not be exposed",
- "type": "string",
- "default": "0"
- },
- "amfName": {
- "description": "5GC Simulator CNF CDS use case parameter - Parameter used for amf resource name ",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "default": "${amfName}",
- "entry_schema": {
- "type": ""
- }
- },
- "fiveg0_snssai": {
- "description": "5GC Simulator CNF CDS use case parameter - Parameter used to pass the SNSSAI during day0/1 ",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "default": "${fiveg0_snssai}",
- "entry_schema": {
- "type": ""
- }
- },
- "config.amfName": {
- "description": "5GC Simulator CNF CDS use case parameter - Parameter used for amf resource name ",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "default": "${config.amfName}",
- "entry_schema": {
- "type": ""
- }
- },
- "config.smfName": {
- "description": "5GC Simulator CNF CDS use case parameter - Parameter used for smf resource name ",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "default": "${config.smfName}",
- "entry_schema": {
- "type": ""
- }
- },
- "smfName": {
- "description": "5GC Simulator CNF CDS use case parameter - Parameter used for smf resource name ",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "default": "${smfName}",
- "entry_schema": {
- "type": ""
- }
- },
- "config.upfName": {
- "description": "5GC Simulator CNF CDS use case parameter - Parameter used for upf resource name ",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "default": "${config.upfName}",
- "entry_schema": {
- "type": ""
- }
- },
- "upfName": {
- "description": "5GC Simulator CNF CDS use case parameter - Parameter used for upf resource name ",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "default": "${upfName}",
- "entry_schema": {
- "type": ""
- }
- },
- "config.supportedNssai.sNssai.snssai": {
- "description": "5GC Simulator CNF CDS use case parameter - Parameter used to pass the SNSSAI during the day2 for each 5G Core resources",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "default": "${config.supportedNssai.sNssai.snssai}",
- "entry_schema": {
- "type": ""
- }
- },
- "config.singletest": {
- "description": "5GC Simulator CNF CDS use case parameter - Parameter used for testing purpose ",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {}
- ],
- "default": "${singletest}",
- "entry_schema": {
- "type": ""
- }
- },
- "k8s-rb-profile-namespace": {
- "description": "K8s namespace to create helm chart for specified profile",
- "type": "string",
- "default": "default"
- },
- "k8s-rb-profile-name": {
- "description": "Profile name used in multicloud/k8s plugin to identify Helm chart(s) where this mapping is providing override values.",
- "type": "string",
- "default": "template-profile"
- },
- "config.test": {
- "description": "Profile name used in multicloud/k8s plugin to identify Helm chart(s) where this mapping is providing override values.",
- "type": "string",
- "default": "template"
- },
- "vnf-id": {
- "description": "",
- "required": false,
- "type": "string"
- },
- "service-instance-id": {
- "description": "",
- "required": false,
- "type": "string"
- },
- "vnf_name": {
- "description": "",
- "required": false,
- "type": "string"
- },
- "aic-cloud-region": {
- "description": "",
- "required": false,
- "type": "string"
- },
- "vf-module-model-customization-uuid": {
- "description": "",
- "required": false,
- "type": "string"
- },
- "management-prefix-id": {
- "description": "",
- "required": false,
- "type": "string"
- },
- "vf-module-id": {
- "description": "",
- "required": false,
- "type": "string"
- },
- "vf-module-label": {
- "description": "",
- "required": false,
- "type": "string"
- },
- "vf-module-model-invariant-uuid": {
- "type": "string"
- },
- "vf-naming-policy": {
- "description": "",
- "required": false,
- "type": "string",
- "default": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP"
- },
- "vf-module-model-version": {
- "type": "string"
+ "dt-resource-assignment-properties" : {
+ "description" : "Dynamic DataType definition for workflow(resource-assignment).",
+ "version" : "1.0.0",
+ "properties" : {
+ "k8s-rb-profile-namespace" : {
+ "description" : "K8s namespace to create helm chart for specified profile",
+ "type" : "string"
+ },
+ "k8s-rb-profile-name" : {
+ "description" : "Profile name used in multicloud/k8s plugin to identify Helm chart(s) where this mapping is providing override values.",
+ "type" : "string"
+ },
+ "snssai" : {
+ "description" : "",
+ "type" : "string"
+ },
+ "vnf-id" : {
+ "description" : "",
+ "required" : false,
+ "type" : "string"
+ },
+ "fivegc0_snssai" : {
+ "description" : "",
+ "type" : "string"
+ },
+ "service-instance-id" : {
+ "description" : "",
+ "required" : false,
+ "type" : "string"
+ },
+ "config.test" : {
+ "description" : "",
+ "type" : "string"
+ },
+ "vnf_name" : {
+ "description" : "",
+ "required" : false,
+ "type" : "string"
+ },
+ "aic-cloud-region" : {
+ "description" : "",
+ "required" : false,
+ "type" : "string"
+ },
+ "config.upfName" : {
+ "description" : "upf name",
+ "type" : "string"
+ },
+ "upfName" : {
+ "description" : "upf name",
+ "type" : "string"
+ },
+ "vf-module-model-customization-uuid" : {
+ "description" : "",
+ "required" : false,
+ "type" : "string"
+ },
+ "config.singletest" : {
+ "description" : "",
+ "type" : "string"
+ },
+ "management-prefix-id" : {
+ "description" : "",
+ "required" : false,
+ "type" : "string"
+ },
+ "config.supportedNssai.sNssai.snssai" : {
+ "description" : "supportedNssai.sNssai.snssai properties",
+ "type" : "string"
+ },
+ "smfName" : {
+ "description" : "smf name",
+ "type" : "string"
+ },
+ "vf-module-id" : {
+ "description" : "",
+ "required" : false,
+ "type" : "string"
+ },
+ "vf-module-label" : {
+ "description" : "",
+ "required" : false,
+ "type" : "string"
+ },
+ "amfName" : {
+ "description" : "amf name",
+ "type" : "string"
+ },
+ "vf-module-model-invariant-uuid" : {
+ "type" : "string"
+ },
+ "vf-naming-policy" : {
+ "description" : "",
+ "required" : false,
+ "type" : "string",
+ "default" : "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP"
+ },
+ "config.smfName" : {
+ "description" : "smf name",
+ "type" : "string"
+ },
+ "vf-module-model-version" : {
+ "type" : "string"
+ },
+ "config.amfName" : {
+ "description" : "amf name",
+ "type" : "string"
}
},
- "derived_from": "tosca.datatypes.Dynamic"
+ "derived_from" : "tosca.datatypes.Dynamic"
}
}
-}
+}
\ No newline at end of file
{
- "node_types": {
- "component-resource-resolution": {
- "description": "This is Resource Assignment Component API",
- "version": "1.0.0",
- "attributes": {
- "assignment-params": {
- "description": "Holds resolved template, resolution-summary or key-value",
- "required": true,
- "type": "string"
+ "node_types" : {
+ "component-resource-resolution" : {
+ "description" : "This is Resource Assignment Component API",
+ "version" : "1.0.0",
+ "attributes" : {
+ "assignment-params" : {
+ "description" : "Holds resolved template, resolution-summary or key-value",
+ "required" : true,
+ "type" : "string"
},
- "assignment-map": {
- "description": "Holds resolved values for each artifact prefix eg. { vdns: { vnf-id: 123 } }",
- "required": true,
- "type": "map"
+ "assignment-map" : {
+ "description" : "Holds resolved values for each artifact prefix eg. { vdns: { vnf-id: 123 } }",
+ "required" : true,
+ "type" : "map"
}
},
- "capabilities": {
- "component-node": {
- "type": "tosca.capabilities.Node"
+ "capabilities" : {
+ "component-node" : {
+ "type" : "tosca.capabilities.Node"
}
},
- "interfaces": {
- "ResourceResolutionComponent": {
- "operations": {
- "process": {
- "inputs": {
- "resolution-key": {
- "description": "Key for service instance related correlation.",
- "required": false,
- "type": "string"
+ "interfaces" : {
+ "ResourceResolutionComponent" : {
+ "operations" : {
+ "process" : {
+ "inputs" : {
+ "resolution-key" : {
+ "description" : "Key for service instance related correlation.",
+ "required" : false,
+ "type" : "string"
},
- "occurrence": {
- "description": "Number of time to perform the resolution.",
- "required": false,
- "type": "integer",
- "default": 1
+ "occurrence" : {
+ "description" : "Number of time to perform the resolution.",
+ "required" : false,
+ "type" : "integer",
+ "default" : 1
},
- "store-result": {
- "description": "Whether or not to store the output.",
- "required": false,
- "type": "boolean"
+ "store-result" : {
+ "description" : "Whether or not to store the output.",
+ "required" : false,
+ "type" : "boolean"
},
- "resource-type": {
- "description": "Request type.",
- "required": false,
- "type": "string"
+ "resource-type" : {
+ "description" : "Request type.",
+ "required" : false,
+ "type" : "string"
},
- "resolution-summary": {
- "description": "Enable resolution-summary output",
- "required": false,
- "type": "boolean"
+ "resolution-summary" : {
+ "description" : "Enable resolution-summary output",
+ "required" : false,
+ "type" : "boolean"
},
- "artifact-prefix-names": {
- "description": "Template , Resource Assignment Artifact Prefix names",
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
+ "artifact-prefix-names" : {
+ "description" : "Template , Resource Assignment Artifact Prefix names",
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
}
},
- "request-id": {
- "description": "Request Id, Unique Id for the request.",
- "required": true,
- "type": "string"
+ "request-id" : {
+ "description" : "Request Id, Unique Id for the request.",
+ "required" : true,
+ "type" : "string"
},
- "resource-id": {
- "description": "Resource Id.",
- "required": false,
- "type": "string"
+ "resource-id" : {
+ "description" : "Resource Id.",
+ "required" : false,
+ "type" : "string"
},
- "action-name": {
- "description": "Action Name of the process",
- "required": false,
- "type": "string"
+ "action-name" : {
+ "description" : "Action Name of the process",
+ "required" : false,
+ "type" : "string"
},
- "dynamic-properties": {
- "description": "Dynamic Json Content or DSL Json reference.",
- "required": false,
- "type": "json"
+ "dynamic-properties" : {
+ "description" : "Dynamic Json Content or DSL Json reference.",
+ "required" : false,
+ "type" : "json"
}
},
- "outputs": {
- "resource-assignment-params": {
- "required": true,
- "type": "string"
+ "outputs" : {
+ "resource-assignment-params" : {
+ "required" : true,
+ "type" : "string"
},
- "resource-assignment-map": {
- "required": true,
- "type": "string"
+ "resource-assignment-map" : {
+ "required" : true,
+ "type" : "string"
},
- "status": {
- "required": true,
- "type": "string"
+ "status" : {
+ "required" : true,
+ "type" : "string"
}
}
}
}
}
},
- "derived_from": "tosca.nodes.Component"
+ "derived_from" : "tosca.nodes.Component"
},
- "component-script-executor": {
- "description": "This is CLI Transaction Configuration Component API",
- "version": "1.0.0",
- "attributes": {
- "response-data": {
- "required": false,
- "type": "json"
+ "component-script-executor" : {
+ "description" : "This is CLI Transaction Configuration Component API",
+ "version" : "1.0.0",
+ "attributes" : {
+ "response-data" : {
+ "required" : false,
+ "type" : "json"
}
},
- "capabilities": {
- "component-node": {
- "type": "tosca.capabilities.Node"
+ "capabilities" : {
+ "component-node" : {
+ "type" : "tosca.capabilities.Node"
}
},
- "interfaces": {
- "ComponentScriptExecutor": {
- "operations": {
- "process": {
- "inputs": {
- "script-type": {
- "description": "Script type, kotlin type is supported",
- "required": true,
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "kotlin",
- "jython",
- "internal"
- ]
- }
- ],
- "default": "internal"
+ "interfaces" : {
+ "ComponentScriptExecutor" : {
+ "operations" : {
+ "process" : {
+ "inputs" : {
+ "script-type" : {
+ "description" : "Script type, kotlin type is supported",
+ "required" : true,
+ "type" : "string",
+ "constraints" : [ {
+ "valid_values" : [ "kotlin", "jython", "internal" ]
+ } ],
+ "default" : "internal"
},
- "script-class-reference": {
- "description": "Kotlin Script class name or jython script name.",
- "required": true,
- "type": "string"
+ "script-class-reference" : {
+ "description" : "Kotlin Script class name or jython script name.",
+ "required" : true,
+ "type" : "string"
},
- "dynamic-properties": {
- "description": "Dynamic Json Content or DSL Json reference.",
- "required": false,
- "type": "json"
+ "instance-dependencies" : {
+ "description" : "Instance names to inject to Jython or Kotlin Script.",
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ },
+ "dynamic-properties" : {
+ "description" : "Dynamic Json Content or DSL Json reference.",
+ "required" : false,
+ "type" : "json"
}
},
- "outputs": {
- "response-data": {
- "description": "Execution Response Data.",
- "required": false,
- "type": "string"
+ "outputs" : {
+ "response-data" : {
+ "description" : "Execution Response Data.",
+ "required" : false,
+ "type" : "string"
},
- "status": {
- "description": "Status of the Component Execution ( success or failure )",
- "required": true,
- "type": "string"
+ "status" : {
+ "description" : "Status of the Component Execution ( success or failure )",
+ "required" : true,
+ "type" : "string"
}
}
}
}
}
},
- "derived_from": "tosca.nodes.Component"
+ "derived_from" : "tosca.nodes.Component"
},
- "dg-generic": {
- "description": "This is Generic Directed Graph Type",
- "version": "1.0.0",
- "properties": {
- "content": {
- "required": true,
- "type": "string"
+ "source-capability" : {
+ "description" : "This is Component Resource Source Node Type",
+ "version" : "1.0.0",
+ "properties" : {
+ "script-type" : {
+ "required" : true,
+ "type" : "string",
+ "constraints" : [ {
+ "valid_values" : [ "kotlin", "internal", "jython" ]
+ } ],
+ "default" : "kotlin"
},
- "dependency-node-templates": {
- "description": "Dependent Step Components NodeTemplate name.",
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
- }
- }
- },
- "derived_from": "tosca.nodes.Workflow"
- },
- "source-capability": {
- "description": "This is Component Resource Source Node Type",
- "version": "1.0.0",
- "properties": {
- "script-type": {
- "required": true,
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "kotlin",
- "internal",
- "jython"
- ]
- }
- ],
- "default": "kotlin"
+ "script-class-reference" : {
+ "description" : "Capability reference name for internal and kotlin, for jython script file path",
+ "required" : true,
+ "type" : "string"
},
- "script-class-reference": {
- "description": "Capability reference name for internal and kotlin, for jython script file path",
- "required": true,
- "type": "string"
- },
- "instance-dependencies": {
- "description": "Instance dependency Names to Inject to Kotlin / Jython Script.",
- "required": false,
- "type": "list",
- "entry_schema": {
- "type": "string"
+ "instance-dependencies" : {
+ "description" : "Instance dependency Names to Inject to Kotlin / Jython Script.",
+ "required" : false,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
}
},
- "key-dependencies": {
- "description": "Resource Resolution dependency dictionary names.",
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
+ "key-dependencies" : {
+ "description" : "Resource Resolution dependency dictionary names.",
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
}
}
},
- "derived_from": "tosca.nodes.ResourceSource"
+ "derived_from" : "tosca.nodes.ResourceSource"
},
- "source-db": {
- "description": "This is Database Resource Source Node Type",
- "version": "1.0.0",
- "properties": {
- "type": {
- "required": true,
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "SQL",
- "PLSQL"
- ]
- }
- ],
- "default": "SQL"
+ "source-db" : {
+ "description" : "This is Database Resource Source Node Type",
+ "version" : "1.0.0",
+ "properties" : {
+ "type" : {
+ "required" : true,
+ "type" : "string",
+ "constraints" : [ {
+ "valid_values" : [ "SQL", "PLSQL" ]
+ } ],
+ "default" : "SQL"
},
- "endpoint-selector": {
- "required": false,
- "type": "string"
+ "endpoint-selector" : {
+ "required" : false,
+ "type" : "string"
},
- "query": {
- "required": true,
- "type": "string"
+ "query" : {
+ "required" : true,
+ "type" : "string"
},
- "input-key-mapping": {
- "required": false,
- "type": "map",
- "entry_schema": {
- "type": "string"
+ "input-key-mapping" : {
+ "required" : false,
+ "type" : "map",
+ "entry_schema" : {
+ "type" : "string"
}
},
- "output-key-mapping": {
- "required": false,
- "type": "map",
- "entry_schema": {
- "type": "string"
+ "output-key-mapping" : {
+ "required" : false,
+ "type" : "map",
+ "entry_schema" : {
+ "type" : "string"
}
},
- "key-dependencies": {
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
+ "key-dependencies" : {
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
}
}
},
- "derived_from": "tosca.nodes.ResourceSource"
+ "derived_from" : "tosca.nodes.ResourceSource"
},
- "source-default": {
- "description": "This is Default Resource Source Node Type",
- "version": "1.0.0",
- "properties": {},
- "derived_from": "tosca.nodes.ResourceSource"
+ "source-default" : {
+ "description" : "This is Default Resource Source Node Type",
+ "version" : "1.0.0",
+ "properties" : { },
+ "derived_from" : "tosca.nodes.ResourceSource"
},
- "source-input": {
- "description": "This is Input Resource Source Node Type",
- "version": "1.0.0",
- "properties": {},
- "derived_from": "tosca.nodes.ResourceSource"
+ "source-input" : {
+ "description" : "This is Input Resource Source Node Type",
+ "version" : "1.0.0",
+ "properties" : { },
+ "derived_from" : "tosca.nodes.ResourceSource"
},
- "source-rest": {
- "description": "This is Rest Resource Source Node Type",
- "version": "1.0.0",
- "properties": {
- "type": {
- "required": true,
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "JSON"
- ]
- }
- ],
- "default": "JSON"
+ "source-rest" : {
+ "description" : "This is Rest Resource Source Node Type",
+ "version" : "1.0.0",
+ "properties" : {
+ "type" : {
+ "required" : true,
+ "type" : "string",
+ "constraints" : [ {
+ "valid_values" : [ "JSON" ]
+ } ],
+ "default" : "JSON"
},
- "headers": {
- "required": false,
- "type": "map",
- "entry_schema": {
- "type": "string"
+ "headers" : {
+ "required" : false,
+ "type" : "map",
+ "entry_schema" : {
+ "type" : "string"
}
},
- "verb": {
- "required": true,
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "GET",
- "POST",
- "DELETE",
- "PUT"
- ]
- }
- ],
- "default": "GET"
+ "verb" : {
+ "required" : true,
+ "type" : "string",
+ "constraints" : [ {
+ "valid_values" : [ "GET", "POST", "DELETE", "PUT" ]
+ } ],
+ "default" : "GET"
},
- "payload": {
- "required": false,
- "type": "string",
- "default": ""
+ "payload" : {
+ "required" : false,
+ "type" : "string",
+ "default" : ""
},
- "endpoint-selector": {
- "required": false,
- "type": "string"
+ "endpoint-selector" : {
+ "required" : false,
+ "type" : "string"
},
- "url-path": {
- "required": true,
- "type": "string"
+ "url-path" : {
+ "required" : true,
+ "type" : "string"
},
- "path": {
- "required": true,
- "type": "string"
+ "path" : {
+ "required" : true,
+ "type" : "string"
},
- "expression-type": {
- "required": false,
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "JSON_PATH",
- "JSON_POINTER"
- ]
- }
- ],
- "default": "JSON_PATH"
+ "expression-type" : {
+ "required" : false,
+ "type" : "string",
+ "constraints" : [ {
+ "valid_values" : [ "JSON_PATH", "JSON_POINTER" ]
+ } ],
+ "default" : "JSON_PATH"
},
- "input-key-mapping": {
- "required": false,
- "type": "map",
- "entry_schema": {
- "type": "string"
+ "input-key-mapping" : {
+ "required" : false,
+ "type" : "map",
+ "entry_schema" : {
+ "type" : "string"
}
},
- "output-key-mapping": {
- "required": false,
- "type": "map",
- "entry_schema": {
- "type": "string"
+ "output-key-mapping" : {
+ "required" : false,
+ "type" : "map",
+ "entry_schema" : {
+ "type" : "string"
}
},
- "key-dependencies": {
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
+ "key-dependencies" : {
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
}
}
},
- "derived_from": "tosca.nodes.ResourceSource"
- },
- "tosca.nodes.Component": {
- "description": "This is default Component Node",
- "version": "1.0.0",
- "derived_from": "tosca.nodes.Root"
+ "derived_from" : "tosca.nodes.ResourceSource"
},
- "tosca.nodes.ResourceSource": {
- "description": "TOSCA base type for Resource Sources",
- "version": "1.0.0",
- "derived_from": "tosca.nodes.Root"
+ "tosca.nodes.Component" : {
+ "description" : "This is default Component Node",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.nodes.Root"
},
- "tosca.nodes.Workflow": {
- "description": "This is Directed Graph Node Type",
- "version": "1.0.0",
- "derived_from": "tosca.nodes.Root"
+ "tosca.nodes.ResourceSource" : {
+ "description" : "TOSCA base type for Resource Sources",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.nodes.Root"
}
}
-}
+}
\ No newline at end of file
{
- "policy_types": {}
-}
+ "policy_types" : { }
+}
\ No newline at end of file
{
- "relationship_types": {}
-}
+ "relationship_types" : { }
+}
\ No newline at end of file
{
- "aic-cloud-region": {
- "tags": "aic-cloud-region",
- "name": "aic-cloud-region",
- "property": {
- "description": "aic-cloud-region",
- "type": "string"
+ "aic-cloud-region" : {
+ "tags" : "aic-cloud-region",
+ "name" : "aic-cloud-region",
+ "property" : {
+ "description" : "aic-cloud-region",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "Singal, Kapil <ks220y@att.com>",
- "sources": {
- "input": {
- "type": "source-input",
- "properties": {}
+ "group" : "default",
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
}
}
},
- "amfName": {
- "tags": "amfName",
- "name": "amfName",
- "property": {
- "description": "amfName",
- "type": "string"
+ "amfName" : {
+ "tags" : "k8s, cnf, profile, amfName",
+ "name" : "amfName",
+ "property" : {
+ "description" : "AMF name",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "Malinconico, Aniello Paolo <aniellopaolo.malinconico@guest.telecomitalia.it>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/amfName",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "amfName": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/amfName",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "amfName" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
}
}
},
- "config.amfName": {
- "tags": "config.amfName",
- "name": "config.amfName",
- "property": {
- "description": "amfName",
- "type": "string"
+ "config.amfName" : {
+ "tags" : "k8s, cnf, profile, config.amfName",
+ "name" : "config.amfName",
+ "property" : {
+ "description" : "AMF Name",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "Malinconico, Aniello Paolo <aniellopaolo.malinconico@guest.telecomitalia.it>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/config.amfName",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "config.amfName": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/config.amfName",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "config.amfName" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
}
}
},
- "config.smfName": {
- "tags": "config.smfName",
- "name": "config.smfName",
- "property": {
- "description": "smfName",
- "type": "string"
+ "config.smfName" : {
+ "tags" : "k8s, cnf, profile, config.smfName",
+ "name" : "config.smfName",
+ "property" : {
+ "description" : "SMF Name",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "Malinconico, Aniello Paolo <aniellopaolo.malinconico@guest.telecomitalia.it>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/config.smfName",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "config.smfName": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/config.smfName",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "config.smfName" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
}
}
},
- "config.supportedNssai.sNssai.snssai": {
- "tags": "config.supportedNssai.sNssai.snssai",
- "name": "config.supportedNssai.sNssai.snssai",
- "property": {
- "description": " supportedNssai.sNssai.snssai params",
- "type": "string"
+ "config.supportedNssai.sNssai.snssai" : {
+ "tags" : "k8s, cnf, profile, config.supportedNssai.sNssai.snssai",
+ "name" : "config.supportedNssai.sNssai.snssai",
+ "property" : {
+ "description" : "snssai value",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "Malinconico, Aniello Paolo <aniellopaolo.malinconico@guest.telecomitalia.it>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/fiveg0_snssai",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "config.supportedNssai.sNssai.snssai": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/fivegc0_snssai",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "config.supportedNssai.sNssai.snssai" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
}
}
},
- "config.test": {
- "tags": "config.test",
- "name": "config.test",
- "property": {
- "description": "Profile name used in multicloud/k8s plugin to identify Helm chart(s) where this mapping is providing override values.",
- "type": "string"
+ "config.test" : {
+ "tags" : "k8s, cnf, profile, config.test",
+ "name" : "config.test",
+ "property" : {
+ "description" : "test",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "Samuli, Silvius <s.silvius@partner.samsung.com>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/config.test",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "config.test": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/config.test",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "config.test" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
}
}
},
- "config.upfName": {
- "tags": "config.upfName",
- "name": "config.upfName",
- "property": {
- "description": "upfName",
- "type": "string"
+ "config.upfName" : {
+ "tags" : "k8s, cnf, profile, config.upfName",
+ "name" : "config.upfName",
+ "property" : {
+ "description" : "test",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "Malinconico, Aniello Paolo <aniellopaolo.malinconico@guest.telecomitalia.it>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/config.upfName",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "config.upfName": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/config.upfName",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "config.upfName" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
}
}
},
- "fiveg0_snssai": {
- "tags": "fiveg0_snssai",
- "name": "fiveg0_snssai",
- "property": {
- "description": "supportedNssai params",
- "type": "string"
+ "k8s-rb-profile-name" : {
+ "tags" : "k8s, cnf, profile, k8s-rb-profile-name",
+ "name" : "k8s-rb-profile-name",
+ "property" : {
+ "description" : "Profile name used in multicloud/k8s plugin to identify Helm chart(s) where this mapping is providing override values.",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "Thamlur Raju <TR00568434@TechMahindra.com>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/fiveg0_snssai",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "fiveg0_snssai": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/k8s-rb-profile-name",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "k8s-rb-profile-name" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
}
}
},
- "k8s-rb-profile-name": {
- "tags": "k8s, cnf, profile, k8s-rb-profile-name",
- "name": "k8s-rb-profile-name",
- "property": {
- "description": "Profile name used in multicloud/k8s plugin to identify Helm chart(s) where this mapping is providing override values.",
- "type": "string"
+ "k8s-rb-profile-namespace" : {
+ "tags" : "k8s, cnf, k8s-rb-profile-namespace",
+ "name" : "k8s-rb-profile-namespace",
+ "property" : {
+ "description" : "Profile name used in multicloud/k8s plugin",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "Samuli, Silvius <s.silvius@partner.samsung.com>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/k8s-rb-profile-name",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "k8s-rb-profile-name": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
+ "group" : "default",
+ "updated-by" : "Lukasz Rajewski <lukasz.rajewski@orange.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/k8s-rb-profile-namespace",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "k8s-rb-profile-namespace" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
}
}
},
- "k8s-rb-profile-namespace": {
- "tags": "k8s, cnf, profile, namespace, k8s-rb-profile-namespace",
- "name": "k8s-rb-profile-namespace",
- "property": {
- "description": "Profile name used in multicloud/k8s plugin",
- "type": "string"
+ "management-prefix-id" : {
+ "tags" : "management-prefix-id",
+ "name" : "management-prefix-id",
+ "property" : {
+ "description" : "management-prefix-id",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "Samuli, Silvius <s.silvius@partner.samsung.com>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/k8s-rb-profile-namespace",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "k8s-rb-profile-namespace": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
- }
- }
- }
- },
- "management-prefix-id": {
- "tags": "management-prefix-id",
- "name": "management-prefix-id",
- "property": {
- "description": "management-prefix-id",
- "type": "string"
- },
- "group": "default",
- "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/management-prefix-id",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "management-prefix-id": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/management-prefix-id",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "management-prefix-id" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
},
- "processor-db": {
- "type": "source-db",
- "properties": {
- "type": "SQL",
- "query": "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"management\"",
- "input-key-mapping": {},
- "output-key-mapping": {
- "management-prefix-id": "prefix_id"
+ "processor-db" : {
+ "type" : "source-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"management\"",
+ "input-key-mapping" : { },
+ "output-key-mapping" : {
+ "management-prefix-id" : "prefix_id"
}
}
}
}
},
- "service-instance-id": {
- "tags": "service-instance-id, tosca.datatypes.Root, data_type",
- "name": "service-instance-id",
- "property": {
- "description": "To be provided",
- "type": "string"
+ "service-instance-id" : {
+ "tags" : "service-instance-id, tosca.datatypes.Root, data_type",
+ "name" : "service-instance-id",
+ "property" : {
+ "description" : "To be provided",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "Singal, Kapil <ks220y@att.com>",
- "sources": {
- "input": {
- "type": "source-input",
- "properties": {}
- },
- "any-db": {
- "type": "source-db",
- "properties": {
- "query": "SELECT artifact_name FROM BLUEPRINT_RUNTIME where artifact_version=\"1.0.0\"",
- "input-key-mapping": {},
- "output-key-mapping": {
- "service-instance-id": "artifact_name"
+ "group" : "default",
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ },
+ "any-db" : {
+ "type" : "source-db",
+ "properties" : {
+ "query" : "SELECT artifact_name FROM BLUEPRINT_MODEL where artifact_version=\"1.0.0\"",
+ "input-key-mapping" : { },
+ "output-key-mapping" : {
+ "service-instance-id" : "artifact_name"
}
}
},
- "processor-db": {
- "type": "source-db",
- "properties": {
- "query": "SELECT artifact_name FROM BLUEPRINT_RUNTIME where artifact_version=\"1.0.0\"",
- "input-key-mapping": {},
- "output-key-mapping": {
- "service-instance-id": "artifact_name"
+ "processor-db" : {
+ "type" : "source-db",
+ "properties" : {
+ "query" : "SELECT artifact_name FROM BLUEPRINT_MODEL where artifact_version=\"1.0.0\"",
+ "input-key-mapping" : { },
+ "output-key-mapping" : {
+ "service-instance-id" : "artifact_name"
}
}
},
- "capability": {
- "type": "source-capability",
- "properties": {
- "script-type": "jython",
- "script-class-reference": "SampleRAProcessor",
- "instance-dependencies": []
+ "capability" : {
+ "type" : "source-capability",
+ "properties" : {
+ "script-type" : "jython",
+ "script-class-reference" : "SampleRAProcessor",
+ "instance-dependencies" : [ ]
}
},
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id",
- "path": "/service/0/service-instance-id",
- "input-key-mapping": {
- "service-instance-id": "service-instance.service-instance-id"
- },
- "output-key-mapping": {
- "service-instance-id": "service-instance-id"
- },
- "key-dependencies": [
- "service-instance.service-instance-id"
- ]
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id",
+ "path" : "/service/0/service-instance-id",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance.service-instance-id"
+ },
+ "output-key-mapping" : {
+ "service-instance-id" : "service-instance-id"
+ },
+ "key-dependencies" : [ "service-instance.service-instance-id" ]
}
}
}
},
- "singletest": {
- "tags": "singletest",
- "name": "singletest",
- "property": {
- "description": "Profile name used in multicloud/k8s plugin to identify Helm chart(s) where this mapping is providing override values.",
- "type": "string"
+ "singletest" : {
+ "tags" : "k8s, cnf, profile, singletest",
+ "name" : "singletest",
+ "property" : {
+ "description" : "test",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "Samuli, Silvius <s.silvius@partner.samsung.com>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/singletest",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "singletest": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/singletest",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "singletest" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
}
}
},
- "smfName": {
- "tags": "smfName",
- "name": "smfName",
- "property": {
- "description": "smfName",
- "type": "string"
+ "smfName" : {
+ "tags" : "k8s, cnf, profile, smfName",
+ "name" : "smfName",
+ "property" : {
+ "description" : "SMF Name",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "Malinconico, Aniello Paolo <aniellopaolo.malinconico@guest.telecomitalia.it>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/smfName",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "smfName": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/smfName",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "smfName" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
}
}
},
- "snssai": {
- "tags": "snssai",
- "name": "snssai",
- "property": {
- "description": "snssai put params",
- "type": "string"
+
+ "supportedNssai" : {
+ "tags" : "k8s, cnf, profile, supportedNssai",
+ "name" : "supportedNssai",
+ "property" : {
+ "description" : "Snssai List",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "Thamlur Raju <TR00568434@TechMahindra.com>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/fiveg0_snssai",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "snssai": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/fivegc0_snssai",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "supportedNssai" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
}
}
},
- "supportedNssai": {
- "tags": "supportedNssai",
- "name": "supportedNssai",
- "property": {
- "description": "supportedNssai params",
- "type": "string"
+ "fivegc0_snssai" : {
+ "tags" : "k8s, cnf, profile, supportedNssai",
+ "name" : "fivegc0_snssai",
+ "property" : {
+ "description" : "snssai input parameter prefixed by <SDC service model name>0_",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "Thamlur Raju <TR00568434@TechMahindra.com>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/supportedNssai",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "supportedNssai": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/fivegc0_snssai",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "fivegc0_snssai" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
}
}
},
- "upfName": {
- "tags": "upfName",
- "name": "upfName",
- "property": {
- "description": "upfName",
- "type": "string"
+ "snssai" : {
+ "tags" : "k8s, cnf, profile, supportedNssai",
+ "name" : "snssai",
+ "property" : {
+ "description" : "snssai",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "Malinconico, Aniello Paolo <aniellopaolo.malinconico@guest.telecomitalia.it>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/upfName",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "upfName": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/fivegc0_snssai",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "snssai" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
}
}
},
- "vf-module-id": {
- "tags": "vf-module-id",
- "name": "vf-module-id",
- "property": {
- "description": "vf-module-id",
- "type": "string"
+
+ "upfName" : {
+ "tags" : "k8s, cnf, profile, upfName",
+ "name" : "upfName",
+ "property" : {
+ "description" : "UPF name",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "Singal, Kapil <ks220y@att.com>",
- "sources": {
- "input": {
- "type": "source-input",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vf-modules/vf-module/$vf-module-id",
- "path": "/vf-module/0/vf-module-id",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id",
- "vf-module-id": "vf-module.vf-module-id"
- },
- "output-key-mapping": {
- "vf-module-id": "vf-module-id"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id",
- "vf-module.vf-module-id"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/upfName",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "upfName" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
}
}
},
- "vf-module-label": {
- "tags": "vf-module-label",
- "name": "vf-module-label",
- "property": {
- "description": "vf-module-label",
- "type": "string"
+ "vf-module-id" : {
+ "tags" : "vf-module-id",
+ "name" : "vf-module-id",
+ "property" : {
+ "description" : "vf-module-id",
+ "type" : "string"
+ },
+ "group" : "default",
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ }
+ }
+ },
+ "vf-module-label" : {
+ "tags" : "vf-module-label",
+ "name" : "vf-module-label",
+ "property" : {
+ "description" : "vf-module-label",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "processor-db": {
- "type": "source-db",
- "properties": {
- "type": "SQL",
- "query": "select sdnctl.VF_MODULE_MODEL.vf_module_label as vf_module_label from sdnctl.VF_MODULE_MODEL where sdnctl.VF_MODULE_MODEL.customization_uuid=:customizationid",
- "input-key-mapping": {
- "customizationid": "vf-module-model-customization-uuid"
- },
- "output-key-mapping": {
- "vf-module-label": "vf_module_label"
- },
- "key-dependencies": [
- "vf-module-model-customization-uuid"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "processor-db" : {
+ "type" : "source-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select sdnctl.VF_MODULE_MODEL.vf_module_label as vf_module_label from sdnctl.VF_MODULE_MODEL where sdnctl.VF_MODULE_MODEL.customization_uuid=:customizationid",
+ "input-key-mapping" : {
+ "customizationid" : "vf-module-model-customization-uuid"
+ },
+ "output-key-mapping" : {
+ "vf-module-label" : "vf_module_label"
+ },
+ "key-dependencies" : [ "vf-module-model-customization-uuid" ]
}
}
}
},
- "vf-module-model-customization-uuid": {
- "tags": "vf-module-model-customization-uuid",
- "name": "vf-module-model-customization-uuid",
- "property": {
- "description": "vf-module-model-customization-uuid",
- "type": "string"
+ "vf-module-model-customization-uuid" : {
+ "tags" : "vf-module-model-customization-uuid",
+ "name" : "vf-module-model-customization-uuid",
+ "property" : {
+ "description" : "vf-module-model-customization-uuid",
+ "type" : "string"
+ },
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ }
+ }
+ },
+ "vf-module-model-invariant-uuid" : {
+ "tags" : "vnf, vf-module, vf-module-model-invariant-uuid",
+ "name" : "vf-module-model-invariant-uuid",
+ "property" : {
+ "description" : "vf-module-model-invariant-uuid",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "processor-db" : {
+ "type" : "source-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select sdnctl.VF_MODULE_MODEL.invariant_uuid as vf_module_model_invariant_uuid from sdnctl.VF_MODULE_MODEL where sdnctl.VF_MODULE_MODEL.customization_uuid=:customizationid",
+ "input-key-mapping" : {
+ "customizationid" : "vf-module-model-customization-uuid"
+ },
+ "output-key-mapping" : {
+ "vf-module-model-invariant-uuid" : "vf_module_model_invariant_uuid"
+ },
+ "key-dependencies" : [ "vf-module-model-customization-uuid" ]
+ }
}
}
},
- "vf-module-model-invariant-uuid": {
- "tags": "vnf, vf-module",
- "name": "vf-module-model-invariant-uuid",
- "property": {
- "description": "vf module model invariant uuid",
- "type": "string"
+ "vf-module-model-version" : {
+ "tags" : "vnf, vf-module, vf-module-model-version",
+ "name" : "vf-module-model-version",
+ "property" : {
+ "description" : "vf-module-model-version",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "Samuli, Silvius <s.silvius@partner.samsung.com>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "processor-db": {
- "type": "source-db",
- "properties": {
- "type": "SQL",
- "query": "select sdnctl.VF_MODULE_MODEL.invariant_uuid as vf_module_model_invariant_uuid from sdnctl.VF_MODULE_MODEL where sdnctl.VF_MODULE_MODEL.customization_uuid=:customizationid",
- "input-key-mapping": {
- "customizationid": "vf-module-model-customization-uuid"
- },
- "output-key-mapping": {
- "vf-module-model-invariant-uuid": "vf_module_model_invariant_uuid"
- },
- "key-dependencies": [
- "vf-module-model-customization-uuid"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "processor-db" : {
+ "type" : "source-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select sdnctl.VF_MODULE_MODEL.uuid as vf_module_model_version from sdnctl.VF_MODULE_MODEL where sdnctl.VF_MODULE_MODEL.customization_uuid=:customizationid",
+ "input-key-mapping" : {
+ "customizationid" : "vf-module-model-customization-uuid"
+ },
+ "output-key-mapping" : {
+ "vf-module-model-version" : "vf_module_model_version"
+ },
+ "key-dependencies" : [ "vf-module-model-customization-uuid" ]
}
}
}
},
- "vf-module-model-version": {
- "tags": "vnf, vf-module",
- "name": "vf-module-model-version",
- "property": {
- "description": "vf module model model version",
- "type": "string"
+ "vf-modules-list" : {
+ "tags" : "vf-modules-list",
+ "name" : "vf-modules-list",
+ "property" : {
+ "description" : "List of vf-modules associated with vnf",
+ "type" : "json"
},
- "group": "default",
- "updated-by": "Samuli, Silvius <s.silvius@partner.samsung.com>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "processor-db": {
- "type": "source-db",
- "properties": {
- "type": "SQL",
- "query": "select sdnctl.VF_MODULE_MODEL.uuid as vf_module_model_version from sdnctl.VF_MODULE_MODEL where sdnctl.VF_MODULE_MODEL.customization_uuid=:customizationid",
- "input-key-mapping": {
- "customizationid": "vf-module-model-customization-uuid"
- },
- "output-key-mapping": {
- "vf-module-model-version": "vf_module_model_version"
- },
- "key-dependencies": [
- "vf-module-model-customization-uuid"
- ]
+ "group" : "default",
+ "updated-by" : "Lukasz Rajewski <lukasz.rajewski@orange.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "aai-data" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/aai/v19/network/generic-vnfs/generic-vnf/${vnf-id}?depth=1",
+ "path" : "/vf-modules",
+ "input-key-mapping" : {
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "vf-modules" : "vf-module"
+ },
+ "key-dependencies" : [ "vnf-id" ]
+ }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vf-modules",
+ "path" : "/vf-modules",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "vf-modules" : "vf-module"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
}
}
},
- "vf-naming-policy": {
- "tags": "vf-naming-policy",
- "name": "vf-naming-policy",
- "property": {
- "description": "vf-naming-policy",
- "type": "string"
+ "vf-naming-policy" : {
+ "tags" : "vf-naming-policy",
+ "name" : "vf-naming-policy",
+ "property" : {
+ "description" : "vf-naming-policy",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
- "sources": {
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vf-naming-policy",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "vf-naming-policy": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vf-naming-policy",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "vf-naming-policy" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
},
- "processor-db": {
- "type": "source-db",
- "properties": {
- "type": "SQL",
- "query": "select sdnctl.VF_MODEL.naming_policy as vf_naming_policy from sdnctl.VF_MODEL where sdnctl.VF_MODEL.customization_uuid=:vnf_model_customization_uuid",
- "input-key-mapping": {
- "vnf_model_customization_uuid": "vnf-model-customization-uuid"
+ "processor-db" : {
+ "type" : "source-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select sdnctl.VF_MODEL.naming_policy as vf_naming_policy from sdnctl.VF_MODEL where sdnctl.VF_MODEL.customization_uuid=:vnf_model_customization_uuid",
+ "input-key-mapping" : {
+ "vnf_model_customization_uuid" : "vnf-model-customization-uuid"
},
- "output-key-mapping": {
- "vf-naming-policy": "vf_naming_policy"
+ "output-key-mapping" : {
+ "vf-naming-policy" : "vf_naming_policy"
},
- "key-dependencies": [
- "vnf-model-customization-uuid"
- ]
+ "key-dependencies" : [ "vnf-model-customization-uuid" ]
}
}
}
},
- "vnf-id": {
- "tags": "vnf-id",
- "name": "vnf-id",
- "property": {
- "description": "vnf-id",
- "type": "string"
+ "vnf-id" : {
+ "tags" : "vnf-id",
+ "name" : "vnf-id",
+ "property" : {
+ "description" : "vnf-id",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf-id",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "vnf-id": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf-id",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "vnf-id" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
}
}
},
- "vnf_name": {
- "tags": "vnf_name",
- "name": "vnf_name",
- "property": {
- "description": "vnf_name",
- "type": "string"
+ "vnf_name" : {
+ "tags" : "vnf_name",
+ "name" : "vnf_name",
+ "property" : {
+ "description" : "vnf_name",
+ "type" : "string"
},
- "group": "default",
- "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
- "sources": {
- "input": {
- "type": "source-input"
- },
- "default": {
- "type": "source-default",
- "properties": {}
- },
- "sdnc": {
- "type": "source-rest",
- "properties": {
- "verb": "GET",
- "type": "JSON",
- "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf_name",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "vnf_name": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
+ "group" : "default",
+ "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "sdnc" : {
+ "type" : "source-rest",
+ "properties" : {
+ "verb" : "GET",
+ "type" : "JSON",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf_name",
+ "path" : "/param/0/value",
+ "headers" : {
+ "Accept" : "application/json",
+ "Content-Type" : "application/json"
+ },
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "vnf_name" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
+ }
+ },
+ "rest" : {
+ "type" : "source-rest",
+ "properties" : {
+ "endpoint-selector" : "naming-resolution",
+ "verb" : "POST",
+ "type" : "JSON",
+ "headers" : {
+ "Accept" : "application/json",
+ "Content-Type" : "application/json"
+ },
+ "url-path" : "/v1/genNetworkElementName",
+ "payload" : "{\r\n \"elements\": [\r\n {\r\n \"resource-name\": \"vnf_name\",\r\n \"resource-value\": \"${vnf_name}\",\r\n \"external-key\": \"${vnf-id}\",\r\n \"policy-instance-name\": \"${vf-naming-policy}\",\r\n \"naming-type\": \"VNF\",\r\n \"AIC_CLOUD_REGION\": \"${aic-cloud-region}\"\r\n }\r\n ]\r\n}",
+ "path" : "/elements/0/resource-value",
+ "input-key-mapping" : {
+ "vnf-id" : "vnf-id",
+ "aic-cloud-region" : "aic-cloud-region",
+ "vf-naming-policy" : "vf-naming-policy"
+ },
+ "output-key-mapping" : {
+ "vnf_name" : "resource-value"
+ },
+ "key-dependencies" : [ "vnf-id", "aic-cloud-region", "vf-naming-policy" ]
}
}
}
}
-}
+}
\ No newline at end of file
--- /dev/null
+default.ip=10.212.1.154\r
+default.port=30667\r
+default.protocal=http\r
-/*
-* Copyright © 2019 TechMahindra
-*
-* 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.cds.blueprintsprocessor.services.execution.scripts
-
-import com.fasterxml.jackson.annotation.JsonIgnore
-import com.fasterxml.jackson.annotation.JsonProperty
-import com.fasterxml.jackson.databind.ObjectMapper
-import com.fasterxml.jackson.databind.node.ObjectNode
-import com.fasterxml.jackson.databind.JsonNode
-import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
-import java.io.File
-import java.nio.file.Path
-import java.nio.file.Paths
-import org.apache.commons.io.FilenameUtils
-import org.apache.commons.io.IOUtils
-import org.apache.http.client.ClientProtocolException
-import org.apache.http.client.entity.EntityBuilder
-import org.apache.http.client.methods.HttpPost
-import org.apache.http.client.methods.HttpUriRequest
-import org.apache.http.entity.ContentType
-import org.apache.http.message.BasicHeader
-import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.BasicAuthRestClientProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BasicAuthRestClientService
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.definition.K8sPluginDefinitionApi
-import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.K8sConnectionPluginConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.definition.K8sDefinitionRestClient
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.RestLoggerService
-import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
-import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.contentFromResolvedArtifactNB
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.ArchiveType
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.storedContentFromResolvedArtifactNB
-import org.slf4j.LoggerFactory
-import org.springframework.http.HttpHeaders
-import org.springframework.http.HttpMethod
-import org.springframework.http.MediaType
-import org.springframework.web.client.RestTemplate
-import org.yaml.snakeyaml.Yaml
-import java.util.ArrayList
-import java.io.IOException
-
-import java.util.Base64
-import java.nio.charset.Charset
-import java.nio.file.Files
-import com.google.gson.Gson
-import com.google.gson.reflect.TypeToken
-
-open class DayOneConfig : AbstractScriptComponentFunction() {
-
- private val log = LoggerFactory.getLogger(DayOneConfig::class.java)!!
-
- override fun getName(): String {
- return "DayOneConfig"
- }
-
- override suspend fun processNB(executionRequest: ExecutionServiceInput) {
- log.info("DAY-1 Script excution Started")
-
- val prefix = "baseconfig"
-
- val baseK8sApiUrl = getDynamicProperties("api-access").get("url").asText()
- val k8sApiUsername = getDynamicProperties("api-access").get("username").asText()
- val k8sApiPassword = getDynamicProperties("api-access").get("password").asText()
-
- log.info("Multi-cloud params $baseK8sApiUrl")
-
- val aaiApiUrl = getDynamicProperties("aai-access").get("url").asText()
- val aaiApiUsername = getDynamicProperties("aai-access").get("username").asText()
- val aaiApiPassword = getDynamicProperties("aai-access").get("password").asText()
-
-
-
- log.info("AAI params $aaiApiUrl")
-
-
-
-
- val resolution_key = getDynamicProperties("resolution-key").asText()
-
- val sdnc_payload:String = contentFromResolvedArtifactNB("config-deploy-sdnc")
- //log.info("SDNC payload $sdnc_payload")
- val sdnc_payloadObject = JacksonUtils.jsonNode(sdnc_payload) as ObjectNode
-
-
- val aai_payload:String = contentFromResolvedArtifactNB("config-deploy-aai")
- //log.info("AAI payload $aai_payload")
- val aai_payloadObject = JacksonUtils.jsonNode(aai_payload) as ObjectNode
-
-
-
-
-
-
- try {
-
- for (item in sdnc_payloadObject.get("vf-modules")){
-
- var instanceID:String =""
- val modelTopology = item.get("vf-module-data").get("vf-module-topology")
-
-
-
- val moduleParameters = modelTopology.get("vf-module-parameters").get("param")
-
- val label: String? = getParamValueByName(moduleParameters, "vf-module-label")
- val modelInfo = modelTopology.get("onap-model-information")
- val vfModuleInvariantID = modelInfo.get("model-invariant-uuid").asText()
- log.info("VF MOdule Inavriant ID $vfModuleInvariantID")
- val vfModuleCustID=modelInfo.get("model-customization-uuid").asText()
- val vfModuleUUID=modelInfo.get("model-uuid").asText()
- val idInfo = modelTopology.get("vf-module-topology-identifier")
- val vfModuleID = idInfo.get("vf-module-id").asText()
- for (aai_item in aai_payloadObject.get("vf-modules"))
- {
- if (aai_item.get("vf-module-id").asText() == vfModuleID && aai_item.get("heat-stack-id") != null)
- {
- instanceID=aai_item.get("heat-stack-id").asText()
- break
- }
- }
-
-
-
- val k8sRbProfileName: String = "profile_" + vfModuleID
-
- val k8sConfigTemplateName: String = "template_" + vfModuleCustID
-
- val api = K8sConfigTemplateApi(k8sApiUsername, k8sApiPassword, baseK8sApiUrl, vfModuleInvariantID, vfModuleCustID, k8sConfigTemplateName)
-
- // Check if definition exists
- if (!api.hasDefinition()) {
- throw BluePrintProcessorException("K8S Definition ($vfModuleInvariantID/$vfModuleCustID) not found ")
- }
- val bluePrintPropertiesService: BluePrintPropertiesService =this.functionDependencyInstanceAsType("bluePrintPropertiesService")
- val k8sConfiguration = K8sConnectionPluginConfiguration(bluePrintPropertiesService)
- val rbDefinitionService = K8sDefinitionRestClient(k8sConfiguration,vfModuleInvariantID, vfModuleCustID)
-
-
- val def: BlueprintWebClientService.WebClientResponse<String> = rbDefinitionService.exchangeResource(HttpMethod.GET.name,"","")
- log.info(def.body.toString())
- val rbdef = JacksonUtils.jsonNode(def.body.toString()) as ObjectNode
- val chartName = rbdef.get("chart-name").asText()
-
- log.info("Config Template name: $k8sConfigTemplateName")
-
-
-
- var configTemplate = K8sConfigTemplate()
- configTemplate.templateName = k8sConfigTemplateName
- configTemplate.description = " "
- configTemplate.ChartName = chartName
- log.info("Chart name: ${configTemplate.ChartName}")
-
-
-
- if (!api.hasConfigTemplate(configTemplate)) {
-
-
- val configTemplateFile: Path = prepareConfigTemplateJson(k8sConfigTemplateName, vfModuleID, label)
-
- log.info("Config Template Upload Started")
- api.createConfigTemplate(configTemplate)
- api.uploadConfigTemplateContent(configTemplate, configTemplateFile)
- log.info("Config Template Upload Completed")
- }
- }
- log.info("DAY-1 Script excution completed")
-
-
- }
- catch (e: Exception) {
- log.info("Caught exception during config template preparation!!")
- throw BluePrintProcessorException("${e.message}")
- }
- }
- private fun getParamValueByName(params: JsonNode, paramName: String): String? {
- for (param in params) {
- if (param.get("name").asText() == paramName && param.get("value").asText() != "null") {
- return param.get("value").asText()
-
- }
- }
- return null
- }
-
- fun prepareConfigTemplateJson(configTemplateName: String, vfModuleID: String, label: String?): Path {
- val bluePrintContext = bluePrintRuntimeService.bluePrintContext()
- val bluePrintBasePath: String = bluePrintContext.rootPath
-
- var profileFilePath: Path = Paths.get(bluePrintBasePath.plus(File.separator).plus("Templates").plus(File.separator).plus("k8s-profiles").plus(File.separator).plus(label +"-config-template.tar.gz"))
- log.info("Reading K8s Config Template file: $profileFilePath")
-
- val profileFile = profileFilePath.toFile()
-
- if (!profileFile.exists())
- throw BluePrintProcessorException("K8s Config template file $profileFilePath does not exists")
-
- return profileFilePath
- }
-
-
- fun getResolvedParameter(payload: ObjectNode, keyName: String): String {
- for (node in payload.get("resource-accumulator-resolved-data").elements()) {
- if (node.get("param-name").asText().equals(keyName)) {
- return node.get("param-value").asText()
- }
- }
- return ""
- }
- override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
- log.info("Recover function called!")
- log.info("Execution request : $executionRequest")
- log.error("Exception", runtimeException)
- addError(runtimeException.message!!)
- }
-
-
-
- inner class K8sConfigTemplateApi(
- val username: String,
- val password: String,
- val baseUrl: String,
- val definition: String,
- val definitionVersion: String,
- val configTemplateName: String
- ) {
- private val service: UploadConfigTemplateRestClientService // BasicAuthRestClientService
-
- init {
- var mapOfHeaders = hashMapOf<String, String>()
- mapOfHeaders.put("Accept", "application/json")
- mapOfHeaders.put("Content-Type", "application/json")
- mapOfHeaders.put("cache-control", " no-cache")
- mapOfHeaders.put("Accept", "application/json")
- var basicAuthRestClientProperties: BasicAuthRestClientProperties = BasicAuthRestClientProperties()
- basicAuthRestClientProperties.username = username
- basicAuthRestClientProperties.password = password
- basicAuthRestClientProperties.url = "$baseUrl/v1/rb/definition/$definition/$definitionVersion"
- basicAuthRestClientProperties.additionalHeaders = mapOfHeaders
-
- this.service = UploadConfigTemplateRestClientService(basicAuthRestClientProperties)
- }
-
- fun hasDefinition(): Boolean {
- try {
- val result: BlueprintWebClientService.WebClientResponse<String> = service.exchangeResource(HttpMethod.GET.name, "", "")
- print(result)
- if (result.status >= 200 && result.status < 300)
- return true
- else
- return false
- } catch (e: Exception) {
- log.info("Caught exception trying to get k8s config trmplate definition")
- throw BluePrintProcessorException("${e.message}")
- }
- }
-
- fun hasConfigTemplate(profile: K8sConfigTemplate): Boolean {
- try {
- val result: BlueprintWebClientService.WebClientResponse<String> = service.exchangeResource(HttpMethod.GET.name, "/config-template/${profile.templateName}", "")
- print(result)
- if (result.status >= 200 && result.status < 300) {
- log.info("ConfigTemplate already exists")
- return true
- } else
- return false
- } catch (e: Exception) {
- log.info("Caught exception trying to get k8s config trmplate definition")
- throw BluePrintProcessorException("${e.message}")
- }
- }
-
- fun createConfigTemplate(profile: K8sConfigTemplate) {
- val objectMapper = ObjectMapper()
- val profileJsonString: String = objectMapper.writeValueAsString(profile)
- try {
- val result: BlueprintWebClientService.WebClientResponse<String> = service.exchangeResource(
- HttpMethod.POST.name,
- "/config-template",
- profileJsonString
- )
-
- if (result.status >= 200 && result.status < 300) {
- log.info("Config template json info uploaded correctly")
- } else if (result.status < 200 || result.status >= 300) {
- log.info("Config template already exists")
- }
- } catch (e: Exception) {
- log.info("Caught exception trying to create k8s config template ${profile.templateName} - updated")
- // throw BluePrintProcessorException("${e.message}")
- }
- }
-
- fun uploadConfigTemplateContent(profile: K8sConfigTemplate, filePath: Path) {
- try {
- val result: BlueprintWebClientService.WebClientResponse<String> = service.uploadBinaryFile(
- "/config-template/${profile.templateName}/content",
- filePath
- )
- if (result.status < 200 || result.status >= 300) {
- throw Exception(result.body)
- }
- } catch (e: Exception) {
- log.info("Caught exception trying to upload k8s config template ${profile.templateName}")
- throw BluePrintProcessorException("${e.message}")
- }
- }
- }
-}
-
-class UploadConfigTemplateRestClientService(
- private val restClientProperties:
- BasicAuthRestClientProperties
-) : BlueprintWebClientService {
-
- override fun defaultHeaders(): Map<String, String> {
-
- val encodedCredentials = setBasicAuth(
- restClientProperties.username,
- restClientProperties.password
- )
- return mapOf(
- HttpHeaders.CONTENT_TYPE to MediaType.APPLICATION_JSON_VALUE,
- HttpHeaders.ACCEPT to MediaType.APPLICATION_JSON_VALUE,
- HttpHeaders.AUTHORIZATION to "Basic $encodedCredentials"
- )
- }
-
- override fun host(uri: String): String {
- return restClientProperties.url + uri
- }
-
- override fun convertToBasicHeaders(headers: Map<String, String>):
- Array<BasicHeader> {
- val customHeaders: MutableMap<String, String> = headers.toMutableMap()
- // inject additionalHeaders
- customHeaders.putAll(verifyAdditionalHeaders(restClientProperties))
-
- if (!headers.containsKey(HttpHeaders.AUTHORIZATION)) {
- val encodedCredentials = setBasicAuth(
- restClientProperties.username,
- restClientProperties.password
- )
- customHeaders[HttpHeaders.AUTHORIZATION] =
- "Basic $encodedCredentials"
- }
- return super.convertToBasicHeaders(customHeaders)
- }
-
- private fun setBasicAuth(username: String, password: String): String {
- val credentialsString = "$username:$password"
- return Base64.getEncoder().encodeToString(
- credentialsString.toByteArray(Charset.defaultCharset())
- )
- }
-
- @Throws(IOException::class, ClientProtocolException::class)
- private fun performHttpCall(httpUriRequest: HttpUriRequest): BlueprintWebClientService.WebClientResponse<String> {
- val httpResponse = httpClient().execute(httpUriRequest)
- val statusCode = httpResponse.statusLine.statusCode
- httpResponse.entity.content.use {
- val body = IOUtils.toString(it, Charset.defaultCharset())
- return BlueprintWebClientService.WebClientResponse(statusCode, body)
- }
- }
-
- fun uploadBinaryFile(path: String, filePath: Path): BlueprintWebClientService.WebClientResponse<String> {
- val convertedHeaders: Array<BasicHeader> = convertToBasicHeaders(defaultHeaders())
- val httpPost = HttpPost(host(path))
- val entity = EntityBuilder.create().setBinary(Files.readAllBytes(filePath)).build()
- httpPost.setEntity(entity)
- RestLoggerService.httpInvoking(convertedHeaders)
- httpPost.setHeaders(convertedHeaders)
- return performHttpCall(httpPost)
- }
-}
-
-class K8sConfigTemplate {
- @get:JsonProperty("template-name")
- var templateName: String? = null
- @get:JsonProperty("description")
- var description: String? = null
- @get:JsonProperty("ChartName")
- var ChartName: String? = null
-
- override fun equals(other: Any?): Boolean {
- if (this === other) return true
- if (javaClass != other?.javaClass) return false
- return true
- }
-
- override fun hashCode(): Int {
- return javaClass.hashCode()
- }
-}
-
-class K8sResources {
-
- var GVK: GVK? = null
- lateinit var Name: String
-
-}
-
-class GVK {
-
- var Group: String? = null
- var Version: String? = null
- var Kind: String? = null
-
-}
-
-fun main(args: Array<String>) {
-
- val kotlin = DayOneConfig()
-
-
-
-}
+/*\r
+* Copyright © 2019 TechMahindra\r
+*\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*/\r
+\r
+package org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts\r
+\r
+import com.fasterxml.jackson.annotation.JsonIgnore\r
+import com.fasterxml.jackson.annotation.JsonProperty\r
+import com.fasterxml.jackson.databind.ObjectMapper\r
+import com.fasterxml.jackson.databind.node.ObjectNode\r
+import com.fasterxml.jackson.databind.JsonNode\r
+import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper\r
+import java.io.File\r
+import java.nio.file.Path\r
+import java.nio.file.Paths\r
+import org.apache.commons.io.FilenameUtils\r
+import org.apache.commons.io.IOUtils\r
+import org.apache.http.client.ClientProtocolException\r
+import org.apache.http.client.entity.EntityBuilder\r
+import org.apache.http.client.methods.HttpPost\r
+import org.apache.http.client.methods.HttpUriRequest\r
+import org.apache.http.entity.ContentType\r
+import org.apache.http.message.BasicHeader\r
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput\r
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.BasicAuthRestClientProperties\r
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties\r
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BasicAuthRestClientService\r
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService\r
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService\r
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.definition.K8sPluginDefinitionApi\r
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.K8sConnectionPluginConfiguration\r
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.definition.K8sDefinitionRestClient\r
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.RestLoggerService\r
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction\r
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.contentFromResolvedArtifactNB\r
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException\r
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.ArchiveType\r
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils\r
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils\r
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.storedContentFromResolvedArtifactNB\r
+import org.slf4j.LoggerFactory\r
+import org.springframework.http.HttpHeaders\r
+import org.springframework.http.HttpMethod\r
+import org.springframework.http.MediaType\r
+import org.springframework.web.client.RestTemplate\r
+import org.yaml.snakeyaml.Yaml\r
+import java.util.ArrayList\r
+import java.io.IOException\r
+\r
+import java.util.Base64\r
+import java.nio.charset.Charset\r
+import java.nio.file.Files\r
+import com.google.gson.Gson\r
+import com.google.gson.reflect.TypeToken\r
+\r
+open class DayOneConfig : AbstractScriptComponentFunction() {\r
+\r
+ private val log = LoggerFactory.getLogger(DayOneConfig::class.java)!!\r
+\r
+ override fun getName(): String {\r
+ return "DayOneConfig"\r
+ }\r
+\r
+ override suspend fun processNB(executionRequest: ExecutionServiceInput) {\r
+ log.info("DAY-1 Script excution Started")\r
+\r
+ val prefix = "baseconfig"\r
+\r
+ val baseK8sApiUrl = getDynamicProperties("api-access").get("url").asText()\r
+ val k8sApiUsername = getDynamicProperties("api-access").get("username").asText()\r
+ val k8sApiPassword = getDynamicProperties("api-access").get("password").asText()\r
+\r
+ log.info("Multi-cloud params $baseK8sApiUrl")\r
+\r
+ val aaiApiUrl = getDynamicProperties("aai-access").get("url").asText()\r
+ val aaiApiUsername = getDynamicProperties("aai-access").get("username").asText()\r
+ val aaiApiPassword = getDynamicProperties("aai-access").get("password").asText()\r
+\r
+\r
+ \r
+ log.info("AAI params $aaiApiUrl")\r
+\r
+\r
+ \r
+\r
+ val resolution_key = getDynamicProperties("resolution-key").asText()\r
+\r
+ val sdnc_payload:String = contentFromResolvedArtifactNB("config-deploy-sdnc")\r
+ //log.info("SDNC payload $sdnc_payload")\r
+val sdnc_payloadObject = JacksonUtils.jsonNode(sdnc_payload) as ObjectNode\r
+\r
+\r
+ val aai_payload:String = contentFromResolvedArtifactNB("config-deploy-aai")\r
+ //log.info("AAI payload $aai_payload")\r
+val aai_payloadObject = JacksonUtils.jsonNode(aai_payload) as ObjectNode\r
+\r
+\r
+\r
+ \r
+ \r
+ \r
+ try {\r
+ \r
+ for (item in sdnc_payloadObject.get("vf-modules")){\r
+ \r
+ var instanceID:String =""\r
+ val modelTopology = item.get("vf-module-data").get("vf-module-topology")\r
+ \r
+ \r
+ \r
+ val moduleParameters = modelTopology.get("vf-module-parameters").get("param")\r
+ \r
+ val label: String? = getParamValueByName(moduleParameters, "vf-module-label")\r
+ val modelInfo = modelTopology.get("onap-model-information")\r
+ val vfModuleInvariantID = modelInfo.get("model-invariant-uuid").asText()\r
+ log.info("VF MOdule Inavriant ID $vfModuleInvariantID")\r
+ val vfModuleCustID=modelInfo.get("model-customization-uuid").asText()\r
+ val vfModuleUUID=modelInfo.get("model-uuid").asText()\r
+ val idInfo = modelTopology.get("vf-module-topology-identifier")\r
+ val vfModuleID = idInfo.get("vf-module-id").asText()\r
+ for (aai_item in aai_payloadObject.get("vf-modules")) \r
+ {\r
+ if (aai_item.get("vf-module-id").asText() == vfModuleID && aai_item.get("heat-stack-id") != null) \r
+ {\r
+ instanceID=aai_item.get("heat-stack-id").asText()\r
+ break \r
+ }\r
+ }\r
+ \r
+\r
+\r
+ val k8sRbProfileName: String = "profile_" + vfModuleID\r
+\r
+ val k8sConfigTemplateName: String = "template_" + vfModuleCustID \r
+\r
+ val api = K8sConfigTemplateApi(k8sApiUsername, k8sApiPassword, baseK8sApiUrl, vfModuleInvariantID, vfModuleCustID, k8sConfigTemplateName)\r
+\r
+ // Check if definition exists\r
+ if (!api.hasDefinition()) {\r
+ throw BluePrintProcessorException("K8S Definition ($vfModuleInvariantID/$vfModuleCustID) not found ")\r
+ }\r
+ val bluePrintPropertiesService: BluePrintPropertiesService =this.functionDependencyInstanceAsType("bluePrintPropertiesService")\r
+ val k8sConfiguration = K8sConnectionPluginConfiguration(bluePrintPropertiesService)\r
+ val rbDefinitionService = K8sDefinitionRestClient(k8sConfiguration,vfModuleInvariantID, vfModuleCustID)\r
+ \r
+ \r
+ val def: BlueprintWebClientService.WebClientResponse<String> = rbDefinitionService.exchangeResource(HttpMethod.GET.name,"","")\r
+ log.info(def.body.toString())\r
+ val rbdef = JacksonUtils.jsonNode(def.body.toString()) as ObjectNode\r
+ val chartName = rbdef.get("chart-name").asText()\r
+\r
+ log.info("Config Template name: $k8sConfigTemplateName")\r
+\r
+ \r
+ \r
+ var configTemplate = K8sConfigTemplate()\r
+ configTemplate.templateName = k8sConfigTemplateName\r
+ configTemplate.description = " "\r
+ configTemplate.ChartName = chartName\r
+ log.info("Chart name: ${configTemplate.ChartName}")\r
+\r
+ \r
+\r
+ if (!api.hasConfigTemplate(configTemplate)) {\r
+ \r
+\r
+ val configTemplateFile: Path = prepareConfigTemplateJson(k8sConfigTemplateName, vfModuleID, label)\r
+\r
+ log.info("Config Template Upload Started")\r
+ api.createConfigTemplate(configTemplate)\r
+ api.uploadConfigTemplateContent(configTemplate, configTemplateFile)\r
+ log.info("Config Template Upload Completed")\r
+ }\r
+ }\r
+ log.info("DAY-1 Script excution completed")\r
+ \r
+ \r
+ }\r
+ catch (e: Exception) {\r
+ log.info("Caught exception during config template preparation!!")\r
+ throw BluePrintProcessorException("${e.message}")\r
+ }\r
+ }\r
+ private fun getParamValueByName(params: JsonNode, paramName: String): String? {\r
+ for (param in params) {\r
+ if (param.get("name").asText() == paramName && param.get("value").asText() != "null") {\r
+ return param.get("value").asText()\r
+ \r
+ }\r
+ }\r
+ return null\r
+ }\r
+\r
+ fun prepareConfigTemplateJson(configTemplateName: String, vfModuleID: String, label: String?): Path {\r
+ val bluePrintContext = bluePrintRuntimeService.bluePrintContext()\r
+ val bluePrintBasePath: String = bluePrintContext.rootPath\r
+\r
+ var profileFilePath: Path = Paths.get(bluePrintBasePath.plus(File.separator).plus("Templates").plus(File.separator).plus("k8s-profiles").plus(File.separator).plus(label +"-config-template.tar.gz"))\r
+ log.info("Reading K8s Config Template file: $profileFilePath")\r
+\r
+ val profileFile = profileFilePath.toFile()\r
+\r
+ if (!profileFile.exists())\r
+ throw BluePrintProcessorException("K8s Config template file $profileFilePath does not exists")\r
+\r
+ return profileFilePath\r
+ }\r
+ \r
+\r
+ fun getResolvedParameter(payload: ObjectNode, keyName: String): String {\r
+ for (node in payload.get("resource-accumulator-resolved-data").elements()) {\r
+ if (node.get("param-name").asText().equals(keyName)) {\r
+ return node.get("param-value").asText()\r
+ }\r
+ }\r
+ return ""\r
+ }\r
+ override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {\r
+ log.info("Recover function called!")\r
+ log.info("Execution request : $executionRequest")\r
+ log.error("Exception", runtimeException)\r
+ addError(runtimeException.message!!)\r
+ }\r
+\r
+\r
+\r
+ inner class K8sConfigTemplateApi(\r
+ val username: String,\r
+ val password: String,\r
+ val baseUrl: String,\r
+ val definition: String,\r
+ val definitionVersion: String,\r
+ val configTemplateName: String\r
+ ) {\r
+ private val service: UploadConfigTemplateRestClientService // BasicAuthRestClientService\r
+\r
+ init {\r
+ var mapOfHeaders = hashMapOf<String, String>()\r
+ mapOfHeaders.put("Accept", "application/json")\r
+ mapOfHeaders.put("Content-Type", "application/json")\r
+ mapOfHeaders.put("cache-control", " no-cache")\r
+ mapOfHeaders.put("Accept", "application/json")\r
+ var basicAuthRestClientProperties: BasicAuthRestClientProperties = BasicAuthRestClientProperties()\r
+ basicAuthRestClientProperties.username = username\r
+ basicAuthRestClientProperties.password = password\r
+ basicAuthRestClientProperties.url = "$baseUrl/v1/rb/definition/$definition/$definitionVersion"\r
+ basicAuthRestClientProperties.additionalHeaders = mapOfHeaders\r
+\r
+ this.service = UploadConfigTemplateRestClientService(basicAuthRestClientProperties)\r
+ }\r
+\r
+ fun hasDefinition(): Boolean {\r
+ try {\r
+ val result: BlueprintWebClientService.WebClientResponse<String> = service.exchangeResource(HttpMethod.GET.name, "", "")\r
+ print(result)\r
+ if (result.status >= 200 && result.status < 300)\r
+ return true\r
+ else\r
+ return false\r
+ } catch (e: Exception) {\r
+ log.info("Caught exception trying to get k8s config trmplate definition")\r
+ throw BluePrintProcessorException("${e.message}")\r
+ }\r
+ }\r
+\r
+ fun hasConfigTemplate(profile: K8sConfigTemplate): Boolean {\r
+ try {\r
+ val result: BlueprintWebClientService.WebClientResponse<String> = service.exchangeResource(HttpMethod.GET.name, "/config-template/${profile.templateName}", "")\r
+ print(result)\r
+ if (result.status >= 200 && result.status < 300) {\r
+ log.info("ConfigTemplate already exists")\r
+ return true\r
+ } else\r
+ return false\r
+ } catch (e: Exception) {\r
+ log.info("Caught exception trying to get k8s config trmplate definition")\r
+ throw BluePrintProcessorException("${e.message}")\r
+ }\r
+ }\r
+\r
+ fun createConfigTemplate(profile: K8sConfigTemplate) {\r
+ val objectMapper = ObjectMapper()\r
+ val profileJsonString: String = objectMapper.writeValueAsString(profile)\r
+ try {\r
+ val result: BlueprintWebClientService.WebClientResponse<String> = service.exchangeResource(\r
+ HttpMethod.POST.name,\r
+ "/config-template",\r
+ profileJsonString\r
+ )\r
+\r
+ if (result.status >= 200 && result.status < 300) {\r
+ log.info("Config template json info uploaded correctly")\r
+ } else if (result.status < 200 || result.status >= 300) {\r
+ log.info("Config template already exists")\r
+ }\r
+ } catch (e: Exception) {\r
+ log.info("Caught exception trying to create k8s config template ${profile.templateName} - updated")\r
+ // throw BluePrintProcessorException("${e.message}")\r
+ }\r
+ }\r
+\r
+ fun uploadConfigTemplateContent(profile: K8sConfigTemplate, filePath: Path) {\r
+ try {\r
+ val result: BlueprintWebClientService.WebClientResponse<String> = service.uploadBinaryFile(\r
+ "/config-template/${profile.templateName}/content",\r
+ filePath\r
+ )\r
+ if (result.status < 200 || result.status >= 300) {\r
+ throw Exception(result.body)\r
+ }\r
+ } catch (e: Exception) {\r
+ log.info("Caught exception trying to upload k8s config template ${profile.templateName}")\r
+ throw BluePrintProcessorException("${e.message}")\r
+ }\r
+ }\r
+ }\r
+}\r
+\r
+class UploadConfigTemplateRestClientService(\r
+ private val restClientProperties:\r
+ BasicAuthRestClientProperties\r
+) : BlueprintWebClientService {\r
+\r
+ override fun defaultHeaders(): Map<String, String> {\r
+\r
+ val encodedCredentials = setBasicAuth(\r
+ restClientProperties.username,\r
+ restClientProperties.password\r
+ )\r
+ return mapOf(\r
+ HttpHeaders.CONTENT_TYPE to MediaType.APPLICATION_JSON_VALUE,\r
+ HttpHeaders.ACCEPT to MediaType.APPLICATION_JSON_VALUE,\r
+ HttpHeaders.AUTHORIZATION to "Basic $encodedCredentials"\r
+ )\r
+ }\r
+\r
+ override fun host(uri: String): String {\r
+ return restClientProperties.url + uri\r
+ }\r
+\r
+ override fun convertToBasicHeaders(headers: Map<String, String>):\r
+ Array<BasicHeader> {\r
+ val customHeaders: MutableMap<String, String> = headers.toMutableMap()\r
+ // inject additionalHeaders\r
+ customHeaders.putAll(verifyAdditionalHeaders(restClientProperties))\r
+\r
+ if (!headers.containsKey(HttpHeaders.AUTHORIZATION)) {\r
+ val encodedCredentials = setBasicAuth(\r
+ restClientProperties.username,\r
+ restClientProperties.password\r
+ )\r
+ customHeaders[HttpHeaders.AUTHORIZATION] =\r
+ "Basic $encodedCredentials"\r
+ }\r
+ return super.convertToBasicHeaders(customHeaders)\r
+ }\r
+\r
+ private fun setBasicAuth(username: String, password: String): String {\r
+ val credentialsString = "$username:$password"\r
+ return Base64.getEncoder().encodeToString(\r
+ credentialsString.toByteArray(Charset.defaultCharset())\r
+ )\r
+ }\r
+\r
+ @Throws(IOException::class, ClientProtocolException::class)\r
+ private fun performHttpCall(httpUriRequest: HttpUriRequest): BlueprintWebClientService.WebClientResponse<String> {\r
+ val httpResponse = httpClient().execute(httpUriRequest)\r
+ val statusCode = httpResponse.statusLine.statusCode\r
+ httpResponse.entity.content.use {\r
+ val body = IOUtils.toString(it, Charset.defaultCharset())\r
+ return BlueprintWebClientService.WebClientResponse(statusCode, body)\r
+ }\r
+ }\r
+\r
+ fun uploadBinaryFile(path: String, filePath: Path): BlueprintWebClientService.WebClientResponse<String> {\r
+ val convertedHeaders: Array<BasicHeader> = convertToBasicHeaders(defaultHeaders())\r
+ val httpPost = HttpPost(host(path))\r
+ val entity = EntityBuilder.create().setBinary(Files.readAllBytes(filePath)).build()\r
+ httpPost.setEntity(entity)\r
+ RestLoggerService.httpInvoking(convertedHeaders)\r
+ httpPost.setHeaders(convertedHeaders)\r
+ return performHttpCall(httpPost)\r
+ }\r
+}\r
+\r
+class K8sConfigTemplate {\r
+ @get:JsonProperty("template-name")\r
+ var templateName: String? = null\r
+ @get:JsonProperty("description")\r
+ var description: String? = null\r
+ @get:JsonProperty("ChartName")\r
+ var ChartName: String? = null\r
+\r
+ override fun equals(other: Any?): Boolean {\r
+ if (this === other) return true\r
+ if (javaClass != other?.javaClass) return false\r
+ return true\r
+ }\r
+\r
+ override fun hashCode(): Int {\r
+ return javaClass.hashCode()\r
+ }\r
+}\r
+\r
+class K8sResources {\r
+\r
+ var GVK: GVK? = null\r
+ lateinit var Name: String\r
+\r
+}\r
+\r
+class GVK {\r
+\r
+ var Group: String? = null\r
+ var Version: String? = null\r
+ var Kind: String? = null\r
+\r
+}\r
+\r
+fun main(args: Array<String>) {\r
+\r
+ val kotlin = DayOneConfig()\r
+\r
+ \r
+ \r
+}\r
for (prefix in prefixList) {
if (prefix.toLowerCase().equals("vnf")) {
log.info("For vnf-level resource-assignment, profile is not performed.")
-
+
continue
}
val assignmentParams = getDynamicProperties("assignment-params")
log.info("Uploading K8S profile for template prefix $prefix")
val vfModuleModelInvariantUuid: String = getResolvedParameter(payloadObject, "vf-module-model-invariant-uuid")
- val vfModuleId: String = getResolvedParameter(payloadObject, "vf-module-id")
- val vfModuleModelUuid: String = getResolvedParameter(payloadObject, "vf-module-model-customization-uuid")
+ val vfModuleId: String = getResolvedParameter(payloadObject, "vf-module-id")
+ val vfModuleModelCustUuid: String = getResolvedParameter(payloadObject, "vf-module-model-customization-uuid")
val k8sRbProfileName: String = getResolvedParameter(payloadObject, "k8s-rb-profile-name")
val k8sRbProfileNamespace: String = getResolvedParameter(payloadObject, "k8s-rb-profile-namespace")
- val releaseName:String = getResolvedParameter(payloadObject, "k8s-rb-instance-release-name")
-
+ val releaseName:String = getResolvedParameter(payloadObject, "k8s-rb-instance-release-name")
+
log.info("******vfModuleID************ $vfModuleId")
log.info("k8sRbProfileName $k8sRbProfileName")
- val api = K8sApi(k8sApiUsername, k8sApiPassword, baseK8sApiUrl, vfModuleModelInvariantUuid, vfModuleModelUuid)
+ val api = K8sApi(k8sApiUsername, k8sApiPassword, baseK8sApiUrl, vfModuleModelInvariantUuid, vfModuleModelCustUuid)
if (!api.hasDefinition()) {
- throw BluePrintProcessorException("K8s RB Definition ($vfModuleModelInvariantUuid/$vfModuleModelUuid) not found ")
+ throw BluePrintProcessorException("K8s RB Definition ($vfModuleModelInvariantUuid/$vfModuleModelCustUuid) not found ")
}
log.info("k8s-rb-profile-name: $k8sRbProfileName")
if (api.hasProfile(k8sRbProfileName)) {
log.info("Profile Already Existing - skipping upload")
} else {
- createOverrideValues(payloadObject, vfModuleId, prefix)
+ createOverrideValues(payloadObject, vfModuleId, prefix)
val profileFilePath: Path = prepareProfileFile(k8sRbProfileName, vfModuleId, prefix)
-
+
var profile = K8sProfile()
profile.profileName = k8sRbProfileName
profile.rbName = vfModuleModelInvariantUuid
- profile.rbVersion = vfModuleModelUuid
+ profile.rbVersion = vfModuleModelCustUuid
profile.namespace = k8sRbProfileNamespace
- profile.releaseName = releaseName
+ profile.releaseName = releaseName
api.createProfile(profile)
api.uploadProfileContent(profile, profileFilePath)
}
fun prepareProfileFile(k8sRbProfileName: String, vfModuleId: String, prefix: String): Path {
- val bluePrintContext = bluePrintRuntimeService.bluePrintContext()
+ val bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val bluePrintBasePath: String = bluePrintContext.rootPath
- var profileFilePath: Path = Paths.get(bluePrintBasePath.plus(File.separator).plus("Templates").plus(File.separator).plus("k8s-profiles").plus(File.separator).plus("$prefix-profile.tar.gz"))
+ var profileFilePath: Path = Paths.get(bluePrintBasePath.plus(File.separator).plus("Templates").plus(File.separator).plus("k8s-profiles").plus(File.separator).plus("$prefix-profile.tar.gz"))
log.info("Reading K8s profile file: $profileFilePath")
val profileFile = profileFilePath.toFile()
log.info("Decompressing profile to $tempProfilePath")
val decompressedProfile: File = BluePrintArchiveUtils.deCompress(
- profileFilePath.toFile(),
- "$tempProfilePath",
- ArchiveType.TarGz
+ profileFilePath.toFile(),
+ "$tempProfilePath",
+ ArchiveType.TarGz
)
log.info("$profileFilePath decompression completed")
}
- fun createOverrideValues(payloadObject: ObjectNode, vfModuleId: String, prefix:String): String {
- // Extract supportedNssai
+ fun createOverrideValues(payloadObject: ObjectNode, vfModuleId: String, prefix:String): String {
+ // Extract supportedNssai
val supportedNssaiMap = LinkedHashMap<String, Any>()
val snssai: String = getResolvedParameter(payloadObject, "config.supportedNssai.sNssai.snssai")
log.info("snssa1 $snssai")
val bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val bluePrintBasePath: String = bluePrintContext.rootPath
val destPath: String = "/tmp/k8s-profile-" + vfModuleId
-
+
var profileFilePath: Path = Paths.get(bluePrintBasePath.plus(File.separator).plus("Templates").plus(File.separator).plus("k8s-profiles").plus(File.separator).plus("$prefix-profile.tar.gz"))
log.info("Reading K8s profile file: $profileFilePath")
val profileFile = profileFilePath.toFile()
log.info("Decompressing profile to $destPath")
val decompressedProfile: File = BluePrintArchiveUtils.deCompress(
- profileFilePath.toFile(),
- "$destPath",
- ArchiveType.TarGz
+ profileFilePath.toFile(),
+ "$destPath",
+ ArchiveType.TarGz
)
log.info("$profileFilePath decompression completed")
}
inner class K8sApi(
- val username: String,
- val password: String,
- val baseUrl: String,
- val definition: String,
- val definitionVersion: String
+ val username: String,
+ val password: String,
+ val baseUrl: String,
+ val definition: String,
+ val definitionVersion: String
) {
private val service: UploadFileRestClientService // BasicAuthRestClientService
fun hasProfile(profileName: String): Boolean {
try {
val result: BlueprintWebClientService.WebClientResponse<String> = service.exchangeResource(
- HttpMethod.GET.name,
- "/profile/$profileName",
- ""
+ HttpMethod.GET.name,
+ "/profile/$profileName",
+ ""
)
if (result.status >= 200 && result.status < 300)
return true
val profileJsonString: String = objectMapper.writeValueAsString(profile)
try {
val result: BlueprintWebClientService.WebClientResponse<String> = service.exchangeResource(
- HttpMethod.POST.name,
- "/profile",
- profileJsonString
+ HttpMethod.POST.name,
+ "/profile",
+ profileJsonString
)
if (result.status < 200 || result.status >= 300) {
throw Exception(result.body)
fun uploadProfileContent(profile: K8sProfile, filePath: Path) {
try {
val result: BlueprintWebClientService.WebClientResponse<String> = service.uploadBinaryFile(
- "/profile/${profile.profileName}/content",
- filePath
+ "/profile/${profile.profileName}/content",
+ filePath
)
if (result.status < 200 || result.status >= 300) {
throw Exception(result.body)
}
class UploadFileRestClientService(
- private val restClientProperties:
+ private val restClientProperties:
BasicAuthRestClientProperties
) : BlueprintWebClientService {
override fun defaultHeaders(): Map<String, String> {
val encodedCredentials = setBasicAuth(
- restClientProperties.username,
- restClientProperties.password
+ restClientProperties.username,
+ restClientProperties.password
)
return mapOf(
- HttpHeaders.CONTENT_TYPE to MediaType.APPLICATION_JSON_VALUE,
- HttpHeaders.ACCEPT to MediaType.APPLICATION_JSON_VALUE,
- HttpHeaders.AUTHORIZATION to "Basic $encodedCredentials"
+ HttpHeaders.CONTENT_TYPE to MediaType.APPLICATION_JSON_VALUE,
+ HttpHeaders.ACCEPT to MediaType.APPLICATION_JSON_VALUE,
+ HttpHeaders.AUTHORIZATION to "Basic $encodedCredentials"
)
}
}
override fun convertToBasicHeaders(headers: Map<String, String>):
- Array<BasicHeader> {
- val customHeaders: MutableMap<String, String> = headers.toMutableMap()
- // inject additionalHeaders
- customHeaders.putAll(verifyAdditionalHeaders(restClientProperties))
+ Array<BasicHeader> {
+ val customHeaders: MutableMap<String, String> = headers.toMutableMap()
+ // inject additionalHeaders
+ customHeaders.putAll(verifyAdditionalHeaders(restClientProperties))
- if (!headers.containsKey(HttpHeaders.AUTHORIZATION)) {
- val encodedCredentials = setBasicAuth(
+ if (!headers.containsKey(HttpHeaders.AUTHORIZATION)) {
+ val encodedCredentials = setBasicAuth(
restClientProperties.username,
restClientProperties.password
- )
- customHeaders[HttpHeaders.AUTHORIZATION] =
+ )
+ customHeaders[HttpHeaders.AUTHORIZATION] =
"Basic $encodedCredentials"
+ }
+ return super.convertToBasicHeaders(customHeaders)
}
- return super.convertToBasicHeaders(customHeaders)
- }
private fun setBasicAuth(username: String, password: String): String {
val credentialsString = "$username:$password"
return Base64.getEncoder().encodeToString(
- credentialsString.toByteArray(Charset.defaultCharset())
+ credentialsString.toByteArray(Charset.defaultCharset())
)
}
var profileName: String? = null
@get:JsonProperty("namespace")
var namespace: String? = "default"
- @get:JsonProperty("releaseName")
+ @get:JsonProperty("releaseName")
var releaseName: String? = null
override fun toString(): String {
-/*
-* Copyright © 2019 TechMahindra
-*
-* 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.cds.blueprintsprocessor.services.execution.scripts
-
-import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
-import org.slf4j.LoggerFactory
-import com.fasterxml.jackson.databind.node.ObjectNode
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
-import com.fasterxml.jackson.databind.node.ArrayNode
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
-import java.nio.file.Path
-import org.springframework.http.HttpMethod
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.BasicAuthRestClientProperties
-import org.springframework.http.HttpHeaders
-import org.springframework.http.MediaType
-import org.apache.http.message.BasicHeader
-import java.util.Base64
-import java.nio.charset.Charset
-import java.io.IOException
-import org.apache.http.client.methods.HttpUriRequest
-import com.fasterxml.jackson.annotation.JsonProperty
-import org.apache.commons.io.IOUtils
-import org.apache.http.client.methods.HttpPost
-import org.apache.http.client.entity.EntityBuilder
-import java.nio.file.Files
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.RestLoggerService
-import org.apache.http.client.ClientProtocolException
-import com.fasterxml.jackson.databind.ObjectMapper
-import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.definition.K8sPluginDefinitionApi
-import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.K8sConnectionPluginConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.definition.K8sDefinitionRestClient
-import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.instance.K8sConfigValueRequest
-import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.instance.K8sPluginInstanceApi
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
-import com.fasterxml.jackson.dataformat.yaml.YAMLFactory
-import com.fasterxml.jackson.module.kotlin.convertValue
-
-import com.google.gson.Gson
-import com.google.gson.reflect.TypeToken
-
-import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.storedContentFromResolvedArtifactNB
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BasicAuthRestClientService
-
-open class KotlinK8sUpdateConfig : AbstractScriptComponentFunction() {
-
- private val log = LoggerFactory.getLogger(KotlinK8sUpdateConfig::class.java)!!
-
- override fun getName(): String {
- return "KotlinK8sUpdateConfig"
- }
-
- override suspend fun processNB(executionRequest: ExecutionServiceInput) {
-
- println("Exeuting processNB")
- log.info("Executing processNB from Kotlin script: KotlinK8sUpdateConfig ...")
- val bluePrintPropertiesService: BluePrintPropertiesService =this.functionDependencyInstanceAsType("bluePrintPropertiesService")
-
- // read the config input
- val baseK8sApiUrl = getDynamicProperties("api-access").get("url").asText()
- val k8sApiUsername = getDynamicProperties("api-access").get("username").asText()
- val k8sApiPassword = getDynamicProperties("api-access").get("password").asText()
-
- val prefix = "baseconfigput"
-
- val aaiApiUrl = getDynamicProperties("aai-access").get("url").asText()
- val aaiApiUsername = getDynamicProperties("aai-access").get("username").asText()
- val aaiApiPassword = getDynamicProperties("aai-access").get("password").asText()
-
- log.info("AAI params $aaiApiUrl")
-
- val resolution_key = getDynamicProperties("resolution-key").asText()
-
- val payload = storedContentFromResolvedArtifactNB(resolution_key, prefix)
-
- val payloadObject = JacksonUtils.jsonNode(payload) as ObjectNode
-
- val serviceInstanceID: String = getResolvedParameter(payloadObject, "service-instance-id")
- val vnfID: String = getResolvedParameter(payloadObject, "vnf-id")
-
- log.info("Get serviceInstanceID $serviceInstanceID")
- log.info("Get vnfID $vnfID")
-
- val vnfUrl = aaiApiUrl + "/aai/v19/network/generic-vnfs/generic-vnf/" + vnfID + "/vf-modules";
-
- val mapOfHeaders = hashMapOf<String, String>()
- mapOfHeaders.put("Accept", "application/json")
- mapOfHeaders.put("Content-Type", "application/json")
- mapOfHeaders.put("x-FromAppId", "SO")
- mapOfHeaders.put("X-TransactionId", "get_aai_subscr")
- val basicAuthRestClientProperties: BasicAuthRestClientProperties = BasicAuthRestClientProperties()
- basicAuthRestClientProperties.username = aaiApiUsername
- basicAuthRestClientProperties.password = aaiApiPassword
- basicAuthRestClientProperties.url = vnfUrl
- basicAuthRestClientProperties.additionalHeaders =mapOfHeaders
- val basicAuthRestClientService: BasicAuthRestClientService= BasicAuthRestClientService(basicAuthRestClientProperties)
- try {
- val resultOfGet: BlueprintWebClientService.WebClientResponse<String> = basicAuthRestClientService.exchangeResource(HttpMethod.GET.name, "", "")
-
- val aaiBody = resultOfGet.body
- val aaiPayloadObject = JacksonUtils.jsonNode(aaiBody) as ObjectNode
-
- log.info("aaiPayloadObject: $aaiPayloadObject")
-
- for (item in aaiPayloadObject.get("vf-module")) {
-
- log.info("item payload Deatils : $item")
-
- val isItBaseVfModule = item.get("is-base-vf-module").asText()
-
- if(isItBaseVfModule.toBoolean())
- continue
-
- val vfModuleID: String = item.get("vf-module-id").asText()
-
- log.info("AAI Vf-module ID is : $vfModuleID")
-
- val vfModuleModelInvariantUuid: String = item.get("model-invariant-id").asText()
-
- log.info("AAI Vf-module Invariant ID is : $vfModuleModelInvariantUuid")
-
- val vfModuleModelUuid: String = item.get("model-customization-id").asText()
-
- log.info("AAI Vf-module UUID is : $vfModuleModelUuid")
-
- val vfModuleCustUuid: String = item.get("model-customization-id").asText()
-
- log.info("AAI Vf-module Customization UUID is : $vfModuleCustUuid")
-
-
- val vfModuleInstance: String = item.get("heat-stack-id").asText()
-
- log.info("AAI Vf-module Heat Stack ID : $vfModuleInstance")
-
- val profileName: String = "profile-"+ vfModuleID
- val templateName: String = "template_" + vfModuleCustUuid
-
- //val randomString = getRandomString(6)
- val configName: String = "config_"+ vfModuleID
-
- log.info("payloadObject: $payloadObject")
-
- var supportedNssai: String = getResolvedParameter(payloadObject, "supportedNssai")
-
- log.info("supportedNssai from SO -> "+ supportedNssai)
- log.info("configName ->"+ configName)
- log.info("profileName ->"+ profileName)
- log.info("templateName ->"+ templateName)
-
-
- executeK8sAPI(bluePrintPropertiesService,supportedNssai, k8sApiUsername, k8sApiPassword, baseK8sApiUrl, vfModuleModelInvariantUuid, vfModuleCustUuid, templateName, configName, profileName, vfModuleInstance)
-
- }
- }
- catch (e: Exception) {
- log.info("Caught exception trying to set config values!!")
- throw BluePrintProcessorException("${e.message}")
- }
- }
-
- fun getRandomString(length: Int) : String {
- val charset = "0123456789"
- return (1..length)
- .map { charset.random() }
- .joinToString("")
- }
-
- fun executeK8sAPI(bluePrintPropertiesService: BluePrintPropertiesService,supportedNssai: String, k8sApiUsername:String, k8sApiPassword:String, baseK8sApiUrl:String, vfModuleModelInvariantUuid:String, vfModuleCustUuid: String, templateName: String, configName:String, profileName:String, instanceId: String){
-
- println("Executing executeK8sAPI ...")
-
- // read and convert supportedNssai parameters from string to json
- val sNssaiAsJsonObj = parseSupportedNssai(supportedNssai)
-
- // contruct config api
- val api = K8sConfigApi(k8sApiUsername, k8sApiPassword, baseK8sApiUrl, vfModuleModelInvariantUuid, vfModuleCustUuid, instanceId, bluePrintPropertiesService)
-
-
- // invoke config api
- var config = K8sConfigPayloadJson()
- config.templateName = templateName
- config.configName = configName
- config.values = Config()
- config.values.supportedNssai = SupportedNssai()
- config.values.supportedNssai.snssaiInitial = SnssaiInitial()
- config.values.supportedNssai.snssaiInitial.snssaiSecond = SnssaiSecond()
- config.values.supportedNssai.snssaiInitial.snssaiSecond.snssaiFinalArray = Array<SnssaiFinal>(sNssaiAsJsonObj.size){i-> SnssaiFinal()}
-
- val dest = buildSNssaiArray(config.values.supportedNssai.snssaiInitial.snssaiSecond.snssaiFinalArray, sNssaiAsJsonObj)
- api.createOrUpdateConfig(config, profileName, instanceId, configName, templateName)
-
- log.info("K8s Configurations create or update Completed")
-
- }
-
- fun buildSNssaiArray(payloadSnssai: Array<SnssaiFinal>, requestSnssai: Array<SnssaiFinal>): Array<SnssaiFinal>{
-
- System.arraycopy(requestSnssai, 0, payloadSnssai, 0, requestSnssai.size)
-
- return payloadSnssai
-
- }
-
- fun parseSupportedNssai(supportedNssai: String): Array<SnssaiFinal>{
-
- log.info("parsing supportedNssai string..")
-
- log.info("sNssai value from input.. $supportedNssai")
-
- val trimmed_supportedNssai = supportedNssai.replace("\\s".toRegex(), "").replace("\\r\\n","").replace("\\","")
-
- val gson = Gson()
-
- val startInd = trimmed_supportedNssai.indexOf('[')
- val endInd = trimmed_supportedNssai.indexOf(']')
-
- val subStr = trimmed_supportedNssai.substring(startInd, endInd+1)
-
- val snType = object : TypeToken<Array<SnssaiFinal>>() {}.type
-
- var snList: Array<SnssaiFinal> = gson.fromJson(subStr, snType)
-
- log.info("parsing is done.")
-
- return snList
-
- }
-
- fun getResolvedParameter(payload: ObjectNode, keyName: String): String {
- for (node in payload.get("resource-accumulator-resolved-data").elements()) {
- if (node.get("param-name").asText().equals(keyName)) {
- return node.get("param-value").asText()
- }
- }
- return ""
- }
-
- fun getTemplatePrefixList(executionRequest: ExecutionServiceInput): ArrayList<String> {
- val result = ArrayList<String>()
- for (prefix in executionRequest.payload.get("resource-assignment-request").get("template-prefix").elements())
- result.add(prefix.asText())
- return result
- }
-
- override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
- log.info("Recover function called!")
- log.info("Execution request : $executionRequest")
- log.error("Exception", runtimeException)
- addError(runtimeException.message!!)
- }
-
- inner class K8sConfigApi(
- val username: String,
- val password: String,
- val baseUrl: String,
- val definition: String,
- val definitionVersion: String,
- val instanceId: String,
- val bluePrintPropertiesService: BluePrintPropertiesService
-
- ) {
- private val service: UploadFileConfigClientService // BasicAuthRestClientService
-
- init {
- var mapOfHeaders = hashMapOf<String, String>()
- mapOfHeaders.put("Accept", "application/json")
- mapOfHeaders.put("Content-Type", "application/json")
- mapOfHeaders.put("cache-control", " no-cache")
- mapOfHeaders.put("Accept", "application/json")
- var basicAuthRestClientProperties: BasicAuthRestClientProperties = BasicAuthRestClientProperties()
- basicAuthRestClientProperties.username = username
- basicAuthRestClientProperties.password = password
- basicAuthRestClientProperties.url = "$baseUrl/v1/instance"
- basicAuthRestClientProperties.additionalHeaders = mapOfHeaders
-
- this.service = UploadFileConfigClientService(basicAuthRestClientProperties)
- }
-
- fun createOrUpdateConfig(configJson: K8sConfigPayloadJson, profileName: String, instanceId: String, configName: String, templateName: String) {
- val objectMapper = ObjectMapper()
- var obj: Any? = null
- val yamlReader = ObjectMapper(YAMLFactory())
-
- for(snssai in configJson.values.supportedNssai.snssaiInitial.snssaiSecond.snssaiFinalArray){
- println("snssai->" +snssai.snssai)
- println("status->"+snssai.status)
-
- }
-
- val configJsonString: String = objectMapper.writeValueAsString(configJson.values)
-
- log.info("payload generated -> "+ configJsonString)
-
- val startInd = configJsonString.indexOf('[')
- val endInd = configJsonString.indexOf(']')
-
- val snssaiArray: String = configJsonString.substring(startInd, endInd+1).replace("\"","\\\"").replace("[","\"[").replace("]","]\"")
-
- val finalPayload: String = configJsonString.replaceRange(startInd..endInd, snssaiArray)
-
- log.info("payload restructured -> "+ finalPayload)
- obj = yamlReader.readValue(finalPayload, Any::class.java)
-
-
-
- val api = K8sPluginInstanceApi(K8sConnectionPluginConfiguration(bluePrintPropertiesService))
-
- val configValueRequest = K8sConfigValueRequest()
- configValueRequest.templateName = configJson.templateName
- configValueRequest.configName = configJson.configName
- configValueRequest.values = objectMapper.convertValue(obj)
- if (api.hasConfigurationValues(instanceId, configName)) {
- api.editConfigurationValues(configValueRequest, instanceId, configName)
- } else {
- api.createConfigurationValues(configValueRequest, instanceId)
- }
- }
-
- }
-}
-
-class UploadFileConfigClientService(
- private val restClientProperties:
- BasicAuthRestClientProperties
-) : BlueprintWebClientService {
-
- override fun defaultHeaders(): Map<String, String> {
-
- val encodedCredentials = setBasicAuth(
- restClientProperties.username,
- restClientProperties.password
- )
- return mapOf(
- HttpHeaders.CONTENT_TYPE to MediaType.APPLICATION_JSON_VALUE,
- HttpHeaders.ACCEPT to MediaType.APPLICATION_JSON_VALUE,
- HttpHeaders.AUTHORIZATION to "Basic $encodedCredentials"
- )
- }
-
- override fun host(uri: String): String {
- return restClientProperties.url + uri
- }
-
- override fun convertToBasicHeaders(headers: Map<String, String>):
- Array<BasicHeader> {
- val customHeaders: MutableMap<String, String> = headers.toMutableMap()
- // inject additionalHeaders
- customHeaders.putAll(verifyAdditionalHeaders(restClientProperties))
-
- if (!headers.containsKey(HttpHeaders.AUTHORIZATION)) {
- val encodedCredentials = setBasicAuth(
- restClientProperties.username,
- restClientProperties.password
- )
- customHeaders[HttpHeaders.AUTHORIZATION] =
- "Basic $encodedCredentials"
- }
- return super.convertToBasicHeaders(customHeaders)
- }
-
- private fun setBasicAuth(username: String, password: String): String {
- val credentialsString = "$username:$password"
- return Base64.getEncoder().encodeToString(
- credentialsString.toByteArray(Charset.defaultCharset())
- )
- }
-
- @Throws(IOException::class, ClientProtocolException::class)
- private fun performHttpCall(httpUriRequest: HttpUriRequest): BlueprintWebClientService.WebClientResponse<String> {
- val httpResponse = httpClient().execute(httpUriRequest)
- val statusCode = httpResponse.statusLine.statusCode
- httpResponse.entity.content.use {
- val body = IOUtils.toString(it, Charset.defaultCharset())
- return BlueprintWebClientService.WebClientResponse(statusCode, body)
- }
- }
-
- fun uploadBinaryFile(path: String, filePath: Path): BlueprintWebClientService.WebClientResponse<String> {
- val convertedHeaders: Array<BasicHeader> = convertToBasicHeaders(defaultHeaders())
- val httpPost = HttpPost(host(path))
- val entity = EntityBuilder.create().setBinary(Files.readAllBytes(filePath)).build()
- httpPost.setEntity(entity)
- RestLoggerService.httpInvoking(convertedHeaders)
- httpPost.setHeaders(convertedHeaders)
- return performHttpCall(httpPost)
- }
-}
-
-
-class K8sConfigPayloadJson {
- @get:JsonProperty("template-name")
- var templateName: String? = null
- @get:JsonProperty("config-name")
- var configName: String? = null
- @get:JsonProperty("values")
- lateinit var values: Config
-
- override fun toString(): String {
- return "$templateName:$configName:$values"
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) return true
- if (javaClass != other?.javaClass) return false
- return true
- }
-
- override fun hashCode(): Int {
- return javaClass.hashCode()
- }
-}
-
-class Config{
- @get:JsonProperty("config")
- lateinit var supportedNssai: SupportedNssai
-}
-
-class SupportedNssai{
- @get:JsonProperty("supportedNssai")
- lateinit var snssaiInitial: SnssaiInitial
-}
-
-class SnssaiInitial{
-
- @get:JsonProperty("sNssai")
- lateinit var snssaiSecond: SnssaiSecond
-}
-
-class SnssaiSecond{
-
- @get:JsonProperty("snssai")
- lateinit var snssaiFinalArray: Array<SnssaiFinal>
-}
-
-
-class SnssaiFinal{
- @get:JsonProperty("snssai")
- var snssai: String? = null
-
- @get:JsonProperty("status")
- var status: String? = null
-}
-
-
-fun main(args: Array<String>) {
-
- val supportedNssai = """
-
- {\r\n \"sNssai\":[\r\n {\r\n \"snssai\":\"001-100001\",\r\n \"status\":\"created-modified\"\r\n },\r\n {\r\n \"snssai\":\"002-100001\",\r\n \"status\":\"activated\"\r\n },\r\n {\r\n \"snssai\":\"003-100001\",\r\n \"status\":\"de-activated\"\r\n }\r\n ]\r\n }\r\n
-
-"""
-
- val kotlin = KotlinK8sUpdateConfig()
-
-
-
-}
+/*\r
+* Copyright © 2019 TechMahindra\r
+*\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*/\r
+\r
+package org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts\r
+\r
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput\r
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction\r
+import org.slf4j.LoggerFactory\r
+import com.fasterxml.jackson.databind.node.ObjectNode\r
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils\r
+import com.fasterxml.jackson.databind.node.ArrayNode\r
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService\r
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException\r
+import java.nio.file.Path\r
+import org.springframework.http.HttpMethod\r
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.BasicAuthRestClientProperties\r
+import org.springframework.http.HttpHeaders\r
+import org.springframework.http.MediaType\r
+import org.apache.http.message.BasicHeader\r
+import java.util.Base64\r
+import java.nio.charset.Charset\r
+import java.io.IOException\r
+import org.apache.http.client.methods.HttpUriRequest\r
+import com.fasterxml.jackson.annotation.JsonProperty\r
+import org.apache.commons.io.IOUtils\r
+import org.apache.http.client.methods.HttpPost\r
+import org.apache.http.client.entity.EntityBuilder\r
+import java.nio.file.Files\r
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.RestLoggerService\r
+import org.apache.http.client.ClientProtocolException\r
+import com.fasterxml.jackson.databind.ObjectMapper\r
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.definition.K8sPluginDefinitionApi\r
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.K8sConnectionPluginConfiguration\r
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.definition.K8sDefinitionRestClient\r
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.instance.K8sConfigValueRequest\r
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.instance.K8sPluginInstanceApi\r
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService\r
+import com.fasterxml.jackson.dataformat.yaml.YAMLFactory\r
+import com.fasterxml.jackson.module.kotlin.convertValue\r
+\r
+import com.google.gson.Gson\r
+import com.google.gson.reflect.TypeToken\r
+\r
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.storedContentFromResolvedArtifactNB\r
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BasicAuthRestClientService\r
+\r
+open class KotlinK8sUpdateConfig : AbstractScriptComponentFunction() {\r
+\r
+ private val log = LoggerFactory.getLogger(KotlinK8sUpdateConfig::class.java)!!\r
+\r
+ override fun getName(): String {\r
+ return "KotlinK8sUpdateConfig"\r
+ }\r
+\r
+ override suspend fun processNB(executionRequest: ExecutionServiceInput) {\r
+\r
+ println("Exeuting processNB")\r
+ log.info("Executing processNB from Kotlin script: KotlinK8sUpdateConfig ...")\r
+ val bluePrintPropertiesService: BluePrintPropertiesService =this.functionDependencyInstanceAsType("bluePrintPropertiesService")\r
+\r
+ // read the config input\r
+ val baseK8sApiUrl = getDynamicProperties("api-access").get("url").asText()\r
+ val k8sApiUsername = getDynamicProperties("api-access").get("username").asText()\r
+ val k8sApiPassword = getDynamicProperties("api-access").get("password").asText()\r
+\r
+ val prefix = "baseconfigput"\r
+\r
+ val aaiApiUrl = getDynamicProperties("aai-access").get("url").asText()\r
+ val aaiApiUsername = getDynamicProperties("aai-access").get("username").asText()\r
+ val aaiApiPassword = getDynamicProperties("aai-access").get("password").asText()\r
+\r
+ log.info("AAI params $aaiApiUrl")\r
+\r
+ val resolution_key = getDynamicProperties("resolution-key").asText()\r
+\r
+ val payload = storedContentFromResolvedArtifactNB(resolution_key, prefix)\r
+\r
+ val payloadObject = JacksonUtils.jsonNode(payload) as ObjectNode\r
+\r
+ val serviceInstanceID: String = getResolvedParameter(payloadObject, "service-instance-id")\r
+ val vnfID: String = getResolvedParameter(payloadObject, "vnf-id")\r
+\r
+ log.info("Get serviceInstanceID $serviceInstanceID")\r
+ log.info("Get vnfID $vnfID")\r
+\r
+ val vnfUrl = aaiApiUrl + "/aai/v19/network/generic-vnfs/generic-vnf/" + vnfID + "/vf-modules";\r
+\r
+ val mapOfHeaders = hashMapOf<String, String>()\r
+ mapOfHeaders.put("Accept", "application/json")\r
+ mapOfHeaders.put("Content-Type", "application/json")\r
+ mapOfHeaders.put("x-FromAppId", "SO")\r
+ mapOfHeaders.put("X-TransactionId", "get_aai_subscr")\r
+ val basicAuthRestClientProperties: BasicAuthRestClientProperties = BasicAuthRestClientProperties()\r
+ basicAuthRestClientProperties.username = aaiApiUsername\r
+ basicAuthRestClientProperties.password = aaiApiPassword\r
+ basicAuthRestClientProperties.url = vnfUrl\r
+ basicAuthRestClientProperties.additionalHeaders =mapOfHeaders\r
+ val basicAuthRestClientService: BasicAuthRestClientService= BasicAuthRestClientService(basicAuthRestClientProperties)\r
+ try {\r
+ val resultOfGet: BlueprintWebClientService.WebClientResponse<String> = basicAuthRestClientService.exchangeResource(HttpMethod.GET.name, "", "")\r
+\r
+ val aaiBody = resultOfGet.body\r
+ val aaiPayloadObject = JacksonUtils.jsonNode(aaiBody) as ObjectNode\r
+ \r
+ log.info("aaiPayloadObject: $aaiPayloadObject")\r
+\r
+ for (item in aaiPayloadObject.get("vf-module")) {\r
+\r
+ log.info("item payload Deatils : $item")\r
+\r
+ val isItBaseVfModule = item.get("is-base-vf-module").asText()\r
+\r
+ if(isItBaseVfModule.toBoolean())\r
+ continue\r
+\r
+ val vfModuleID: String = item.get("vf-module-id").asText()\r
+\r
+ log.info("AAI Vf-module ID is : $vfModuleID")\r
+\r
+ val vfModuleModelInvariantUuid: String = item.get("model-invariant-id").asText()\r
+\r
+ log.info("AAI Vf-module Invariant ID is : $vfModuleModelInvariantUuid")\r
+\r
+ val vfModuleModelUuid: String = item.get("model-version-id").asText()\r
+\r
+ log.info("AAI Vf-module UUID is : $vfModuleModelUuid")\r
+ \r
+ val vfModuleCustUuid: String = item.get("model-customization-id").asText()\r
+\r
+ log.info("AAI Vf-module Customization UUID is : $vfModuleCustUuid")\r
+ \r
+\r
+ val vfModuleInstance: String = item.get("heat-stack-id").asText()\r
+\r
+ log.info("AAI Vf-module Heat Stack ID : $vfModuleInstance")\r
+\r
+ val profileName: String = "profile-"+ vfModuleID\r
+ val templateName: String = "template_" + vfModuleCustUuid\r
+\r
+ //val randomString = getRandomString(6)\r
+ val configName: String = "config_"+ vfModuleID\r
+ \r
+ log.info("payloadObject: $payloadObject")\r
+\r
+ var supportedNssai: String = getResolvedParameter(payloadObject, "supportedNssai")\r
+\r
+ log.info("supportedNssai from SO -> "+ supportedNssai)\r
+ log.info("configName ->"+ configName)\r
+ log.info("profileName ->"+ profileName)\r
+ log.info("templateName ->"+ templateName)\r
+\r
+\r
+ executeK8sAPI(bluePrintPropertiesService,supportedNssai, k8sApiUsername, k8sApiPassword, baseK8sApiUrl, vfModuleModelInvariantUuid, vfModuleCustUuid, templateName, configName, profileName, vfModuleInstance)\r
+\r
+ }\r
+ }\r
+ catch (e: Exception) {\r
+ log.info("Caught exception trying to set config values!!")\r
+ throw BluePrintProcessorException("${e.message}")\r
+ }\r
+ }\r
+\r
+ fun getRandomString(length: Int) : String {\r
+ val charset = "0123456789"\r
+ return (1..length)\r
+ .map { charset.random() }\r
+ .joinToString("")\r
+ }\r
+\r
+ fun executeK8sAPI(bluePrintPropertiesService: BluePrintPropertiesService,supportedNssai: String, k8sApiUsername:String, k8sApiPassword:String, baseK8sApiUrl:String, vfModuleModelInvariantUuid:String, vfModuleCustUuid: String, templateName: String, configName:String, profileName:String, instanceId: String){\r
+\r
+ println("Executing executeK8sAPI ...")\r
+\r
+ // read and convert supportedNssai parameters from string to json\r
+ val sNssaiAsJsonObj = parseSupportedNssai(supportedNssai)\r
+\r
+ // contruct config api\r
+ val api = K8sConfigApi(k8sApiUsername, k8sApiPassword, baseK8sApiUrl, vfModuleModelInvariantUuid, vfModuleCustUuid, instanceId, bluePrintPropertiesService)\r
+\r
+\r
+ // invoke config api\r
+ var config = K8sConfigPayloadJson()\r
+ config.templateName = templateName\r
+ config.configName = configName\r
+ config.values = Config()\r
+ config.values.supportedNssai = SupportedNssai()\r
+ config.values.supportedNssai.snssaiInitial = SnssaiInitial()\r
+ config.values.supportedNssai.snssaiInitial.snssaiSecond = SnssaiSecond()\r
+ config.values.supportedNssai.snssaiInitial.snssaiSecond.snssaiFinalArray = Array<SnssaiFinal>(sNssaiAsJsonObj.size){i-> SnssaiFinal()}\r
+\r
+ val dest = buildSNssaiArray(config.values.supportedNssai.snssaiInitial.snssaiSecond.snssaiFinalArray, sNssaiAsJsonObj)\r
+ api.createOrUpdateConfig(config, profileName, instanceId, configName, templateName)\r
+\r
+ log.info("K8s Configurations create or update Completed")\r
+\r
+ }\r
+\r
+ fun buildSNssaiArray(payloadSnssai: Array<SnssaiFinal>, requestSnssai: Array<SnssaiFinal>): Array<SnssaiFinal>{\r
+\r
+ System.arraycopy(requestSnssai, 0, payloadSnssai, 0, requestSnssai.size)\r
+\r
+ return payloadSnssai\r
+\r
+ }\r
+\r
+ fun parseSupportedNssai(supportedNssai: String): Array<SnssaiFinal>{\r
+\r
+ log.info("parsing supportedNssai string..")\r
+\r
+ log.info("sNssai value from input.. $supportedNssai")\r
+\r
+ val trimmed_supportedNssai = supportedNssai.replace("\\s".toRegex(), "").replace("\\r\\n","").replace("\\","")\r
+\r
+ val gson = Gson()\r
+\r
+ val startInd = trimmed_supportedNssai.indexOf('[')\r
+ val endInd = trimmed_supportedNssai.indexOf(']')\r
+\r
+ val subStr = trimmed_supportedNssai.substring(startInd, endInd+1)\r
+\r
+ val snType = object : TypeToken<Array<SnssaiFinal>>() {}.type\r
+\r
+ var snList: Array<SnssaiFinal> = gson.fromJson(subStr, snType)\r
+\r
+ log.info("parsing is done.")\r
+\r
+ return snList\r
+\r
+ }\r
+\r
+ fun getResolvedParameter(payload: ObjectNode, keyName: String): String {\r
+ for (node in payload.get("resource-accumulator-resolved-data").elements()) {\r
+ if (node.get("param-name").asText().equals(keyName)) {\r
+ return node.get("param-value").asText()\r
+ }\r
+ }\r
+ return ""\r
+ }\r
+\r
+ fun getTemplatePrefixList(executionRequest: ExecutionServiceInput): ArrayList<String> {\r
+ val result = ArrayList<String>()\r
+ for (prefix in executionRequest.payload.get("resource-assignment-request").get("template-prefix").elements())\r
+ result.add(prefix.asText())\r
+ return result\r
+ }\r
+\r
+ override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {\r
+ log.info("Recover function called!")\r
+ log.info("Execution request : $executionRequest")\r
+ log.error("Exception", runtimeException)\r
+ addError(runtimeException.message!!)\r
+ }\r
+\r
+ inner class K8sConfigApi(\r
+ val username: String,\r
+ val password: String,\r
+ val baseUrl: String,\r
+ val definition: String,\r
+ val definitionVersion: String,\r
+ val instanceId: String,\r
+ val bluePrintPropertiesService: BluePrintPropertiesService\r
+ \r
+ ) {\r
+ private val service: UploadFileConfigClientService // BasicAuthRestClientService\r
+\r
+ init {\r
+ var mapOfHeaders = hashMapOf<String, String>()\r
+ mapOfHeaders.put("Accept", "application/json")\r
+ mapOfHeaders.put("Content-Type", "application/json")\r
+ mapOfHeaders.put("cache-control", " no-cache")\r
+ mapOfHeaders.put("Accept", "application/json")\r
+ var basicAuthRestClientProperties: BasicAuthRestClientProperties = BasicAuthRestClientProperties()\r
+ basicAuthRestClientProperties.username = username\r
+ basicAuthRestClientProperties.password = password\r
+ basicAuthRestClientProperties.url = "$baseUrl/v1/instance"\r
+ basicAuthRestClientProperties.additionalHeaders = mapOfHeaders\r
+\r
+ this.service = UploadFileConfigClientService(basicAuthRestClientProperties)\r
+ }\r
+\r
+ fun createOrUpdateConfig(configJson: K8sConfigPayloadJson, profileName: String, instanceId: String, configName: String, templateName: String) {\r
+ val objectMapper = ObjectMapper()\r
+ var obj: Any? = null\r
+ val yamlReader = ObjectMapper(YAMLFactory())\r
+\r
+ for(snssai in configJson.values.supportedNssai.snssaiInitial.snssaiSecond.snssaiFinalArray){\r
+ println("snssai->" +snssai.snssai)\r
+ println("status->"+snssai.status)\r
+\r
+ }\r
+\r
+ val configJsonString: String = objectMapper.writeValueAsString(configJson.values)\r
+\r
+ log.info("payload generated -> "+ configJsonString)\r
+\r
+ val startInd = configJsonString.indexOf('[')\r
+ val endInd = configJsonString.indexOf(']')\r
+\r
+ val snssaiArray: String = configJsonString.substring(startInd, endInd+1).replace("\"","\\\"").replace("[","\"[").replace("]","]\"")\r
+\r
+ val finalPayload: String = configJsonString.replaceRange(startInd..endInd, snssaiArray)\r
+\r
+ log.info("payload restructured -> "+ finalPayload)\r
+ obj = yamlReader.readValue(finalPayload, Any::class.java)\r
+ \r
+\r
+ \r
+ val api = K8sPluginInstanceApi(K8sConnectionPluginConfiguration(bluePrintPropertiesService))\r
+ \r
+ val configValueRequest = K8sConfigValueRequest()\r
+ configValueRequest.templateName = configJson.templateName\r
+ configValueRequest.configName = configJson.configName\r
+ configValueRequest.values = objectMapper.convertValue(obj)\r
+ if (api.hasConfigurationValues(instanceId, configName)) {\r
+ api.editConfigurationValues(configValueRequest, instanceId, configName)\r
+ } else {\r
+ api.createConfigurationValues(configValueRequest, instanceId)\r
+ }\r
+ }\r
+\r
+ }\r
+}\r
+\r
+class UploadFileConfigClientService(\r
+ private val restClientProperties:\r
+ BasicAuthRestClientProperties\r
+) : BlueprintWebClientService {\r
+\r
+ override fun defaultHeaders(): Map<String, String> {\r
+\r
+ val encodedCredentials = setBasicAuth(\r
+ restClientProperties.username,\r
+ restClientProperties.password\r
+ )\r
+ return mapOf(\r
+ HttpHeaders.CONTENT_TYPE to MediaType.APPLICATION_JSON_VALUE,\r
+ HttpHeaders.ACCEPT to MediaType.APPLICATION_JSON_VALUE,\r
+ HttpHeaders.AUTHORIZATION to "Basic $encodedCredentials"\r
+ )\r
+ }\r
+\r
+ override fun host(uri: String): String {\r
+ return restClientProperties.url + uri\r
+ }\r
+\r
+ override fun convertToBasicHeaders(headers: Map<String, String>):\r
+ Array<BasicHeader> {\r
+ val customHeaders: MutableMap<String, String> = headers.toMutableMap()\r
+ // inject additionalHeaders\r
+ customHeaders.putAll(verifyAdditionalHeaders(restClientProperties))\r
+\r
+ if (!headers.containsKey(HttpHeaders.AUTHORIZATION)) {\r
+ val encodedCredentials = setBasicAuth(\r
+ restClientProperties.username,\r
+ restClientProperties.password\r
+ )\r
+ customHeaders[HttpHeaders.AUTHORIZATION] =\r
+ "Basic $encodedCredentials"\r
+ }\r
+ return super.convertToBasicHeaders(customHeaders)\r
+ }\r
+\r
+ private fun setBasicAuth(username: String, password: String): String {\r
+ val credentialsString = "$username:$password"\r
+ return Base64.getEncoder().encodeToString(\r
+ credentialsString.toByteArray(Charset.defaultCharset())\r
+ )\r
+ }\r
+\r
+ @Throws(IOException::class, ClientProtocolException::class)\r
+ private fun performHttpCall(httpUriRequest: HttpUriRequest): BlueprintWebClientService.WebClientResponse<String> {\r
+ val httpResponse = httpClient().execute(httpUriRequest)\r
+ val statusCode = httpResponse.statusLine.statusCode\r
+ httpResponse.entity.content.use {\r
+ val body = IOUtils.toString(it, Charset.defaultCharset())\r
+ return BlueprintWebClientService.WebClientResponse(statusCode, body)\r
+ }\r
+ }\r
+\r
+ fun uploadBinaryFile(path: String, filePath: Path): BlueprintWebClientService.WebClientResponse<String> {\r
+ val convertedHeaders: Array<BasicHeader> = convertToBasicHeaders(defaultHeaders())\r
+ val httpPost = HttpPost(host(path))\r
+ val entity = EntityBuilder.create().setBinary(Files.readAllBytes(filePath)).build()\r
+ httpPost.setEntity(entity)\r
+ RestLoggerService.httpInvoking(convertedHeaders)\r
+ httpPost.setHeaders(convertedHeaders)\r
+ return performHttpCall(httpPost)\r
+ }\r
+}\r
+\r
+\r
+class K8sConfigPayloadJson {\r
+ @get:JsonProperty("template-name")\r
+ var templateName: String? = null\r
+ @get:JsonProperty("config-name")\r
+ var configName: String? = null\r
+ @get:JsonProperty("values")\r
+ lateinit var values: Config\r
+\r
+ override fun toString(): String {\r
+ return "$templateName:$configName:$values"\r
+ }\r
+\r
+ override fun equals(other: Any?): Boolean {\r
+ if (this === other) return true\r
+ if (javaClass != other?.javaClass) return false\r
+ return true\r
+ }\r
+\r
+ override fun hashCode(): Int {\r
+ return javaClass.hashCode()\r
+ }\r
+}\r
+\r
+class Config{\r
+ @get:JsonProperty("config")\r
+ lateinit var supportedNssai: SupportedNssai\r
+}\r
+\r
+class SupportedNssai{\r
+ @get:JsonProperty("supportedNssai")\r
+ lateinit var snssaiInitial: SnssaiInitial\r
+}\r
+\r
+class SnssaiInitial{\r
+\r
+ @get:JsonProperty("sNssai")\r
+ lateinit var snssaiSecond: SnssaiSecond\r
+}\r
+\r
+class SnssaiSecond{\r
+\r
+ @get:JsonProperty("snssai")\r
+ lateinit var snssaiFinalArray: Array<SnssaiFinal>\r
+}\r
+\r
+\r
+class SnssaiFinal{\r
+ @get:JsonProperty("snssai")\r
+ var snssai: String? = null\r
+\r
+ @get:JsonProperty("status")\r
+ var status: String? = null\r
+}\r
+\r
+\r
+fun main(args: Array<String>) {\r
+\r
+ val supportedNssai = """\r
+\r
+ {\r\n \"sNssai\":[\r\n {\r\n \"snssai\":\"001-100001\",\r\n \"status\":\"created-modified\"\r\n },\r\n {\r\n \"snssai\":\"002-100001\",\r\n \"status\":\"activated\"\r\n },\r\n {\r\n \"snssai\":\"003-100001\",\r\n \"status\":\"de-activated\"\r\n }\r\n ]\r\n }\r\n\r
+\r
+"""\r
+\r
+ val kotlin = KotlinK8sUpdateConfig()\r
+\r
+ \r
+\r
+}\r
TOSCA-Meta-File-Version: 1.0.0
CSAR-Version: 1.0
-Created-By: Thamlur Raju <TR00568434@TechMahindra.com>
+Created-By: Thamlur Raju <TR00568434@TechMahindra.com>, Sangeeta Bellara <sangeeta.bellara@t-systems.com>
Entry-Definitions: Definitions/5G_Core.json
Template-Name: 5G_Core
-Template-Version: 1.0.37
+Template-Version: 2.0.0
Template-Type: DEFAULT
-Template-Tags: Thamlur Raju, Malinconico Aniello Paolo, Vamshi Namilikonda, 5G_Core
+Template-Tags: Thamlur Raju, Malinconico Aniello Paolo,Vamshi, 5G_Core
{
"capability-data": [
- {
- "capability-name": "generate-name",
- "key-mapping": [
- {
- "output-key-mapping": [
- {
- "resource-name": "vf_module_name",
- "resource-value": "${vf-module-name}"
- }
- ],
- "payload": [
- {
- "param-name": "VF_MODULE_TYPE",
- "param-value": "vfmt"
- },
- {
- "param-name": "resource-name",
- "param-value": "vf_module_name"
- },
- {
- "param-name": "resource-value",
- "param-value": "${vf-module-name}"
- },
- {
- "param-name": "external-key",
- "param-value": "${vf-module-id}_vf-module-name"
- },
- {
- "param-name": "policy-instance-name",
- "param-value": "${vf-naming-policy}"
- },
- {
- "param-name": "naming-type",
- "param-value": "VF-MODULE"
- },
- {
- "param-name": "VNF_NAME",
- "param-value": "${vnf_name}"
- },
- {
- "param-name": "VF_MODULE_LABEL",
- "param-value": "${vf-module-label}"
- }
- ]
- }
- ]
- },
{
"capability-name": "aai-vf-module-put",
"key-mapping": [
"param-name": "config.supportedNssai.sNssai.snssai",
"param-value": "${fivegc0_snssai}"
}
-
-
+
+
]
}
{
"capability-data": [
- {
- "capability-name": "generate-name",
- "key-mapping": [
- {
- "output-key-mapping": [
- {
- "resource-name": "vf_module_name",
- "resource-value": "${vf-module-name}"
- }
- ],
- "payload": [
- {
- "param-name": "VF_MODULE_TYPE",
- "param-value": "vfmt"
- },
- {
- "param-name": "resource-name",
- "param-value": "vf_module_name"
- },
- {
- "param-name": "resource-value",
- "param-value": "${vf-module-name}"
- },
- {
- "param-name": "external-key",
- "param-value": "${vf-module-id}_vf-module-name"
- },
- {
- "param-name": "policy-instance-name",
- "param-value": "${vf-naming-policy}"
- },
- {
- "param-name": "naming-type",
- "param-value": "VF-MODULE"
- },
- {
- "param-name": "VNF_NAME",
- "param-value": "${vnf_name}"
- },
- {
- "param-name": "VF_MODULE_LABEL",
- "param-value": "${vf-module-label}"
- }
- ]
- }
- ]
- },
+
{
"capability-name": "aai-vf-module-put",
"key-mapping": [
"param-name": "vf-module-label",
"param-value": "${vf-module-label}"
},
-
+
{
"param-name": "k8s-rb-profile-name",
"param-value": "profile-${vf-module-id}"
"param-name": "k8s-rb-profile-namespace",
"param-value": "ns-${vf-module-id}"
},
-
+
{
"param-name": "fivegc0_snssai",
"param-value": "${fivegc0_snssai}"
{
"capability-data": [
- {
- "capability-name": "generate-name",
- "key-mapping": [
- {
- "output-key-mapping": [
- {
- "resource-name": "vf_module_name",
- "resource-value": "${vf-module-name}"
- }
- ],
- "payload": [
- {
- "param-name": "VF_MODULE_TYPE",
- "param-value": "vfmt"
- },
- {
- "param-name": "resource-name",
- "param-value": "vf_module_name"
- },
- {
- "param-name": "resource-value",
- "param-value": "${vf-module-name}"
- },
-
- {
- "param-name": "external-key",
- "param-value": "${vf-module-id}_vf-module-name"
- },
- {
- "param-name": "policy-instance-name",
- "param-value": "${vf-naming-policy}"
- },
- {
- "param-name": "naming-type",
- "param-value": "VF-MODULE"
- },
- {
- "param-name": "VNF_NAME",
- "param-value": "${vnf_name}"
- },
- {
- "param-name": "VF_MODULE_LABEL",
- "param-value": "${vf-module-label}"
- }
- ]
- }
- ]
- },
+
{
"capability-name": "aai-vf-module-put",
"key-mapping": [
"param-name": "vf-module-label",
"param-value": "${vf-module-label}"
},
-
-
+
+
{
"param-name": "vf-module-id",
"param-value": "${vf-module-id}"
"param-name": "k8s-rb-instance-release-name",
"param-value": "release-${vf-module-id}"
},
-
+
{
"param-name": "vf-module-model-customization-uuid",
"param-value": "${vf-module-model-customization-uuid}"
"param-name": "config.supportedNssai.sNssai.snssai",
"param-value": "${fivegc0_snssai}"
}
-
+
]
}
{
- "capability-data": [
- {
- "capability-name": "generate-name",
- "key-mapping": [
- {
- "output-key-mapping": [
- {
- "resource-name": "vnf_name",
- "resource-value": "${vnf_name}"
- }
- ],
- "payload": [
- {
- "param-name": "resource-name",
- "param-value": "vnf_name"
- },
- {
- "param-name": "resource-value",
- "param-value": "${vnf_name}"
- },
- {
- "param-name": "external-key",
- "param-value": "${vnf-id}_vnf_name"
- },
- {
- "param-name": "policy-instance-name",
- "param-value": "${vf-naming-policy}"
- },
- {
- "param-name": "naming-type",
- "param-value": "VNF"
- },
- {
- "param-name": "AIC_CLOUD_REGION",
- "param-value": "${aic-cloud-region}"
- }
- ]
- }
- ]
- }
- ],
+ "capability-data": [],
+
"resource-accumulator-resolved-data": [
{
"param-name": "vnf-id",
"param-name": "vf-naming-policy",
"param-value": "${vf-naming-policy}"
},
-
+
{
"param-name": "fivegc0_snssai",
"param-value": "${fivegc0_snssai}"