Uploaded image for project: 'Common Controller SDK'
  1. Common Controller SDK
  2. CCSDK-422

TOSCA Spec Generation from Controller Blueprints for Self Service API definitions

XMLWordPrintable

      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

      GET : http://127.0.0.1:8081/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0

      {
      "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":

      { "required": true, "type": "dt-resource-assignment-properties" }

      },
      "outputs": {
      "response-property":

      { "type": "string", "value": "executed" }

      ,
      "template-properties": {
      "type": "json",
      "value":

      { "get_attribute": [ "resource-assignment", "assignment-params" ] }

      }
      }
      },
      "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":

      { "required": true, "type": "string" }

      ,
      "service-instance-id":

      { "required": true, "type": "string" }

      ,
      "vnf-id":

      { "required": true, "type": "string" }

      ,
      "action-name":

      { "required": true, "type": "string" }

      ,
      "scope-type":

      { "required": true, "type": "string" }

      ,
      "hostname":

      { "required": true, "type": "string" }

      ,
      "vnf_name":

      { "required": true, "type": "string" }

      },
      "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":

      { "description": "Dynamic PropertyDefinition for workflow(resource-assignment).", "required": true, "type": "dt-resource-assignment-properties" }

      },
      "outputs": {
      "meshed-template": {
      "type": "json",
      "value":

      { "get_attribute": [ "resource-assignment", "assignment-params" ] }

      }
      }
      },
      "dataTypes": {
      "dt-resource-assignment-properties": {
      "description": "Dynamic DataType definition for workflow(resource-assignment).",
      "version": "1.0.0",
      "properties": {
      "vfw_interface_ip":

      { "type": "dt-netbox-ip", "input-param": true }

      ,
      "interface-description":

      { "type": "string", "input-param": true }

      ,
      "vf-module-type":

      { "type": "string", "input-param": true }

      ,
      "vf-module-number":

      { "type": "string", "default": "3" }

      ,
      "prefix-id":

      { "type": "integer", "input-param": true, "default": 6 }

      },
      "derived_from": "tosca.datatypes.Dynamic"
      },
      "dt-netbox-ip": {
      "description": "This is Netbox IP Data Type",
      "version": "1.0.0",
      "properties": {
      "address":

      { "required": true, "type": "string", "input-param": true }

      ,
      "id":

      { "required": true, "type": "integer" }

      },
      "derived_from": "tosca.datatypes.Root"
      }
      }
      }

            janani janani
            brindasanthm brindasanthm
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: