From c8c4cd151732fa6e9be45f403244de307456b923 Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh(bs2796)" Date: Thu, 6 Sep 2018 20:18:24 +0000 Subject: Controller Blueprints Microservice Add Blueprint Dervied from NodeType, Requirement Definitions and Assignments validations. Change-Id: I1cc643b5a83c5a707c8e3ae1342a439f122da55e Issue-ID: CCSDK-484 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) --- .../Definitions/activation-blueprint.json | 396 ++++++++++++--------- .../model_type/node_type/tosca.nodes.Artifact.json | 5 + 2 files changed, 227 insertions(+), 174 deletions(-) create mode 100644 components/core/load/model_type/node_type/tosca.nodes.Artifact.json (limited to 'components/core/load') diff --git a/components/core/load/blueprints/baseconfiguration/Definitions/activation-blueprint.json b/components/core/load/blueprints/baseconfiguration/Definitions/activation-blueprint.json index 7b9b7dd71..3eb4fedcb 100644 --- a/components/core/load/blueprints/baseconfiguration/Definitions/activation-blueprint.json +++ b/components/core/load/blueprints/baseconfiguration/Definitions/activation-blueprint.json @@ -2,7 +2,7 @@ "metadata": { "template_author": "Brinda Santh Muthuramalingam", "author-email": "brindasanth@gmail.com", - "user-groups" : "ADMIN, OPERATION", + "user-groups": "ADMIN, OPERATION", "template_name": "baseconfiguration", "template_version": "1.0.0", "template_tags": "brinda, tosca" @@ -24,121 +24,125 @@ "hostname": { "required": true, "type": "string" + }, + "template_name": { + "required": true, + "type": "string" + }, + "template_version": { + "required": true, + "type": "string" } }, "node_templates": { - "activate-process": { - "type": "bpmn-activate", - "properties": { - "process-name": { "get_input" : "action-name" }, - "version" : { "get_property" : ["SELF", "process-name"] }, - "content": { "get_artifact" : ["SELF", "activate-process"] } - }, - "artifacts": { - "activate-process": { - "type": "artifact-bpmn-camunda", - "file": "Plans/ActivateProcess.bpmn" - } - } - }, - "resource-assignment": { - "type": "component-resource-assignment", - "properties":{ - "request-id": "1234" + "resource-assignment-ra-component": { + "capabilities": { + "component-node": {} }, "interfaces": { - "DefaultComponentNode": { + "org-onap-sdnc-config-assignment-service-ConfigAssignmentNode": { "operations": { "process": { "inputs": { - "action-name": { "get_input" : "action-name" }, + "template-names": [ + "base-config-template", + "licence-template" + ], + "action-name": { + "get_input": "action-name" + }, + "template-name": { + "get_input": "template_name" + }, + "template-version": { + "get_input": "template_version" + }, "resource-type": "vnf-type", - "request-id": { "get_input" : "request-id" }, - "resource-id": { "get_input" : "hostname" }, - "template-content": { "get_artifact" : ["SELF", "baseconfig-template"] }, - "mapping-content": { "get_artifact" : ["SELF", "baseconfig-mapping"] } + "request-id": { + "get_input": "request-id" + }, + "resource-id": { + "get_input": "hostname" + } }, "outputs": { - "resource-assignment-params": "", - "status": "" + "resource-assignment-params": "success", + "status": "status" } } } } }, - "artifacts": { - "baseconfig-template": { - "type": "artifact-template-velocity", - "file": "Templates/baseconfig-template.vtl" + "type": "component-resource-assignment" + }, + "resource-assignment-action": { + "properties": { + "mode": "sync", + "version": { + "get_input": "template_version" }, - "baseconfig-mapping": { - "type": "artifact-mapping-resource", - "file": "Mappings/baseconfig-mapping.json" + "is-start-flow": false + }, + "requirements": { + "component-dependency": { + "capability": "component-node", + "node": "resource-assignment-ra-component", + "relationship": "tosca.relationships.DependsOn" + } + }, + "capabilities": { + "dg-node": {}, + "content": { + "properties": { + "type": "json" + } } - } - }, - "resource-assignment-py": { - "type": "component-resource-assignment", - "properties":{ - "request-id": "1234" }, "interfaces": { - "DefaultComponentNode": { + "CONFIG": { "operations": { - "process": { - "implementation" :{ - "primary" : "component-script" - }, + "ResourceAssignment": { "inputs": { - "action-name": { "get_input" : "action-name" } - }, - "outputs": { - "resource-assignment-params": "", - "status": "" + "params": [] } } } } }, - "artifacts": { - "component-script": { - "type": "artifact-script-python", - "file": "Scripts/baseconfig-template.vtl" - } - } + "type": "dg-resource-assignment" } }, - "workflows":{ - "activate-process":{ - "steps" : { - "call-resource-assignment" : { - "description" : "Invoke Resource Assignment Component", - "target" : "resource-assignment", - "activities" : [ - { - "call_operation": "ResourceAssignmentNode.process" - } - ], - "on_success" : [ - "download-baseconfig" - ] - }, - "download-baseconfig" : { - "description" : "Call Download Base Config Component", - "target" : "activate-netconf", - "activities" : [ + "workflows": { + "activate-process": { + "steps": { + "call-resource-assignment": { + "description": "Invoke Resource Assignment Component", + "target": "resource-assignment", + "activities": [ + { + "call_operation": "ResourceAssignmentNode.process" + } + ], + "on_success": [ + "download-baseconfig" + ] + }, + "download-baseconfig": { + "description": "Call Download Base Config Component", + "target": "activate-netconf", + "activities": [ { "call_operation": "NetconfTransactionNode.process" } ], - "on_success" : [ + "on_success": [ "download-licence" ] }, - "download-licence" : { - "description" : "Call Download Licence Component", - "target" : "activate-netconf", - "activities" : [ + "download-licence": { + "description": "Call Download Licence Component", + "target": "activate-netconf", + "activities": [ { "call_operation": "NetconfTransactionNode.process" } @@ -199,106 +203,119 @@ } }, "node_types": { - "bpmn-activate": { - "description": "This is BPMN Activate node type", + "dg-resource-assignment": { + "description": "This is Resource Assignment Directed Graph", "version": "1.0.0", "properties": { - "content": { + "mode": { "required": false, - "type": "string" - }, - "process-name": { - "required": false, - "type": "string" + "type": "string", + "default": "sync" }, "version": { "required": false, "type": "string", - "default" : "LATEST" + "default": "LATEST" + }, + "is-start-flow": { + "required": false, + "type": "boolean", + "default": false } }, - "derived_from": "tosca.nodes.Component" - }, - "tosca.nodes.Component": { - "description": "This is Resource Assignment Component API", - "version": "1.0.0", - "properties": { - "type": { - "description": "Request Id used to store the generated configuration, in the database along with the template-name", - "required": false, - "type": "string" + "capabilities": { + "dg-node": { + "type": "tosca.capabilities.Node" + }, + "content": { + "type": "tosca.capability.Content", + "properties": { + "type": { + "required": false, + "type": "string", + "default": "json" + }, + "content": { + "required": false, + "type": "string" + } + } + } + }, + "requirements": { + "component-dependency": { + "capability": "component-node", + "node": "component-resource-assignment", + "relationship": "tosca.relationships.DependsOn" } }, "interfaces": { - "DefaultOperation": { + "CONFIG": { "operations": { - "validate": { + "ResourceAssignment": { "inputs": { - "action-name": { - "description": "validate for action", + "params": { "required": false, - "type": "string" + "type": "list", + "entry_schema": { + "type": "datatype-property" + } } } } } } }, - "artifacts" :{ - "component-jar": { - "description": "Component Jar", - "type": "artifact-component-jar", - "file": "Component/basecomponent.jar" - } - }, - "derived_from": "tosca.nodes.Root" - }, - "tosca.nodes.component.Python": { - "description": "This is Resource Assignment Python Component API", - "version": "1.0.0", - "derived_from": "tosca.nodes.Root" + "derived_from": "tosca.nodes.DG" }, "component-resource-assignment": { "description": "This is Resource Assignment Component API", "version": "1.0.0", - "properties": { - "request-id": { - "description": "Request Id used to store the generated configuration, in the database along with the template-name", - "required": true, - "type": "string" + "capabilities": { + "component-node": { + "type": "tosca.capabilities.Node" } }, "interfaces": { - "DefaultComponentNode": { + "org-onap-sdnc-config-assignment-service-ConfigAssignmentNode": { "operations": { "process": { "inputs": { "action-name": { - "description": "Recipe Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority", - "required": false, + "description": "Action Name of the process", + "required": true, "type": "string" }, - "resource-type": { - "required": false, + "template-name": { + "description": "Service Template Name.", + "required": true, "type": "string" }, - "request-id": { - "description": "Request Id used to store the generated configuration, in the database along with the template-name", + "template-version": { + "description": "Service Template Version.", "required": true, "type": "string" }, - "resource-id": { - "description": "Id used to pull the data content from the data base. Either template-data or resource-id should be present", + "resource-type": { + "description": "Request type.", "required": true, "type": "string" }, - "template-content": { - "description": "Id used to pull the data content from the data base. Either template-data or resource-id should be present", + "template-names": { + "description": "Name of the artifact Node Templates, to get the template Content.", + "required": true, + "type": "list", + "entry_schema": { + "type": "string" + } + }, + "request-id": { + "description": "Request Id, Unique Id for the request.", "required": true, "type": "string" }, - "mapping-content": { - "description": "Id used to pull the data content from the data base. Either template-data or resource-id should be present", + "resource-id": { + "description": "Resource Id.", "required": true, "type": "string" } @@ -319,64 +336,95 @@ }, "derived_from": "tosca.nodes.Component" }, - "component-resource-assignment-python": { + "tosca.nodes.DG": { + "description": "This is Resource Assignment Component API", + "version": "1.0.0", + "derived_from": "tosca.nodes.Root" + }, + "tosca.nodes.Component": { "description": "This is Resource Assignment Component API", "version": "1.0.0", + "derived_from": "tosca.nodes.Root" + }, + "tosca.nodes.component.Python": { + "description": "This is Resource Assignment Python Component API", + "version": "1.0.0", + "derived_from": "tosca.nodes.Root" + } + }, + "data_types": { + "datatype-resource-assignment": { + "version": "1.0.0", + "description": "This is Resource Assignment Data Type", "properties": { - "request-id": { - "description": "Request Id used to store the generated configuration, in the database along with the template-name", + "property": { "required": true, + "type": "datatype-property" + }, + "input-param": { + "required": true, + "type": "boolean" + }, + "dictionary-name": { + "required": false, "type": "string" - } - }, - "interfaces": { - "DefaultComponentNode": { - "operations": { - "process": { - "inputs": { - "action-name": { - "description": "Recipe Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority", - "required": false, - "type": "string" - } - }, - "outputs": { - "resource-assignment-params": { - "required": true, - "type": "string" - }, - "status": { - "required": true, - "type": "string" - } - } - } + }, + "dictionary-source": { + "required": false, + "type": "string" + }, + "dependencies": { + "required": true, + "type": "list", + "entry_schema": { + "type": "string" } + }, + "status": { + "required": false, + "type": "string" + }, + "message": { + "required": false, + "type": "string" + }, + "updated-date": { + "required": false, + "type": "string" + }, + "updated-by": { + "required": false, + "type": "string" } }, - "derived_from": "tosca.nodes.component.Python" - } - }, - "data_types": { - "sample-property" : { - "description": "This is sample data type", + "derived_from": "tosca.datatypes.Root" + }, + "datatype-property": { "version": "1.0.0", + "description": "This is Entry point Input Data Type, which is dynamic datatype, The parameter names will be populated during the Design time for each inputs", "properties": { - "content": { + "type": { + "required": true, + "type": "string" + }, + "description": { "required": false, "type": "string" }, - "process-name": { + "required": { + "required": false, + "type": "boolean" + }, + "default": { "required": false, "type": "string" }, - "version": { + "entry_schema": { "required": false, - "type": "string", - "default" : "LATEST" + "type": "string" } }, - "derived_from" : "tosca.datatypes.Root" + "derived_from": "tosca.datatypes.Root" } } } \ No newline at end of file diff --git a/components/core/load/model_type/node_type/tosca.nodes.Artifact.json b/components/core/load/model_type/node_type/tosca.nodes.Artifact.json new file mode 100644 index 000000000..814105277 --- /dev/null +++ b/components/core/load/model_type/node_type/tosca.nodes.Artifact.json @@ -0,0 +1,5 @@ +{ + "description": "This is Deprecated Artifact Node Type.", + "version": "1.0.0", + "derived_from": "tosca.nodes.Root" +} \ No newline at end of file -- cgit 1.2.3-korg 55'>455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596