POST /api/catalog/v1/packages
request:
{
csarId:"" #uuid in sdc
}
response: #HTTP_202_ACCEPTED successful
202
POST /api/catalog/v1/parser
request:
{
csarId:"" #uuid in sdc
input: "........"
...
Table of Contents | ||
---|---|---|
|
API List
The final generic parser APIs link: Generic Parser API_v1.yaml
Parse API Example
Code Block | ||
---|---|---|
| ||
curl -X POST \
http://127.0.0.1:8000/api/parser/v1/parser \
-H 'Content-Type: application/json' \
-d '{
"csarId": "0734e398-a427-49f2-9abe-de8eb02542ad",
"inputs": "",
"packageType": "Service"
}' |
- Response Design Example
response: #HTTP_202_ACCEPTED successful
Elite soft json viewer | ||||
---|---|---|---|---|
| ||||
{ "nodeTemplates":[ { "requirements":[], "name":"", "description":"", "capabilities":[], "nodeType":"", "properties":{}, "metadata":{} } ], "inputs":{}, "description":"", "metadata":{} } |
example:
Elite soft json viewer | ||||
---|---|---|---|---|
| ||||
{ "nodeTemplates":[ { "requirements":[ { "lbcpd_om.virtual_link":{ "capability":"virtual_linkable", "node":"OamNet" } }, { "lbcpd_sip.virtual_link":{ "capability":"virtual_linkable", "node":"ServiceNet" } } ], "name":"test", "description":"", "capabilities":{ "cscf.virtual_compute":{ "properties":{ "virtual_cpu":{ "num_virtual_cpu":8 }, "virtual_memory":{ "virtual_mem_size":"24G" } } } }, "nodeType":"org.openecomp.resource.vf.test", "properties":{ "nf_type":"test", "nf_naming":{ "ecomp_generated_naming":true }, "availability_zone_max_count":"1", "multi_stage_design":"false" }, "metadata":{ "category":"Generic", "subcategory":"Network Elements", "UUID":"8612efa5-9df9-43ef-8e76-5a3cca97a15e", "invariantUUID":"2ed01e73-2a23-4717-a7fe-8d067ff6bb87", "name":"test", "customizationUUID":"b3cf8a5a-7fe9-435a-ab8e-d413f88a2f32", "resourceVendorRelease":"1.0", "version":"1.0", "resourceVendor":"onap", "resourceVendorModelNumber":"", "type":"VF", "description":"test" } } ], "inputs":{ "cpus":{ "type":"integer", "description":"Number of CPUs for the server.", "constraints":[ { "valid_values":[ 1, 2, 4, 8 ] } ] } }, "description":"", "metadata":{ "category":"Network Service", "serviceType":"", "description":"test", "serviceRole":"", "type":"Service", "environmentContext":"General_Revenue-Bearing", "serviceEcompNaming":true, "UUID":"3933006e-e87b-4a64-aedb-6358fcd67f0d", "ecompGeneratedNaming":true, "invariantUUID":"19943f91-1dc1-4a8b-85bf-40a762f4803a", "namingPolicy":"", "name":"test" } } |
...