aboutsummaryrefslogtreecommitdiffstats
path: root/heat/vFW_CNF_CDS/templates/cba/Definitions
diff options
context:
space:
mode:
Diffstat (limited to 'heat/vFW_CNF_CDS/templates/cba/Definitions')
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/Definitions/artifact_types.json5
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json9
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/Definitions/node_types.json86
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/Definitions/resources_definition_types.json41
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json94
5 files changed, 141 insertions, 94 deletions
diff --git a/heat/vFW_CNF_CDS/templates/cba/Definitions/artifact_types.json b/heat/vFW_CNF_CDS/templates/cba/Definitions/artifact_types.json
index bf55ac53..77d0eb19 100644
--- a/heat/vFW_CNF_CDS/templates/cba/Definitions/artifact_types.json
+++ b/heat/vFW_CNF_CDS/templates/cba/Definitions/artifact_types.json
@@ -15,6 +15,11 @@
"file_ext": [
"vtl"
]
+ },
+ "artifact-k8sprofile-content": {
+ "description": "K8s Profile Folder Artifact",
+ "version": "1.0.0",
+ "derived_from": "tosca.artifacts.Implementation"
}
}
}
diff --git a/heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json b/heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json
index 2a534d4f..5f3a2c09 100644
--- a/heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json
+++ b/heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json
@@ -72,18 +72,23 @@
"version": "1.0.0",
"properties": {
"vpg-management-port": {
- "description": "SSH external port of ssh. When 0 ssh service will not be exposed",
+ "description": "SSH external port of optional ssh service for vPKG.",
"type": "string",
"default": "0"
},
"k8s-rb-profile-namespace": {
"description": "K8s namespace to create helm chart for specified profile",
- "type": "string"
+ "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"
},
+ "k8s-rb-profile-source": {
+ "description": "The source folder or file relative to 'Templates/k8s-profiles' folder",
+ "type": "string"
+ },
"private1-prefix-id": {
"description": "",
"required": false,
diff --git a/heat/vFW_CNF_CDS/templates/cba/Definitions/node_types.json b/heat/vFW_CNF_CDS/templates/cba/Definitions/node_types.json
index 253f9dc4..9ee224b5 100644
--- a/heat/vFW_CNF_CDS/templates/cba/Definitions/node_types.json
+++ b/heat/vFW_CNF_CDS/templates/cba/Definitions/node_types.json
@@ -5,8 +5,14 @@
"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"
}
},
"capabilities": {
@@ -27,8 +33,8 @@
"occurrence": {
"description": "Number of time to perform the resolution.",
"required": false,
- "type": "integer",
- "default": 1
+ "default": 1,
+ "type": "integer"
},
"store-result": {
"description": "Whether or not to store the output.",
@@ -46,8 +52,8 @@
"type": "boolean"
},
"artifact-prefix-names": {
- "description": "Template , Resource Assignment Artifact Prefix names",
"required": true,
+ "description": "Template , Resource Assignment Artifact Prefix names",
"type": "list",
"entry_schema": {
"type": "string"
@@ -79,6 +85,10 @@
"required": true,
"type": "string"
},
+ "resource-assignment-map": {
+ "required": true,
+ "type": "string"
+ },
"status": {
"required": true,
"type": "string"
@@ -153,6 +163,76 @@
},
"derived_from": "tosca.nodes.Component"
},
+ "component-k8s-profile-upload": {
+ "description": "This component is rendering and sending the k8s profile to the multicloud plugin.",
+ "version": "1.0.0",
+ "attributes": {
+ "statuses": {
+ "required": true,
+ "type": "json"
+ }
+ },
+ "capabilities": {
+ "component-node": {
+ "type": "tosca.capabilities.Node"
+ }
+ },
+ "interfaces": {
+ "K8sProfileUploadComponent": {
+ "operations": {
+ "process": {
+ "inputs": {
+ "k8s-rb-profile-name": {
+ "description": "K8s profile name",
+ "required": false,
+ "type": "string"
+ },
+ "k8s-rb-definition-name": {
+ "description": "K8s definition name",
+ "required": false,
+ "type": "string"
+ },
+ "k8s-rb-definition-version": {
+ "description": "Version of the definition",
+ "required": false,
+ "type": "string"
+ },
+ "k8s-rb-profile-namespace": {
+ "description": "a K8s namespace for the profile",
+ "required": false,
+ "type": "string"
+ },
+ "k8s-rb-profile-source": {
+ "description": "Source (tgz/folder) for the template in CBA",
+ "required": false,
+ "type": "string"
+ },
+ "artifact-prefix-names": {
+ "description": "Resource Assignment Artifact Prefix names",
+ "required": false,
+ "type": "list",
+ "entry_schema": {
+ "type": "string"
+ }
+ },
+ "resource-assignment-map": {
+ "description": "Holds resolved values for each artifact prefix eg. { vdns: { vnf-id: 123 } }",
+ "required": false,
+ "type": "json"
+ }
+ },
+ "outputs": {
+ "statuses": {
+ "required": true,
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "derived_from": "tosca.nodes.Component"
+ },
"source-capability": {
"description": "This is Component Resource Source Node Type",
"version": "1.0.0",
diff --git a/heat/vFW_CNF_CDS/templates/cba/Definitions/resources_definition_types.json b/heat/vFW_CNF_CDS/templates/cba/Definitions/resources_definition_types.json
index 4c7aa47b..63d83e44 100644
--- a/heat/vFW_CNF_CDS/templates/cba/Definitions/resources_definition_types.json
+++ b/heat/vFW_CNF_CDS/templates/cba/Definitions/resources_definition_types.json
@@ -267,26 +267,6 @@
"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"
- ]
- }
}
}
},
@@ -329,6 +309,25 @@
}
}
},
+ "k8s-rb-profile-source": {
+ "tags": "k8s, cnf, profile, k8s-rb-profile-source",
+ "name": "k8s-rb-profile-source",
+ "property": {
+ "description": "The source folder or file relative to 'Templates/k8s-profiles' folder",
+ "type": "string"
+ },
+ "group": "default",
+ "updated-by": "Rajewski, Lukasz <lukasz.rajewski@orange.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ }
+ }
+ },
"management-prefix-id": {
"tags": "management-prefix-id",
"name": "management-prefix-id",
@@ -927,7 +926,7 @@
"name": "vpg-management-port",
"property": {
"description": "vpg-management-port",
- "type": "string"
+ "type": "integer"
},
"group": "default",
"updated-by": "Rajewski, Lukasz <lukasz.rajewski@orange.com>",
diff --git a/heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json b/heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json
index 077bbc8e..3fa4e87e 100644
--- a/heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json
+++ b/heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json
@@ -2,11 +2,11 @@
"tosca_definitions_version": "controller_blueprint_1_0_0",
"metadata": {
"template_author": "Samuli Silvius <s.silvius@partner.samsung.com>",
- "author-email": "abdelmuhaimen.seaudi@orange.com",
+ "author-email": "lukasz.rajewski@orange.com",
"user-groups": "ADMIN, OPERATION",
"template_name": "vFW_CNF_CDS",
- "template_version": "1.0.45",
- "template_tags": "Samuli Silvius, vFW_CNF_CDS",
+ "template_version": "7.0.0",
+ "template_tags": "Samuli Silvius, Lukasz Rajewski, vFW_CNF_CDS",
"template_type": "DEFAULT"
},
"imports": [
@@ -33,30 +33,6 @@
"username": "admin",
"password": "admin"
},
- "multicloud-k8s-api": {
- "type": "basic-auth",
- "username": "admin",
- "password": "admin",
- "url": "http://multicloud-k8s:9015"
- },
- "profile-upload-properties": {
- "assignment-params": {
- "get_attribute": [
- "resource-assignment",
- "assignment-params"
- ]
- },
- "profile-modification-decision-data": {
- "get_input": "vpg-management-port"
- },
- "profile-artifacts": {
- "get_attribute": [
- "profile-modification",
- "assignment-params"
- ]
- },
- "api-access": "*multicloud-k8s-api"
- },
"config-deploy-properties": {
"resolution-key": {
"get_input": "resolution-key"
@@ -76,24 +52,12 @@
}
],
"on_success": [
- "profile-modification"
- ]
- },
- "profile-modification": {
- "description": "Profile Modification Resources",
- "target": "profile-modification",
- "activities": [
- {
- "call_operation": "ResourceResolutionComponent.process"
- }
- ],
- "on_success": [
"profile-upload"
]
},
"profile-upload": {
- "description": "Upload K8s Profile",
- "target": "profile-upload",
+ "description": "Generate and upload K8s Profile",
+ "target": "k8s-profile-upload",
"activities": [
{
"call_operation": "ComponentScriptExecutor.process"
@@ -220,45 +184,39 @@
}
}
},
- "profile-modification": {
- "type": "component-resource-resolution",
+ "k8s-profile-upload": {
+ "type": "component-k8s-profile-upload",
"interfaces": {
- "ResourceResolutionComponent": {
+ "K8sProfileUploadComponent": {
"operations": {
"process": {
"inputs": {
- "artifact-prefix-names": [
- "ssh-service"
- ]
+ "artifact-prefix-names": {
+ "get_input": "template-prefix"
+ },
+ "resource-assignment-map": {
+ "get_attribute": [
+ "resource-assignment",
+ "assignment-map"
+ ]
+ }
}
}
}
}
},
"artifacts": {
- "ssh-service-template": {
- "type": "artifact-template-velocity",
- "file": "Templates/k8s-profiles/ssh-service-template.vtl"
+ "vfw-cnf-cds-base-profile": {
+ "type": "artifact-k8sprofile-content",
+ "file": "Templates/k8s-profiles/vfw-cnf-cds-base-profile.tar.gz"
+ },
+ "vfw-cnf-cds-vpkg-profile": {
+ "type": "artifact-k8sprofile-content",
+ "file": "Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile"
},
- "ssh-service-mapping": {
+ "vfw-cnf-cds-vpkg-profile-mapping": {
"type": "artifact-mapping-resource",
- "file": "Templates/k8s-profiles/ssh-service-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"
- }
- }
- }
+ "file": "Templates/k8s-profiles/vfw-cnf-cds-vpkg-profile/ssh-service-mapping.json"
}
}
},