major update for simplest and working example
[doc.git] / docs / guides / onap-user / design / parameter_resolution / ubuntu_example / curls_resource_dictionary.txt
1
2 HERE AFTER A REQUEST TO ADD RESOURCE IN CDS RESOURCE DICTIONARY
3 WE ADD a radius_test_user parameter with 3 methods to resolve that parameter: input, default, sdnc
4
5
6 curl -k 'https://cds-ui:30497/resourcedictionary/save' -X POST -H 'Content-type: application/json' \
7 -d '{
8    "name": "radius_test_user",
9    "tags": "radius_test_user",
10    "data_type": "string",
11    "description": "radius_test_user",
12    "entry_schema": "string",
13    "updatedBy": "Seaudi, Abdelmuhaimen <abdelmuhaimen.seaudi@orange.com>",
14    "definition": {
15       "tags": "radius_test_user",
16       "name": "radius_test_user",
17       "property": {
18          "description": "radius_test_user",
19          "type": "string"
20       },
21       "updated-by": "Seaudi, Abdelmuhaimen <abdelmuhaimen.seaudi@orange.com>",
22       "sources": {
23          "input": {
24             "type": "source-input"
25          },
26          "default": {
27             "type": "source-default",
28             "properties": {}
29          },
30          "sdnc": {
31             "type": "source-rest",
32             "properties": {
33                "verb": "GET",
34                "type": "JSON",
35                "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/radius_test_user",
36                "path": "/param/0/value",
37                "input-key-mapping": {
38                   "service-instance-id": "service-instance-id",
39                   "vnf-id": "vnf-id"
40                },
41                "output-key-mapping": {
42                   "radius_test_user": "value"
43                },
44                "key-dependencies": ["service-instance-id",
45                "vnf-id"]
46             }
47          }
48       }
49    }
50 }'