aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/resources/tosca
diff options
context:
space:
mode:
authorVidyashree-Huawei <vidyashree.rama@huawei.com>2020-03-04 19:22:08 +0530
committerVidyashree-Huawei <vidyashree.rama@huawei.com>2020-03-04 19:22:34 +0530
commit3121b5bee2e70b1f753f9988344d41f3132edf69 (patch)
treecdca5bd22e721efd8cb88be1d5689f54fa4226e8 /src/test/resources/tosca
parentf0e00e7c9ea8dd15a4aacdd880aa648539caf087 (diff)
CLAMP-CDS integration to display all CDS actions for blueprint in CL
CLAMP-CDS integration to display all CDS actions for blueprint in CL Change-Id: I18b972b8952e5de9ac8e39d6c9cc4ecba0ec9b02 Issue-ID: CLAMP-491 Signed-off-by: Vidyashree-Huawei <vidyashree.rama@huawei.com>
Diffstat (limited to 'src/test/resources/tosca')
-rw-r--r--src/test/resources/tosca/model-properties.json86
-rw-r--r--src/test/resources/tosca/operational-policy-json-schema.json240
-rw-r--r--src/test/resources/tosca/operational-policy-payload.yaml16
-rw-r--r--src/test/resources/tosca/operational-policy-properties.json16
-rw-r--r--src/test/resources/tosca/resource-details.json86
5 files changed, 401 insertions, 43 deletions
diff --git a/src/test/resources/tosca/model-properties.json b/src/test/resources/tosca/model-properties.json
index e41471b1..c405964e 100644
--- a/src/test/resources/tosca/model-properties.json
+++ b/src/test/resources/tosca/model-properties.json
@@ -32,7 +32,91 @@
"UUID": "b4c4f3d7-929e-4b6d-a1cd-57e952ddc3e6",
"version": "1.0",
"resourceVendorRelease": "1.0",
- "customizationUUID": "465246dc-7748-45f4-a013-308d92922552"
+ "customizationUUID": "465246dc-7748-45f4-a013-308d92922552",
+ "controllerProperties": {
+ "sdnc_model_name": "baseconfiguration",
+ "sdnc_model_version": "1.0.0",
+ "workflows": {
+ "resource-assignment": {
+ "inputs": {
+ "resource-assignment-properties": {
+ "request-id": "",
+ "service-instance-id": "",
+ "vnf-id": "",
+ "action-name": "",
+ "scope-type": "",
+ "hostname": "",
+ "vnf_name": ""
+ }
+ }
+ },
+ "activate": {
+ "inputs": {
+ "resource-assignment-properties": {
+ "request-id": "",
+ "service-instance-id": "",
+ "vnf-id": "",
+ "action-name": "",
+ "scope-type": "",
+ "hostname": "",
+ "vnf_name": ""
+ }
+ }
+ },
+ "activate-restconf": {
+ "inputs": {
+ "resource-assignment-properties": {
+ "request-id": "",
+ "service-instance-id": "",
+ "vnf-id": "",
+ "action-name": "",
+ "scope-type": "",
+ "hostname": "",
+ "vnf_name": ""
+ }
+ }
+ },
+ "activate-cli": {
+ "inputs": {
+ "resource-assignment-properties": {
+ "request-id": "",
+ "service-instance-id": "",
+ "vnf-id": "",
+ "action-name": "",
+ "scope-type": "",
+ "hostname": "",
+ "vnf_name": ""
+ }
+ }
+ },
+ "assign-activate": {
+ "inputs": {
+ "resource-assignment-properties": {
+ "request-id": "",
+ "service-instance-id": "",
+ "vnf-id": "",
+ "action-name": "",
+ "scope-type": "",
+ "hostname": "",
+ "vnf_name": ""
+ }
+ }
+ },
+ "imperative-test-wf": {
+ "inputs": {
+ "resource-assignment-properties": {
+ "request-id": "",
+ "service-instance-id": "",
+ "vnf-id": "",
+ "action-name": "",
+ "scope-type": "",
+ "hostname": "",
+ "vnf_name": ""
+ }
+ }
+ }
+ }
+ }
}
},
"CR": {
diff --git a/src/test/resources/tosca/operational-policy-json-schema.json b/src/test/resources/tosca/operational-policy-json-schema.json
index d6870dc9..b43f6f9d 100644
--- a/src/test/resources/tosca/operational-policy-json-schema.json
+++ b/src/test/resources/tosca/operational-policy-json-schema.json
@@ -87,7 +87,6 @@
"basicCategoryTitle": "recipe",
"required": [
"id",
- "recipe",
"retry",
"timeout",
"actor",
@@ -105,20 +104,6 @@
"title": "Policy ID",
"type": "string"
},
- "recipe": {
- "title": "Recipe",
- "type": "string",
- "enum": [
- "Restart",
- "Rebuild",
- "Migrate",
- "Health-Check",
- "ModifyConfig",
- "VF Module Create",
- "VF Module Delete",
- "Reroute"
- ]
- },
"retry": {
"default": "0",
"title": "Number of Retry",
@@ -132,21 +117,222 @@
"format": "number"
},
"actor": {
+ "type": "object",
"title": "Actor",
- "type": "string",
- "enum": [
- "APPC",
- "SO",
- "VFC",
- "SDNC",
- "SDNR"
+ "anyOf": [
+ {
+ "title": "APPC",
+ "properties": {
+ "actor": {
+ "title": "actor",
+ "type": "string",
+ "default": "APPC",
+ "options": {
+ "hidden": true
+ }
+ },
+ "type": {
+ "title": "recipe",
+ "type": "string",
+ "default": "",
+ "enum": [
+ "Restart",
+ "Rebuild",
+ "Migrate",
+ "Health-Check",
+ "ModifyConfig"
+ ]
+ },
+ "payload": {
+ "title": "Payload (YAML)",
+ "type": "string",
+ "format": "textarea"
+ }
+ }
+ },
+ {
+ "title": "SO",
+ "properties": {
+ "actor": {
+ "title": "actor",
+ "type": "string",
+ "default": "SO",
+ "options": {
+ "hidden": true
+ }
+ },
+ "type": {
+ "title": "recipe",
+ "type": "string",
+ "default": "",
+ "enum": [
+ "VF Module Create",
+ "VF Module Delete"
+ ]
+ },
+ "payload": {
+ "title": "Payload (YAML)",
+ "type": "string",
+ "format": "textarea"
+ }
+ }
+ },
+ {
+ "title": "SDNC",
+ "properties": {
+ "actor": {
+ "title": "actor",
+ "type": "string",
+ "default": "SDNC",
+ "options": {
+ "hidden": true
+ }
+ },
+ "type": {
+ "title": "recipe",
+ "type": "string",
+ "default": "",
+ "enum": [
+ "Reroute",
+ "BandwidthOnDemand"
+ ]
+ },
+ "payload": {
+ "title": "Payload (YAML)",
+ "type": "string",
+ "format": "textarea"
+ }
+ }
+ },
+ {
+ "title": "VFC",
+ "properties": {
+ "actor": {
+ "title": "actor",
+ "type": "string",
+ "default": "VFC",
+ "options": {
+ "hidden": true
+ }
+ },
+ "type": {
+ "title": "recipe",
+ "type": "string",
+ "required": [
+ "payload"
+ ],
+ "default": "",
+ "enum": [
+ "ModifyConfig"
+ ]
+ },
+ "payload": {
+ "title": "Payload (YAML)",
+ "type": "string",
+ "format": "textarea"
+ }
+ }
+ },
+ {
+ "title": "CDS",
+ "properties": {
+ "actor": {
+ "title": "actor",
+ "type": "string",
+ "default": "CDS",
+ "options": {
+ "hidden": true
+ }
+ },
+ "type": {
+ "title": "recipe",
+ "type": "object",
+ "required": [
+ "payload"
+ ],
+ "anyOf": [
+ {
+ "title": "user-defined",
+ "properties": {
+ "type": {
+ "title": "Payload (YAML)",
+ "type": "string",
+ "format": "textarea"
+ }
+ }
+ },
+ {
+ "title": "resource-assignment",
+ "properties": {
+ "type": {
+ "title": "Payload (YAML)",
+ "type": "string",
+ "default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''",
+ "format": "textarea"
+ }
+ }
+ },
+ {
+ "title": "activate",
+ "properties": {
+ "type": {
+ "title": "Payload (YAML)",
+ "type": "string",
+ "default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''",
+ "format": "textarea"
+ }
+ }
+ },
+ {
+ "title": "activate-restconf",
+ "properties": {
+ "type": {
+ "title": "Payload (YAML)",
+ "type": "string",
+ "default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''",
+ "format": "textarea"
+ }
+ }
+ },
+ {
+ "title": "activate-cli",
+ "properties": {
+ "type": {
+ "title": "Payload (YAML)",
+ "type": "string",
+ "default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''",
+ "format": "textarea"
+ }
+ }
+ },
+ {
+ "title": "assign-activate",
+ "properties": {
+ "type": {
+ "title": "Payload (YAML)",
+ "type": "string",
+ "default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''",
+ "format": "textarea"
+ }
+ }
+ },
+ {
+ "title": "imperative-test-wf",
+ "properties": {
+ "type": {
+ "title": "Payload (YAML)",
+ "type": "string",
+ "default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''",
+ "format": "textarea"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
]
},
- "payload": {
- "title": "Payload (YAML)",
- "type": "string",
- "format": "textarea"
- },
"success": {
"default": "final_success",
"title": "When Success",
diff --git a/src/test/resources/tosca/operational-policy-payload.yaml b/src/test/resources/tosca/operational-policy-payload.yaml
index ed03842f..553a8afd 100644
--- a/src/test/resources/tosca/operational-policy-payload.yaml
+++ b/src/test/resources/tosca/operational-policy-payload.yaml
@@ -14,13 +14,8 @@ topology_template:
controlLoopName: LOOP_ASJOy_v1_0_ResourceInstanceName1_tca
policies:
- id: policy1
- recipe: Restart
retry: '0'
timeout: '0'
- actor: APPC
- payload:
- requestParameters: '{"usePreload":true,"userParams":[]}'
- configurationParameters: '[{"ip-addr":"$.vf-module-topology.vf-module-parameters.param[10].value","oam-ip-addr":"$.vf-module-topology.vf-module-parameters.param[15].value","enabled":"$.vf-module-topology.vf-module-parameters.param[22].value"}]'
success: final_success
failure: policy2
failure_timeout: final_failure_timeout
@@ -30,12 +25,14 @@ topology_template:
target:
type: VNF
resourceID: vLoadBalancerMS
+ actor: APPC
+ recipe: Restart
+ payload:
+ requestParameters: '{"usePreload":true,"userParams":[]}'
+ configurationParameters: '[{"ip-addr":"$.vf-module-topology.vf-module-parameters.param[10].value","oam-ip-addr":"$.vf-module-topology.vf-module-parameters.param[15].value","enabled":"$.vf-module-topology.vf-module-parameters.param[22].value"}]'
- id: policy2
- recipe: VF Module Create
retry: '0'
timeout: '0'
- actor: SO
- payload: ''
success: final_success
failure: final_failure
failure_timeout: final_failure_timeout
@@ -50,3 +47,6 @@ topology_template:
modelName: Vloadbalancerms..vpkg..module-1
modelVersion: '1'
modelCustomizationId: 1bffdc31-a37d-4dee-b65c-dde623a76e52
+ actor: SO
+ recipe: VF Module Create
+ payload: ''
diff --git a/src/test/resources/tosca/operational-policy-properties.json b/src/test/resources/tosca/operational-policy-properties.json
index ac1314ec..a2de76a9 100644
--- a/src/test/resources/tosca/operational-policy-properties.json
+++ b/src/test/resources/tosca/operational-policy-properties.json
@@ -8,12 +8,14 @@
},
"policies": [
{
+ "actor": {
+ "actor": "APPC",
+ "type": "Restart",
+ "payload": "requestParameters: '{\"usePreload\":true,\"userParams\":[]}'\r\nconfigurationParameters: '[{\"ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[10].value\",\"oam-ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[15].value\",\"enabled\":\"$.vf-module-topology.vf-module-parameters.param[22].value\"}]'"
+ },
"id": "policy1",
- "recipe": "Restart",
"retry": "0",
"timeout": "0",
- "actor": "APPC",
- "payload": "requestParameters: '{\"usePreload\":true,\"userParams\":[]}'\r\nconfigurationParameters: '[{\"ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[10].value\",\"oam-ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[15].value\",\"enabled\":\"$.vf-module-topology.vf-module-parameters.param[22].value\"}]'",
"success": "final_success",
"failure": "policy2",
"failure_timeout": "final_failure_timeout",
@@ -26,12 +28,14 @@
}
},
{
+ "actor": {
+ "actor": "SO",
+ "type": "VF Module Create",
+ "payload": ""
+ },
"id": "policy2",
- "recipe": "VF Module Create",
"retry": "0",
"timeout": "0",
- "actor": "SO",
- "payload": "",
"success": "final_success",
"failure": "final_failure",
"failure_timeout": "final_failure_timeout",
diff --git a/src/test/resources/tosca/resource-details.json b/src/test/resources/tosca/resource-details.json
index 7b53f397..a638c350 100644
--- a/src/test/resources/tosca/resource-details.json
+++ b/src/test/resources/tosca/resource-details.json
@@ -16,7 +16,91 @@
"UUID": "b4c4f3d7-929e-4b6d-a1cd-57e952ddc3e6",
"version": "1.0",
"resourceVendorRelease": "1.0",
- "customizationUUID": "465246dc-7748-45f4-a013-308d92922552"
+ "customizationUUID": "465246dc-7748-45f4-a013-308d92922552",
+ "controllerProperties": {
+ "sdnc_model_name": "baseconfiguration",
+ "sdnc_model_version": "1.0.0",
+ "workflows": {
+ "resource-assignment": {
+ "inputs": {
+ "resource-assignment-properties": {
+ "request-id": "",
+ "service-instance-id": "",
+ "vnf-id": "",
+ "action-name": "",
+ "scope-type": "",
+ "hostname": "",
+ "vnf_name": ""
+ }
+ }
+ },
+ "activate": {
+ "inputs": {
+ "resource-assignment-properties": {
+ "request-id": "",
+ "service-instance-id": "",
+ "vnf-id": "",
+ "action-name": "",
+ "scope-type": "",
+ "hostname": "",
+ "vnf_name": ""
+ }
+ }
+ },
+ "activate-restconf": {
+ "inputs": {
+ "resource-assignment-properties": {
+ "request-id": "",
+ "service-instance-id": "",
+ "vnf-id": "",
+ "action-name": "",
+ "scope-type": "",
+ "hostname": "",
+ "vnf_name": ""
+ }
+ }
+ },
+ "activate-cli": {
+ "inputs": {
+ "resource-assignment-properties": {
+ "request-id": "",
+ "service-instance-id": "",
+ "vnf-id": "",
+ "action-name": "",
+ "scope-type": "",
+ "hostname": "",
+ "vnf_name": ""
+ }
+ }
+ },
+ "assign-activate": {
+ "inputs": {
+ "resource-assignment-properties": {
+ "request-id": "",
+ "service-instance-id": "",
+ "vnf-id": "",
+ "action-name": "",
+ "scope-type": "",
+ "hostname": "",
+ "vnf_name": ""
+ }
+ }
+ },
+ "imperative-test-wf": {
+ "inputs": {
+ "resource-assignment-properties": {
+ "request-id": "",
+ "service-instance-id": "",
+ "vnf-id": "",
+ "action-name": "",
+ "scope-type": "",
+ "hostname": "",
+ "vnf_name": ""
+ }
+ }
+ }
+ }
+ }
}
},
"CR": {