update vlb cds instantiation and scale out package
[ccsdk/cds.git] / components / model-catalog / blueprint-model / service-blueprint / vLB / Definitions / vLB_CDS.json
index 9b03a5e..2db4fea 100644 (file)
 {
-  "tosca_definitions_version" : "controller_blueprint_1_0_0",
-  "metadata" : {
-    "template_author" : "Abdelmuhaimen Seaudi",
-    "author-email" : "abdelmuhaimen.seaudi@orange.com",
-    "user-groups" : "ADMIN, OPERATION",
-    "template_name" : "vLB_CDS",
-    "template_version" : "1.0.0",
-    "template_tags" : "test, vDNS-CDS, SCALE-OUT, MARCO"
-  },
-  "imports" : [ {
-    "file" : "Definitions/data_types.json"
-  }, {
-    "file" : "Definitions/relationship_types.json"
-  }, {
-    "file" : "Definitions/artifact_types.json"
-  }, {
-    "file" : "Definitions/node_types.json"
-  }, {
-    "file" : "Definitions/policy_types.json"
-  } ],
-  "dsl_definitions" : {
-    "ipam-1" : {
-      "type" : "token-auth",
-      "url" : "http://netbox-nginx:8080",
-      "token" : "Token 0123456789abcdef0123456789abcdef01234567"
-    },
-    "config-deploy-properties" : {
-      "resolution-key" : {
-        "get_input" : "resolution-key"
+   "tosca_definitions_version": "controller_blueprint_1_0_0",
+   "metadata": {
+      "template_author": "Abdelmuhaimen Seaudi",
+      "author-email": "abdelmuhaimen.seaudi@orange.com",
+      "user-groups": "ADMIN, OPERATION",
+      "template_name": "vLB_CDS",
+      "template_version": "1.0.0",
+      "template_tags": "vLB, CDS, RESTONF, IMPERATIVE"
+   },
+   "imports": [
+      {
+         "file": "Definitions/data_types.json"
+      },
+      {
+         "file": "Definitions/relationship_types.json"
+      },
+      {
+         "file": "Definitions/artifact_types.json"
+      },
+      {
+         "file": "Definitions/node_types.json"
+      },
+      {
+         "file": "Definitions/policy_types.json"
       }
-    },
-    "dynamic-db-source" : {
-      "type" : "maria-db",
-      "url" : "jdbc:mysql://mariadb-galera:3306/sdnctl",
-      "username" : "root",
-      "password" : "secretpassword"
-    }
-  },
-  "topology_template" : {
-    "workflows" : {
-      "resource-assignment" : {
-        "steps" : {
-          "resource-assignment" : {
-            "description" : "Resource Assign Workflow",
-            "target" : "resource-assignment"
-          }
-        },
-        "inputs" : {
-          "template-prefix" : {
-            "required" : true,
-            "type" : "list",
-            "entry_schema" : {
-              "type" : "string"
-            }
-          },
-          "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" ]
-            }
-          }
-        }
+   ],
+   "dsl_definitions": {
+      "ipam-1": {
+         "type": "token-auth",
+         "url": "http://netbox-nginx:8080",
+         "token": "Token 0123456789abcdef0123456789abcdef01234567"
       },
-      "config-assign" : {
-        "steps" : {
-          "config-assign" : {
-            "description" : "Config Assign Workflow",
-            "target" : "config-assign",
-            "activities" : [ {
-              "call_operation" : ""
-            } ]
-          }
-        },
-        "inputs" : {
-          "resolution-key" : {
-            "required" : true,
-            "type" : "string"
-          },
-          "config-assign-properties" : {
-            "description" : "Dynamic PropertyDefinition for workflow(config-assign).",
-            "required" : true,
-            "type" : "dt-config-assign-properties"
-          }
-        },
-        "outputs" : {
-          "dry-run" : {
-            "type" : "json",
-            "value" : {
-              "get_attribuxte" : [ "config-assign", "assignment-params" ]
-            }
-          }
-        }
+      "naming-resolution": {
+         "type": "basic-auth",
+         "url": "http://neng-serv:8080/web/service",
+         "username": "ccsdkapps",
+         "password": "ccsdkapps"
+      },
+      "config-deploy-properties": {
+         "resolution-key": {
+            "get_input": "resolution-key"
+         }
+      },
+      "HealthCheck-properties": {
+         "resolution-key": {
+            "get_input": "resolution-key"
+         }
       },
-      "config-deploy" : {
-        "steps" : {
-          "config-deploy" : {
-            "description" : "Resource Assign and Python Netconf Activation Workflow",
-            "target" : "config-deploy-process",
-            "activities" : [ {
-              "call_operation" : ""
-            } ]
-          }
-        },
-        "inputs" : {
-          "resolution-key" : {
-            "required" : false,
-            "type" : "string"
-          },
-          "service-instance-id" : {
-            "required" : false,
-            "type" : "string"
-          },
-          "config-deploy-properties" : {
-            "description" : "Dynamic PropertyDefinition for workflow(config-deploy).",
-            "required" : true,
-            "type" : "dt-config-deploy-properties"
-          }
-        }
+      "ScaleOutReconfiguration-properties": {
+         "resolution-key": {
+            "get_input": "resolution-key"
+         }
       }
-    },
-    "node_templates" : {
-      "resource-assignment" : {
-        "type" : "component-resource-resolution",
-        "interfaces" : {
-          "ResourceResolutionComponent" : {
-            "operations" : {
-              "process" : {
-                "inputs" : {
-                  "artifact-prefix-names" : {
-                    "get_input" : "template-prefix"
+   },
+   "topology_template": {
+      "workflows": {
+         "resource-assignment": {
+            "steps": {
+               "resource-assignment": {
+                  "description": "Resource Assign Workflow",
+                  "target": "resource-assignment"
+               }
+            },
+            "inputs": {
+               "template-prefix": {
+                  "required": true,
+                  "type": "list",
+                  "entry_schema": {
+                     "type": "string"
                   }
-                }
-              }
+               },
+               "resource-assignment-properties": {
+                  "description": "Dynamic PropertyDefinition for workflow(resource-assignment).",
+                  "required": true,
+                  "type": "dt-resource-assignment-properties"
+               }
+            },
+            "outputs": {
+               "resolved-data": {
+                  "type": "json",
+                  "value": {
+                     "get_attribute": [
+                        "resource-assignment",
+                        "assignment-params"
+                     ]
+                  }
+               }
             }
-          }
-        },
-        "artifacts" : {
-          "base_template-template" : {
-            "type" : "artifact-template-velocity",
-            "file" : "Templates/base_template-template.vtl"
-          },
-          "base_template-mapping" : {
-            "type" : "artifact-mapping-resource",
-            "file" : "Templates/base_template-mapping.json"
-          },
-          "vpkg-template" : {
-            "type" : "artifact-template-velocity",
-            "file" : "Templates/vpkg-template.vtl"
-          },
-          "vpkg-mapping" : {
-            "type" : "artifact-mapping-resource",
-            "file" : "Templates/vpkg-mapping.json"
-          },
-          "vdns-template" : {
-            "type" : "artifact-template-velocity",
-            "file" : "Templates/vdns-template.vtl"
-          },
-          "vdns-mapping" : {
-            "type" : "artifact-mapping-resource",
-            "file" : "Templates/vdns-mapping.json"
-          },
-          "vnf-template" : {
-            "type" : "artifact-template-velocity",
-            "file" : "Templates/vnf-template.vtl"
-          },
-          "vnf-mapping" : {
-            "type" : "artifact-mapping-resource",
-            "file" : "Templates/vnf-mapping.json"
-          },
-          "vlb-template" : {
-            "type" : "artifact-template-velocity",
-            "file" : "Templates/vlb-template.vtl"
-          },
-          "vlb-mapping" : {
-            "type" : "artifact-mapping-resource",
-            "file" : "Templates/vlb-mapping.json"
-          }
-        }
-      },
-      "config-assign" : {
-        "type" : "component-resource-resolution",
-        "interfaces" : {
-          "ResourceResolutionComponent" : {
-            "operations" : {
-              "process" : {
-                "inputs" : {
-                  "resolution-key" : {
-                    "get_input" : "resolution-key"
-                  },
-                  "store-result" : true,
-                  "artifact-prefix-names" : [ "baseconfig", "incremental-config" ]
-                }
-              }
+         },
+         "config-assign": {
+            "steps": {
+               "config-assign": {
+                  "description": "Config Assign Workflow",
+                  "target": "config-assign",
+                  "activities": [
+                     {
+                        "call_operation": ""
+                     }
+                  ]
+               }
+            },
+            "inputs": {
+               "resolution-key": {
+                  "required": true,
+                  "type": "string"
+               },
+               "config-assign-properties": {
+                  "description": "Dynamic PropertyDefinition for workflow(config-assign).",
+                  "required": true,
+                  "type": "dt-config-assign-properties"
+               }
+            },
+            "outputs": {
+               "dry-run": {
+                  "type": "json",
+                  "value": {
+                     "get_attribuxte": [
+                        "config-assign",
+                        "assignment-params"
+                     ]
+                  }
+               }
             }
-          }
-        },
-        "artifacts" : {
-          "baseconfig-template" : {
-            "type" : "artifact-template-velocity",
-            "file" : "Templates/baseconfig-template.vtl"
-          },
-          "baseconfig-mapping" : {
-            "type" : "artifact-mapping-resource",
-            "file" : "Templates/baseconfig-mapping.json"
-          },
-          "incremental-config-template" : {
-            "type" : "artifact-template-velocity",
-            "file" : "Templates/incremental-config-template.vtl"
-          },
-          "incremental-config-mapping" : {
-            "type" : "artifact-mapping-resource",
-            "file" : "Templates/incremental-config-mapping.json"
-          }
-        }
-      },
-      "netconf-device" : {
-        "type" : "vnf-netconf-device",
-        "capabilities" : {
-          "netconf" : {
-            "properties" : {
-              "login-key" : "admin",
-              "login-account" : "admin",
-              "target-ip-address" : {
-                "get_attribute" : [ "nf-account-collection", "", "assignment-params", "nf-params" ]
-              },
-              "port-number" : 2831,
-              "connection-time-out" : 5
+         },
+         "config-deploy": {
+            "steps": {
+               "imperative-workflow-step-1": {
+                  "description": "resolve ip for vlb",
+                  "target": "nf-account-collection",
+                  "activities": [
+                     {
+                        "call_operation": "ResourceResolutionComponent.process"
+                     }
+                  ],
+                  "on_success": [
+                     "imperative-workflow-step-2"
+                  ]
+               },
+               "imperative-workflow-step-2": {
+                  "description": "execute restconf",
+                  "target": "execute",
+                  "activities": [
+                     {
+                        "call_operation": "ComponentScriptExecutor.process"
+                     }
+                  ]
+               }
+            },
+            "inputs": {
+               "resolution-key": {
+                  "required": false,
+                  "type": "string"
+               },
+               "service-instance-id": {
+                  "required": false,
+                  "type": "string"
+               },
+               "config-deploy-properties": {
+                  "description": "Dynamic PropertyDefinition for workflow(config-deploy).",
+                  "required": true,
+                  "type": "dt-config-deploy-properties"
+               }
             }
-          }
-        }
-      },
-      "config-deploy-process" : {
-        "type" : "dg-generic",
-        "properties" : {
-          "content" : {
-            "get_artifact" : [ "SELF", "dg-config-deploy-process" ]
-          },
-          "dependency-node-templates" : [ "nf-account-collection", "execute" ]
-        },
-        "artifacts" : {
-          "dg-config-deploy-process" : {
-            "type" : "artifact-directed-graph",
-            "file" : "Plans/CONFIG_ConfigDeploy.xml"
-          }
-        }
-      },
-      "nf-account-collection" : {
-        "type" : "component-resource-resolution",
-        "interfaces" : {
-          "ResourceResolutionComponent" : {
-            "operations" : {
-              "process" : {
-                "inputs" : {
-                  "artifact-prefix-names" : [ "nf-params" ]
-                }
-              }
+         },
+         "HealthCheck": {
+            "steps": {
+               "imperative-workflow-step-1": {
+                  "description": "resolve ip for vlb",
+                  "target": "nf-account-collection",
+                  "activities": [
+                     {
+                        "call_operation": "ResourceResolutionComponent.process"
+                     }
+                  ],
+                  "on_success": [
+                     "imperative-workflow-step-2"
+                  ]
+               },
+               "imperative-workflow-step-2": {
+                  "description": "execute restconf",
+                  "target": "executeHealthCheck",
+                  "activities": [
+                     {
+                        "call_operation": "ComponentScriptExecutor.process"
+                     }
+                  ]
+               }
+            },
+            "inputs": {
+               "resolution-key": {
+                  "required": false,
+                  "type": "string"
+               },
+               "service-instance-id": {
+                  "required": false,
+                  "type": "string"
+               },
+               "HealthCheck-properties": {
+                  "description": "Dynamic PropertyDefinition for workflow(config-deploy).",
+                  "required": true,
+                  "type": "dt-HealthCheck-properties"
+               }
+            },
+            "outputs": {
+               "response-data": {
+                  "description": "Execution Response Data.",
+                  "required": false,
+                  "type": "json",
+                  "value": {
+                     "get_attribute": [
+                        "executeHealthCheck",
+                        "response-data"
+                     ]
+                  }
+               },
+               "status": {
+                  "description": "Status of the Component Execution ( success or failure )",
+                  "required": true,
+                  "type": "string"
+               }
+            }
+         },
+         "ScaleOutReconfiguration": {
+            "steps": {
+         
+               "imperative-workflow-step-0": {
+                  "description": "Config Assign Workflow",
+                  "target": "ScaleOutReconfiguration",
+                  "activities": [
+                     {
+                        "call_operation": "ResourceResolutionComponent.process"
+                     }
+                  ],
+                  "on_success": [
+                     "imperative-workflow-step-1"
+                  ]
+               },
+                                "imperative-workflow-step-1": {
+                  "description": "resolve ip for vlb",
+                  "target": "nf-account-collection",
+                  "activities": [
+                     {
+                        "call_operation": "ResourceResolutionComponent.process"
+                     }
+                  ],
+                  "on_success": [
+                     "imperative-workflow-step-2"
+                  ]
+               },
+               "imperative-workflow-step-2": {
+                  "description": "execute restconf",
+                  "target": "execute",
+                  "activities": [
+                     {
+                        "call_operation": "ComponentScriptExecutor.process"
+                     }
+                  ]
+               }
+            },
+            "inputs": {
+               "resolution-key": {
+                  "required": false,
+                  "type": "string"
+               },
+               "service-instance-id": {
+                  "required": false,
+                  "type": "string"
+               },
+               "ScaleOutReconfiguration-properties": {
+                  "description": "Dynamic PropertyDefinition for workflow(ScaleOutReconfiguration).",
+                  "required": true,
+                  "type": "dt-ScaleOutReconfiguration-properties"
+               }
             }
-          }
-        },
-        "artifacts" : {
-          "nf-params-template" : {
-            "type" : "artifact-template-velocity",
-            "file" : "Templates/nf-params-template.vtl"
-          },
-          "nf-params-mapping" : {
-            "type" : "artifact-mapping-resource",
-            "file" : "Templates/nf-params-mapping.json"
-          }
-        }
+         },
+         "vf-config-assign": {
+            "steps": {
+               "config-assign": {
+                  "description": "Config Assign Workflow",
+                  "target": "config-assign",
+                  "activities": [
+                     {
+                        "call_operation": ""
+                     }
+                  ]
+               }
+            },
+            "inputs": {
+               "resolution-key": {
+                  "required": true,
+                  "type": "string"
+               },
+               "config-assign-properties": {
+                  "description": "Dynamic PropertyDefinition for workflow(config-assign).",
+                  "required": true,
+                  "type": "dt-config-assign-properties"
+               }
+            },
+            "outputs": {
+               "dry-run": {
+                  "type": "json",
+                  "value": {
+                     "get_attribuxte": [
+                        "config-assign",
+                        "assignment-params"
+                     ]
+                  }
+               }
+            }
+         },
+         "vf-config-deploy": {
+            "steps": {
+               "imperative-workflow-step-1": {
+                  "description": "resolve ip for vlb",
+                  "target": "nf-account-collection",
+                  "activities": [
+                     {
+                        "call_operation": "ResourceResolutionComponent.process"
+                     }
+                  ],
+                  "on_success": [
+                     "imperative-workflow-step-2"
+                  ]
+               },
+               "imperative-workflow-step-2": {
+                  "description": "execute restconf",
+                  "target": "execute",
+                  "activities": [
+                     {
+                        "call_operation": "ComponentScriptExecutor.process"
+                     }
+                  ]
+               }
+            },
+            "inputs": {
+               "resolution-key": {
+                  "required": false,
+                  "type": "string"
+               },
+               "service-instance-id": {
+                  "required": false,
+                  "type": "string"
+               },
+               "config-deploy-properties": {
+                  "description": "Dynamic PropertyDefinition for workflow(config-deploy).",
+                  "required": true,
+                  "type": "dt-config-deploy-properties"
+               }
+            }
+         }
       },
-      "execute" : {
-        "type" : "component-netconf-executor",
-        "requirements" : {
-          "netconf-connection" : {
-            "capability" : "netconf",
-            "node" : "netconf-device",
-            "relationship" : "tosca.relationships.ConnectsTo"
-          }
-        },
-        "interfaces" : {
-          "ComponentNetconfExecutor" : {
-            "operations" : {
-              "process" : {
-                "inputs" : {
-                  "script-type" : "jython",
-                  "script-class-reference" : "Scripts/python/ConfigDeploy.py",
-                  "instance-dependencies" : [ ],
-                  "dynamic-properties" : "*config-deploy-properties"
-                }
-              }
+      "node_templates": {
+         "resource-assignment": {
+            "type": "component-resource-resolution",
+            "interfaces": {
+               "ResourceResolutionComponent": {
+                  "operations": {
+                     "process": {
+                        "inputs": {
+                           "resolution-summary": true,
+                           "artifact-prefix-names": {
+                              "get_input": "template-prefix"
+                           }
+                        }
+                     }
+                  }
+               }
+            },
+            "artifacts": {
+               "base_template-mapping": {
+                  "type": "artifact-mapping-resource",
+                  "file": "Templates/base_template-mapping.json"
+               },
+               "vpkg-mapping": {
+                  "type": "artifact-mapping-resource",
+                  "file": "Templates/vpkg-mapping.json"
+               },
+               "vdns-mapping": {
+                  "type": "artifact-mapping-resource",
+                  "file": "Templates/vdns-mapping.json"
+               },
+               "vnf-mapping": {
+                  "type": "artifact-mapping-resource",
+                  "file": "Templates/vnf-mapping.json"
+               },
+               "vlb-mapping": {
+                  "type": "artifact-mapping-resource",
+                  "file": "Templates/vlb-mapping.json"
+               }
+            }
+         },
+         "config-assign": {
+            "type": "component-resource-resolution",
+            "interfaces": {
+               "ResourceResolutionComponent": {
+                  "operations": {
+                     "process": {
+                        "inputs": {
+                           "resolution-key": {
+                              "get_input": "resolution-key"
+                           },
+                           "store-result": true,
+                           "artifact-prefix-names": [
+                              "baseconfig"
+                           ]
+                        }
+                     }
+                  }
+               }
+            },
+            "artifacts": {
+               "baseconfig-template": {
+                  "type": "artifact-template-velocity",
+                  "file": "Templates/baseconfig-template.vtl"
+               },
+               "baseconfig-mapping": {
+                  "type": "artifact-mapping-resource",
+                  "file": "Templates/baseconfig-mapping.json"
+               }
+            }
+         },
+         "ScaleOutReconfiguration": {
+            "type": "component-resource-resolution",
+            "interfaces": {
+               "ResourceResolutionComponent": {
+                  "operations": {
+                     "process": {
+                        "inputs": {
+                           "resolution-key": {
+                              "get_input": "resolution-key"
+                                                         },
+                           "store-result": true,
+                           "artifact-prefix-names": [
+                              "baseconfig"
+                           ]
+                        }
+                     }
+                  }
+               }
+            },
+            "artifacts": {
+               "baseconfig-template": {
+                  "type": "artifact-template-velocity",
+                  "file": "Templates/baseconfig-template.vtl"
+               },
+               "baseconfig-mapping": {
+                  "type": "artifact-mapping-resource",
+                  "file": "Templates/baseconfig-mapping.json"
+               }
+            }
+         },
+         "netconf-device": {
+            "type": "vnf-netconf-device",
+            "capabilities": {
+               "netconf": {
+                  "properties": {
+                     "login-key": "admin",
+                     "login-account": "admin",
+                     "target-ip-address": {
+                        "get_attribute": [
+                           "nf-account-collection",
+                           "",
+                           "assignment-params",
+                           "nf-params"
+                        ]
+                     },
+                     "port-number": 2831,
+                     "connection-time-out": 5
+                  }
+               },
+               "restconf": {
+                  "properties": {
+                     "login-key": "admin",
+                     "login-account": "admin",
+                     "target-ip-address": {
+                        "get_attribute": [
+                           "nf-account-collection",
+                           "",
+                           "assignment-params",
+                           "nf-params"
+                        ]
+                     },
+                     "port-number": 8183,
+                     "connection-time-out": 5
+                  }
+               }
+            }
+         },
+         "nf-account-collection": {
+            "type": "component-resource-resolution",
+            "interfaces": {
+               "ResourceResolutionComponent": {
+                  "operations": {
+                     "process": {
+                        "inputs": {
+                           "artifact-prefix-names": [
+                              "nf-params"
+                           ]
+                        }
+                     }
+                  }
+               }
+            },
+            "artifacts": {
+               "nf-params-template": {
+                  "type": "artifact-template-velocity",
+                  "file": "Templates/nf-params-template.vtl"
+               },
+               "nf-params-mapping": {
+                  "type": "artifact-mapping-resource",
+                  "file": "Templates/nf-params-mapping.json"
+               }
+            }
+         },
+         "execute": {
+            "type": "component-script-executor",
+            "requirements": {
+               "restconf-connection": {
+                  "capability": "restconf",
+                  "node": "netconf-device",
+                  "relationship": "tosca.relationships.ConnectsTo"
+               }
+            },
+            "interfaces": {
+               "ComponentScriptExecutor": {
+                  "operations": {
+                     "process": {
+                        "inputs": {
+                           "script-type": "kotlin",
+                           "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.ConfigDeploy",
+                           "instance-dependencies": [],
+                           "dynamic-properties": "*config-deploy-properties"
+                        }
+                     }
+                  }
+               }
+            }
+         },
+         "executeHealthCheck": {
+            "type": "component-script-executor",
+            "requirements": {
+               "restconf-connection": {
+                  "capability": "restconf",
+                  "node": "netconf-device",
+                  "relationship": "tosca.relationships.ConnectsTo"
+               }
+            },
+            "interfaces": {
+               "ComponentScriptExecutor": {
+                  "operations": {
+                     "process": {
+                        "inputs": {
+                           "script-type": "kotlin",
+                           "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.HealthCheck",
+                           "instance-dependencies": [],
+                           "dynamic-properties": "*HealthCheck-properties"
+                        }
+                     }
+                  }
+               }
             }
-          }
-        },
-        "artifacts" : {
-          "baseconfig-template" : {
-            "type" : "artifact-template-velocity",
-            "file" : "Templates/baseconfig-template.vtl"
-          },
-          "baseconfig-mapping" : {
-            "type" : "artifact-mapping-resource",
-            "file" : "Templates/baseconfig-mapping.json"
-          },
-          "incremental-config-template" : {
-            "type" : "artifact-template-velocity",
-            "file" : "Templates/incremental-config-template.vtl"
-          },
-          "incremental-config-mapping" : {
-            "type" : "artifact-mapping-resource",
-            "file" : "Templates/incremental-config-mapping.json"
-          }
-        }
+         }
       }
-    }
-  }
+   }
 }
\ No newline at end of file