summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorJuhi Arora <juhi.arora1@bell.ca>2022-06-06 13:30:03 -0400
committerkuldipr <kuldip.rai@amdocs.com>2022-09-01 08:48:15 -0400
commit89c17ae2e3222b98450e7c8d17566cd76ecf113b (patch)
treed8ca903df5dd3c189d87aef3dac6065f22e1b303 /components
parente8e0087c6aea0bf9b2d3d17207574e8db84ba0f3 (diff)
CDS max-occurrence feature
As part of occurrence feature, one or more version of the resource resolution can be resolved. However, user did not have granular control in case the user wants to resolve a specific value once and never again. Max-Occurrence feature implements the granular control to be give the user an option to specify the max number of times a resource to be resolved. It is specified as part of mapping in a cba. Max-occurrence value of 0 or not specifying it explicitly denotes the current default behaviour of unlimited resoltions. If a user specify a particular max-occurrence value then the resource is resolved that many times in subsquent requests and never again once we reached the max-occurrence limit of resource resolutions. Issue-ID: CCSDK-3736 Change-Id: Ie18764a313530e36be14531d8c7b93bf54f0b651 Signed-off-by: kuldipr <kuldip.rai@amdocs.com>
Diffstat (limited to 'components')
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/activation-blueprint.json8
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/data_types.json6
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/maxoccurrence-mapping.json23
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Templates/maxoccurrence-template.vtl1
4 files changed, 38 insertions, 0 deletions
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/activation-blueprint.json b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/activation-blueprint.json
index 85a056c5e..c506ad05e 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/activation-blueprint.json
+++ b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/activation-blueprint.json
@@ -180,6 +180,14 @@
"type": "artifact-mapping-resource",
"file": "Definitions/another-mapping.json"
},
+ "maxoccurrence-template": {
+ "type": "artifact-template-velocity",
+ "file": "Templates/maxoccurrence-template.vtl"
+ },
+ "maxoccurrence-mapping": {
+ "type": "artifact-mapping-resource",
+ "file": "Definitions/maxoccurrence-mapping.json"
+ },
"notemplate-mapping": {
"type": "artifact-mapping-resource",
"file": "Definitions/notemplate-mapping.json"
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/data_types.json b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/data_types.json
index 6d771cd68..94c587af7 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/data_types.json
+++ b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/data_types.json
@@ -51,6 +51,12 @@
"vnf_name": {
"required": true,
"type": "string"
+ },
+ "firmware-version": {
+ "type" : "string"
+ },
+ "ip-address": {
+ "type" : "string"
}
},
"derived_from": "tosca.datatypes.Dynamic"
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/maxoccurrence-mapping.json b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/maxoccurrence-mapping.json
new file mode 100644
index 000000000..729488520
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/maxoccurrence-mapping.json
@@ -0,0 +1,23 @@
+[
+ {
+ "name": "firmware-version",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "input-source",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "ip-address",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "max-occurrence": 1,
+ "dictionary-name": "input-source",
+ "dictionary-source": "input",
+ "dependencies": []
+ }
+] \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Templates/maxoccurrence-template.vtl b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Templates/maxoccurrence-template.vtl
new file mode 100644
index 000000000..9a9fc27eb
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Templates/maxoccurrence-template.vtl
@@ -0,0 +1 @@
+This is maxoccurrence Velocity Template \ No newline at end of file