-
Story
-
Resolution: Done
-
Medium
-
None
-
El Alto Sprint 3
User can generate API spec ( TOSCA) from Blueprint processor definitions.
Blueprint processor micro service should expose an API to generate API spec for given Blueprint name and blueprint version and optional Workflow action.
By default Spec generation is part of the enrichment process .
Spec generation may use template engine / Specific Model Generator API
APIs:
Get Workflow List
{
"blueprintName": "baseconfiguration",
"version": "1.0.0",
"workflows": [
"resource-assignment",
"activate",
"activate-restconf",
"activate-cli",
"assign-activate",
"imperative-test-wf"
]
}
Get Workflow Info:
REQ:
POST : http://127.0.0.1:8081/api/v1/blueprint-model/workflow-model
{
"blueprintName" : "baseconfiguration",
"version" : "1.0.0",
"returnContent" : "json",
"workflowName" : "resource-assignment",
"specType" : "TOSCA"
}
RES:
{
"blueprintName": "baseconfiguration",
"version": "1.0.0",
"workFlowData": {
"workFlowName": "resource-assignment",
"inputs": {
"resource-assignment-properties":
},
"outputs": {
"response-property":
,
"template-properties": {
"type": "json",
"value":
}
}
},
"dataTypes": {
"dt-resource-assignment-properties": {
"description": "This is Dynamically generated data type for workflow activate",
"version": "1.0.0",
"metadata": null,
"attributes": null,
"properties": {
"request-id":
,
"service-instance-id":
,
"vnf-id":
,
"action-name":
,
"scope-type":
,
"hostname":
,
"vnf_name":
},
"constraints": null,
"derived_from": "tosca.datatypes.Dynamic"
}
}
}
UPDATED OUTPUT AFTER INPUT PARAM ADDITION:
"blueprintName": "golden",
"version": "1.0.0",
"workFlowData": {
"workFlowName": "resource-assignment",
"inputs": {
"resource-assignment-properties":
},
"outputs": {
"meshed-template": {
"type": "json",
"value":
}
}
},
"dataTypes": {
"dt-resource-assignment-properties": {
"description": "Dynamic DataType definition for workflow(resource-assignment).",
"version": "1.0.0",
"properties": {
"vfw_interface_ip":
,
"interface-description":
,
"vf-module-type":
,
"vf-module-number":
,
"prefix-id":
},
"derived_from": "tosca.datatypes.Dynamic"
},
"dt-netbox-ip": {
"description": "This is Netbox IP Data Type",
"version": "1.0.0",
"properties": {
"address":
,
"id":
},
"derived_from": "tosca.datatypes.Root"
}
}
}
1.
|
Add OpenSpec3 API Generator | Closed | brindasanthm |