summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaihlavi <l.kaihlavirt@partner.samsung.com>2019-08-07 12:37:17 +0300
committerDaniel Rose <dr695h@att.com>2019-08-20 15:55:39 +0000
commita724b23901805edec2c1c0953c2324fb45acca46 (patch)
treec49762180aa20612966ee45ddd2de1bca2201fad
parentf23314c5c49d4afcc629d45a9a4422efcca17aaa (diff)
Add SDC-DCAE-DS integration test
Add initial end-to-end SDC integration test case including SDC-DCAE-DS via APIs to create a catalog service with monitoring configuration as described under https://wiki.onap.org/display/DW/How+to+Create+a+Service+with+a+Monitoring+Configuration+using+SDC This test case is adjusted for onapci from csit/tests/sdc-dcae-d/dcaed/ Please note that this commit changes commonly used sdc_interface.robot and affects all distribution test cases Issue-ID: SDC-2480 Signed-off-by: kaihlavi <l.kaihlavirt@partner.samsung.com> Change-Id: I8c7766d286f80431bfb8be60a8299ce98a4ae81f
-rwxr-xr-xrobot/assets/sdc/blueprints/schema.yaml551
-rwxr-xr-xrobot/assets/sdc/blueprints/template.yaml117
-rwxr-xr-xrobot/assets/sdc/blueprints/translate.yaml147
-rw-r--r--robot/assets/templates/sdc/catalog_service_monitoring.jinja42
-rw-r--r--robot/assets/templates/sdc/create_vfcmt.jinja4
-rw-r--r--robot/assets/templates/sdc/dcae_component_microservice.jinja41
-rw-r--r--robot/assets/templates/sdc/dcae_composition.jinja849
-rw-r--r--robot/assets/templates/sdc/dcae_monitoring_configuration.jinja11
-rw-r--r--robot/resources/global_properties.robot3
-rw-r--r--robot/resources/sdc_dcaed_interface.robot72
-rw-r--r--robot/resources/sdc_interface.robot102
-rw-r--r--robot/testsuites/sdc-dcae-d.robot22
12 files changed, 1947 insertions, 14 deletions
diff --git a/robot/assets/sdc/blueprints/schema.yaml b/robot/assets/sdc/blueprints/schema.yaml
new file mode 100755
index 00000000..7024a35c
--- /dev/null
+++ b/robot/assets/sdc/blueprints/schema.yaml
@@ -0,0 +1,551 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+capability_types:
+ dcae.capabilities.cdapHost:
+ derived_from: tosca.capabilities.Root
+ dcae.capabilities.composition.host:
+ derived_from: tosca.capabilities.Root
+ properties:
+ location_id:
+ type: string
+ service_id:
+ type: string
+ dcae.capabilities.dmmap.feed:
+ derived_from: tosca.capabilities.Root
+ properties:
+ feed_name:
+ type: string
+ location:
+ type: string
+ node_name:
+ type: string
+ dcae.capabilities.dmmap.topic:
+ derived_from: tosca.capabilities.Root
+ properties:
+ aaf_password:
+ type: string
+ aaf_username:
+ type: string
+ client_role:
+ type: string
+ location:
+ type: string
+ node_name:
+ type: string
+ topic_name:
+ type: string
+ dcae.capabilities.dockerHost:
+ derived_from: tosca.capabilities.Root
+ dcae.capabilities.policy:
+ derived_from: tosca.capabilities.Root
+ dcae.capabilities.service.provide:
+ derived_from: tosca.capabilities.Root
+ properties:
+ request_format:
+ type: string
+ request_version:
+ type: string
+ response_format:
+ type: string
+ response_version:
+ type: string
+ service_endpoint:
+ type: string
+ service_name:
+ type: string
+ verb:
+ type: string
+ dcae.capabilities.stream.subscribe:
+ derived_from: tosca.capabilities.Root
+ properties:
+ format:
+ type: string
+ route:
+ type: string
+ version:
+ type: string
+relationship_types:
+ cloudify.relationships.depends_on:
+ derived_from: tosca.relationships.Root
+ dcae.relationships.component_contained_in:
+ derived_from: tosca.relationships.Root
+ dcae.relationships.publish_events:
+ derived_from: tosca.relationships.Root
+ dcae.relationships.publish_files:
+ derived_from: tosca.relationships.Root
+ dcae.relationships.rework_connected_to:
+ derived_from: tosca.relationships.Root
+ dcae.relationships.subscribe_to_events:
+ derived_from: tosca.relationships.Root
+ dcae.relationships.subscribe_to_files:
+ derived_from: tosca.relationships.Root
+node_types:
+ cloudify.dcae.nodes.Root:
+ derived_from: tosca.nodes.Root
+ dcae.nodes.ContainerizedComponent:
+ derived_from: cloudify.dcae.nodes.Root
+ properties:
+ application_config:
+ required: true
+ type: map
+ docker_config:
+ type: map
+ image:
+ required: true
+ type: string
+ dcae.nodes.ContainerizedServiceComponent:
+ attributes:
+ service_component_name:
+ type: string
+ derived_from: dcae.nodes.ContainerizedComponent
+ properties:
+ location_id:
+ required: true
+ type: string
+ service_component_type:
+ required: true
+ type: string
+ dcae.nodes.ContainerizedServiceComponentUsingDmaap:
+ derived_from: dcae.nodes.ContainerizedServiceComponent
+ properties:
+ streams_publishes:
+ type: list
+ streams_subscribes:
+ type: list
+ dcae.nodes.DockerContainerForComponents:
+ attributes:
+ service_component_name:
+ type: string
+ derived_from: cloudify.dcae.nodes.Root
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ host_config:
+ type: map
+ stop:
+ inputs:
+ cleanup_image:
+ type: boolean
+ type: tosca.interfaces.Root
+ properties:
+ application_config:
+ required: true
+ type: map
+ docker_config:
+ type: map
+ image:
+ required: true
+ type: string
+ location_id:
+ required: true
+ type: string
+ service_component_type:
+ required: true
+ type: string
+ requirements:
+ - host:
+ capability: dcae.capabilities.dockerHost
+ relationship: dcae.relationships.component_contained_in
+ dcae.nodes.DockerContainerForComponentsUsingDmaap:
+ derived_from: dcae.nodes.DockerContainerForComponents
+ properties:
+ application_config:
+ required: true
+ type: map
+ docker_config:
+ type: map
+ image:
+ required: true
+ type: string
+ location_id:
+ required: true
+ type: string
+ service_component_type:
+ required: true
+ type: string
+ streams_publishes:
+ type: list
+ streams_subscribes:
+ type: list
+ attributes:
+ service_component_name:
+ type: string
+ requirements:
+ - host:
+ capability: dcae.capabilities.dockerHost
+ relationship: dcae.relationships.component_contained_in
+ - stream_subscribe_0:
+ capability: dcae.capabilities.dmmap.topic
+ relationship: dcae.relationships.subscribe_to_events
+ - stream_publish_0:
+ capability: dcae.capabilities.dmmap.topic
+ relationship: dcae.relationships.publish_events
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ host_config:
+ type: map
+ stop:
+ inputs:
+ cleanup_image:
+ type: boolean
+ type: tosca.interfaces.Root
+ dcae.nodes.ExistingFeed:
+ capabilities:
+ feed:
+ type: dcae.capabilities.dmmap.feed
+ derived_from: cloudify.dcae.nodes.Root
+ properties:
+ feed_id:
+ type: string
+ dcae.nodes.ExistingTopic:
+ capabilities:
+ topic:
+ type: dcae.capabilities.dmmap.topic
+ derived_from: cloudify.dcae.nodes.Root
+ properties:
+ fqtn:
+ type: string
+ dcae.nodes.ExternalTargetFeed:
+ capabilities:
+ feed:
+ type: dcae.capabilities.dmmap.feed
+ derived_from: cloudify.dcae.nodes.Root
+ properties:
+ url:
+ type: string
+ username:
+ type: string
+ userpw:
+ type: string
+ dcae.nodes.Feed:
+ capabilities:
+ feed:
+ type: dcae.capabilities.dmmap.feed
+ derived_from: cloudify.dcae.nodes.Root
+ properties:
+ feed_name:
+ type: string
+ dcae.nodes.MicroService.cdap:
+ attributes:
+ service_component_name:
+ type: string
+ derived_from: cloudify.dcae.nodes.Root
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ connected_broker_dns_name:
+ type: string
+ type: tosca.interfaces.Root
+ properties:
+ app_config:
+ required: false
+ type: map
+ app_preferences:
+ required: false
+ type: map
+ artifact_name:
+ required: false
+ type: string
+ artifact_version:
+ required: false
+ type: string
+ connections:
+ required: false
+ type: map
+ jar_url:
+ type: string
+ namespace:
+ required: false
+ type: string
+ program_preferences:
+ required: false
+ type: list
+ programs:
+ required: false
+ type: list
+ service_component_type:
+ type: string
+ service_endpoints:
+ required: false
+ type: list
+ streamname:
+ required: false
+ type: string
+ requirements:
+ - host:
+ capability: dcae.capabilities.cdapHost
+ relationship: dcae.relationships.component_contained_in
+ dcae.nodes.SelectedDockerHost:
+ capabilities:
+ host:
+ type: dcae.capabilities.dockerHost
+ derived_from: cloudify.dcae.nodes.Root
+ properties:
+ docker_host_override:
+ type: string
+ location_id:
+ required: true
+ type: string
+ dcae.nodes.Topic:
+ capabilities:
+ topic:
+ type: dcae.capabilities.dmmap.topic
+ derived_from: cloudify.dcae.nodes.Root
+ properties:
+ topic_name:
+ type: string
+ dcae.nodes.composition.virtual:
+ capabilities:
+ host:
+ type: dcae.capabilities.composition.host
+ derived_from: tosca.nodes.Root
+ properties:
+ location_id:
+ required: true
+ type: string
+ service_id:
+ required: true
+ type: string
+ dcae.nodes.policies:
+ capabilities:
+ policy:
+ type: dcae.capabilities.policy
+ derived_from: cloudify.dcae.nodes.Root
+ properties:
+ policy_filter:
+ type: map
+ dcae.nodes.policy:
+ capabilities:
+ policy:
+ type: dcae.capabilities.policy
+ derived_from: cloudify.dcae.nodes.Root
+ properties:
+ policy_id:
+ required: true
+ type: string
+ policy.nodes.Root:
+ derived_from: tosca.nodes.Root
+ properties:
+ policyDescription:
+ required: false
+ type: string
+ policyName:
+ required: true
+ type: string
+ policyScope:
+ required: true
+ type: string
+ policyVersion:
+ required: true
+ type: string
+ tosca.dcae.nodes.Root:
+ derived_from: tosca.nodes.Root
+ tosca.dcae.nodes.cdapApp:
+ attributes:
+ service_component_name:
+ type: string
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ connected_broker_dns_name:
+ default: cdap_broker
+ required: true
+ type: string
+ jar_url:
+ required: true
+ type: string
+ service_component_type:
+ required: true
+ type: string
+ requirements:
+ - host:
+ capability: dcae.capabilities.cdapHost
+ relationship: dcae.relationships.component_contained_in
+ tosca.dcae.nodes.dmaap.existingFeed:
+ capabilities:
+ feed:
+ type: dcae.capabilities.dmmap.feed
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ feed_id:
+ type: string
+ location:
+ type: string
+ node_name:
+ type: string
+ requirements:
+ - composition:
+ capability: dcae.capabilities.composition.host
+ tosca.dcae.nodes.dmaap.existingTopic:
+ capabilities:
+ topic:
+ type: dcae.capabilities.dmmap.topic
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ aaf_password:
+ type: string
+ aaf_username:
+ type: string
+ client_role:
+ type: string
+ fqtn:
+ type: string
+ location:
+ type: string
+ node_name:
+ type: string
+ requirements:
+ - composition:
+ capability: dcae.capabilities.composition.host
+ tosca.dcae.nodes.dmaap.externalTargetFeed:
+ capabilities:
+ feed:
+ type: dcae.capabilities.dmmap.feed
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ location:
+ type: string
+ node_name:
+ type: string
+ url:
+ type: string
+ username:
+ type: string
+ userpw:
+ type: string
+ requirements:
+ - composition:
+ capability: dcae.capabilities.composition.host
+ tosca.dcae.nodes.dmaap.feed:
+ capabilities:
+ feed:
+ type: dcae.capabilities.dmmap.feed
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ feed_name:
+ type: string
+ location:
+ type: string
+ node_name:
+ type: string
+ requirements:
+ - composition:
+ capability: dcae.capabilities.composition.host
+ tosca.dcae.nodes.dmaap.topic:
+ capabilities:
+ topic:
+ type: dcae.capabilities.dmmap.topic
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ aaf_password:
+ type: string
+ aaf_username:
+ type: string
+ client_role:
+ type: string
+ location:
+ type: string
+ node_name:
+ type: string
+ topic_name:
+ type: string
+ requirements:
+ - composition:
+ capability: dcae.capabilities.composition.host
+ tosca.dcae.nodes.dockerApp:
+ attributes:
+ service_component_name:
+ type: string
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ cpu_period:
+ default: 10000
+ required: true
+ type: integer
+ cpu_quota:
+ default: 30000
+ required: true
+ type: integer
+ cpu_shares:
+ default: 256
+ required: true
+ type: integer
+ image:
+ required: true
+ type: string
+ location_id:
+ required: true
+ type: string
+ mem_limit:
+ default: 500m
+ required: true
+ type: string
+ restart_policy.Name:
+ default: on-failure
+ required: true
+ type: string
+ restart_policy.max_retry_counts:
+ default: 3
+ required: true
+ type: integer
+ service_component_type:
+ required: true
+ type: string
+ requirements:
+ - host:
+ capability: dcae.capabilities.dockerHost
+ relationship: dcae.relationships.component_contained_in
+ - composition:
+ capability: dcae.capabilities.composition.host
+ tosca.dcae.nodes.dockerApp.tca-docker:
+ derived_from: tosca.dcae.nodes.dockerApp
+ requirements:
+ - stream_subscribe_0:
+ capability: dcae.capabilities.dmmap.topic
+ relationship: dcae.relationships.subscribe_to_events
+ - stream_publish_0:
+ capability: dcae.capabilities.dmmap.topic
+ relationship: dcae.relationships.publish_events
+ tosca.dcae.nodes.dockerHost:
+ capabilities:
+ host:
+ type: dcae.capabilities.dockerHost
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ docker_host_override:
+ type: string
+ location_id:
+ required: true
+ type: string
+ requirements:
+ - composition:
+ capability: dcae.capabilities.composition.host
+ tosca.dcae.nodes.policies:
+ capabilities:
+ policy:
+ type: dcae.capabilities.policy
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ configAttributes:
+ type: string
+ configName:
+ type: string
+ onapName:
+ type: string
+ policyName:
+ type: string
+ unique:
+ type: boolean
+ tosca.dcae.nodes.policy:
+ capabilities:
+ policy:
+ type: dcae.capabilities.policy
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ policy_id:
+ required: true
+ type: string
+ policy_name:
+ type: string
diff --git a/robot/assets/sdc/blueprints/template.yaml b/robot/assets/sdc/blueprints/template.yaml
new file mode 100755
index 00000000..5a03da76
--- /dev/null
+++ b/robot/assets/sdc/blueprints/template.yaml
@@ -0,0 +1,117 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: tca-docker
+imports:
+- schema: schema.yaml
+topology_template:
+ inputs:
+ topic0_aaf_password:
+ type: string
+ topic0_aaf_username:
+ type: string
+ topic0_client_role:
+ type: string
+ topic1_aaf_password:
+ type: string
+ topic1_aaf_username:
+ type: string
+ topic1_client_role:
+ type: string
+ node_templates:
+ tca-docker:
+ type: tosca.dcae.nodes.dockerApp.tca-docker
+ properties:
+ location_id:
+ get_property:
+ - SELF
+ - composition
+ - location_id
+ requirements:
+ - stream_subscribe_0: topic0
+ - stream_publish_0: topic1
+ topic0:
+ type: tosca.dcae.nodes.dmaap.topic
+ properties:
+ aaf_password:
+ get_input: topic0_aaf_password
+ aaf_username:
+ get_input: topic0_aaf_username
+ client_role:
+ get_input: topic0_client_role
+ location:
+ get_property:
+ - SELF
+ - composition
+ - location_id
+ node_name: __GET_NODE_NAME__
+ topic_name: ''
+ capabilities:
+ topic:
+ properties:
+ aaf_password:
+ get_property:
+ - SELF
+ - aaf_password
+ aaf_username:
+ get_property:
+ - SELF
+ - aaf_username
+ client_role:
+ get_property:
+ - SELF
+ - client_role
+ location:
+ get_property:
+ - SELF
+ - location
+ node_name:
+ get_property:
+ - SELF
+ - node_name
+ topic_name:
+ get_property:
+ - SELF
+ - topic_name
+ topic1:
+ type: tosca.dcae.nodes.dmaap.topic
+ properties:
+ aaf_password:
+ get_input: topic1_aaf_password
+ aaf_username:
+ get_input: topic1_aaf_username
+ client_role:
+ get_input: topic1_client_role
+ location:
+ get_property:
+ - SELF
+ - composition
+ - location_id
+ node_name: __GET_NODE_NAME__
+ topic_name: ''
+ capabilities:
+ topic:
+ properties:
+ aaf_password:
+ get_property:
+ - SELF
+ - aaf_password
+ aaf_username:
+ get_property:
+ - SELF
+ - aaf_username
+ client_role:
+ get_property:
+ - SELF
+ - client_role
+ location:
+ get_property:
+ - SELF
+ - location
+ node_name:
+ get_property:
+ - SELF
+ - node_name
+ topic_name:
+ get_property:
+ - SELF
+ - topic_name
diff --git a/robot/assets/sdc/blueprints/translate.yaml b/robot/assets/sdc/blueprints/translate.yaml
new file mode 100755
index 00000000..5515dc2c
--- /dev/null
+++ b/robot/assets/sdc/blueprints/translate.yaml
@@ -0,0 +1,147 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: tca-docker_translate
+imports:
+- schema: schema.yaml
+topology_template:
+ inputs:
+ cpu_period:
+ type: integer
+ default: 10000
+ cpu_quota:
+ type: integer
+ default: 30000
+ cpu_shares:
+ type: integer
+ default: 256
+ image:
+ type: string
+ location_id:
+ type: string
+ mem_limit:
+ type: string
+ default: 500m
+ restart_policy.Name:
+ type: string
+ default: on-failure
+ restart_policy.max_retry_counts:
+ type: integer
+ default: 3
+ service_component_type:
+ type: string
+ substitution_mappings:
+ node_type: tosca.dcae.nodes.dockerApp.tca-docker
+ capabilities: {}
+ requirements:
+ host:
+ - tca-docker
+ - host
+ stream_publish_0:
+ - tca-docker
+ - stream_publish_0
+ stream_subscribe_0:
+ - tca-docker
+ - stream_subscribe_0
+ node_templates:
+ tca-docker:
+ type: dcae.nodes.DockerContainerForComponentsUsingDmaap
+ properties:
+ application_config:
+ services_calls: {}
+ streams_publishes:
+ tca_handle_out:
+ aaf_password:
+ get_property:
+ - SELF
+ - stream_publish_0
+ - aaf_password
+ aaf_username:
+ get_property:
+ - SELF
+ - stream_publish_0
+ - aaf_username
+ dmaap_info:
+ concat:
+ - '<<'
+ - get_property:
+ - SELF
+ - stream_publish_0
+ - node_name
+ - '>>'
+ type: message_router
+ streams_subscribes:
+ tca_handle_in:
+ aaf_password:
+ get_property:
+ - SELF
+ - stream_subscribe_0
+ - aaf_password
+ aaf_username:
+ get_property:
+ - SELF
+ - stream_subscribe_0
+ - aaf_username
+ dmaap_info:
+ concat:
+ - '<<'
+ - get_property:
+ - SELF
+ - stream_subscribe_0
+ - node_name
+ - '>>'
+ type: message_router
+ docker_config:
+ healthcheck:
+ endpoint: /
+ interval: 15s
+ timeout: 1s
+ type: https
+ ports:
+ - 11011:11011
+ image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.0
+ location_id:
+ get_input: location_id
+ service_component_type: tca-docker
+ streams_publishes:
+ - client_role:
+ get_property:
+ - SELF
+ - stream_publish_0
+ - client_role
+ location:
+ get_property:
+ - SELF
+ - stream_publish_0
+ - location
+ name:
+ get_property:
+ - SELF
+ - stream_publish_0
+ - node_name
+ type: message_router
+ streams_subscribes:
+ - client_role:
+ get_property:
+ - SELF
+ - stream_subscribe_0
+ - client_role
+ location:
+ get_property:
+ - SELF
+ - stream_subscribe_0
+ - location
+ name:
+ get_property:
+ - SELF
+ - stream_subscribe_0
+ - node_name
+ type: message_router
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ type: tosca.interfaces.Root
+ start:
+ inputs:
+ host_config: null
+ stop:
+ inputs:
+ cleanup_image: null
diff --git a/robot/assets/templates/sdc/catalog_service_monitoring.jinja b/robot/assets/templates/sdc/catalog_service_monitoring.jinja
new file mode 100644
index 00000000..3cd326e4
--- /dev/null
+++ b/robot/assets/templates/sdc/catalog_service_monitoring.jinja
@@ -0,0 +1,42 @@
+{
+ "artifacts": {},
+ "toscaArtifacts": {},
+ "contactId": "cs0008",
+ "categories": [
+ {
+ "name": "Network L4+",
+ "normalizedName": "network l4+",
+ "uniqueId": "serviceNewCategory.network l4+",
+ "icons": [
+ "network_l_4"
+ ],
+ "subcategories": null,
+ "version": null,
+ "ownerId": null,
+ "empty": false,
+ "type": null
+ }
+ ],
+ "description": "Created by robot for monitoring template",
+ "icon": "defaulticon",
+ "componentInstancesProperties": {},
+ "componentInstancesAttributes": {},
+ "name": "{{service_name}}",
+ "tags": [
+ "robot-ete",
+ "{{service_name}}"
+ ],
+ "capabilities": {},
+ "requirements": {},
+ "deploymentArtifacts": {},
+ "componentType": "SERVICE",
+ "projectCode": "123456",
+ "componentInstances": [],
+ "properties": [],
+ "attributes": [],
+ "forwardingPaths": {},
+ "ecompGeneratedNaming": true,
+ "serviceApiArtifacts": {},
+ "instantiationType": "A-la-carte",
+ "environmentContext": "General_Revenue-Bearing"
+}
diff --git a/robot/assets/templates/sdc/create_vfcmt.jinja b/robot/assets/templates/sdc/create_vfcmt.jinja
new file mode 100644
index 00000000..d399e25e
--- /dev/null
+++ b/robot/assets/templates/sdc/create_vfcmt.jinja
@@ -0,0 +1,4 @@
+{
+"name":"{{vfcmtName}}",
+"description":"{{description}}"
+}
diff --git a/robot/assets/templates/sdc/dcae_component_microservice.jinja b/robot/assets/templates/sdc/dcae_component_microservice.jinja
new file mode 100644
index 00000000..a3661b36
--- /dev/null
+++ b/robot/assets/templates/sdc/dcae_component_microservice.jinja
@@ -0,0 +1,41 @@
+{
+ "artifacts": {},
+ "toscaArtifacts": {},
+ "contactId": "cs0008",
+ "categories": [
+ {
+ "name": "DCAE Component",
+ "normalizedName": "dcaecomponent",
+ "uniqueId": "resourceNewCategory.dcaecomponent",
+ "subcategories": [
+ {
+ "name": "Microservice",
+ "normalizedName": "microservice",
+ "uniqueId": "resourceNewCategory.dcaecomponent.microservice",
+ "icons": [
+ "dcae_microservice"
+ ]
+ }
+ ]
+ }
+ ],
+ "description": "virtual function",
+ "icon": "defaulticon",
+ "componentInstancesProperties": {},
+ "componentInstancesAttributes": {},
+ "name": "{{resource_name}}",
+ "tags": [
+ "{{resource_name}}"
+ ],
+ "capabilities": {},
+ "requirements": {},
+ "deploymentArtifacts": {},
+ "componentType": "RESOURCE",
+ "vendorName": "{{vendor_name}}",
+ "vendorRelease": "1.0",
+ "componentInstances": [],
+ "properties": [],
+ "attributes": [],
+ "groups": [],
+ "resourceType": "VF"
+}
diff --git a/robot/assets/templates/sdc/dcae_composition.jinja b/robot/assets/templates/sdc/dcae_composition.jinja
new file mode 100644
index 00000000..c2557ca2
--- /dev/null
+++ b/robot/assets/templates/sdc/dcae_composition.jinja
@@ -0,0 +1,849 @@
+{
+ "cid": "{{cid}}",
+ "flowType": "TCA Hi Lo",
+ "inputs": [],
+ "nodes": [
+ {
+ "capabilities": [
+ {
+ "name": "feature",
+ "type": {
+ "id": "template.yaml/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ }
+ }
+ ],
+ "description": "/sdc/v1/catalog/resources/{{vf_id}}/toscaModel/",
+ "id": "{{vf_id}}",
+ "name": "tca-docker",
+ "ndata": {
+ "label": "tca-docker",
+ "name": "n.1559041944060.0",
+ "ports": [],
+ "px": 364,
+ "py": 437,
+ "radius": 30,
+ "x": 365,
+ "y": 438
+ },
+ "nid": "n.1559041944060.0",
+ "properties": [
+ {
+ "default": 10000,
+ "name": "cpu_period",
+ "required": true,
+ "type": "integer"
+ },
+ {
+ "default": 30000,
+ "name": "cpu_quota",
+ "required": true,
+ "type": "integer"
+ },
+ {
+ "default": 256,
+ "name": "cpu_shares",
+ "required": true,
+ "type": "integer"
+ },
+ {
+ "name": "image",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "composition",
+ "location_id"
+ ]
+ }
+ },
+ "name": "location_id",
+ "required": true,
+ "type": "string",
+ "value": {
+ "get_property": [
+ "SELF",
+ "composition",
+ "location_id"
+ ]
+ }
+ },
+ {
+ "default": "500m",
+ "name": "mem_limit",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "default": "on-failure",
+ "name": "restart_policy.Name",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "default": 3,
+ "name": "restart_policy.max_retry_counts",
+ "required": true,
+ "type": "integer"
+ },
+ {
+ "name": "service_component_type",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "requirements": [
+ {
+ "capability": {
+ "id": "template.yaml/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ },
+ "name": "stream_subscribe_0",
+ "node": "topic0",
+ "relationship": {
+ "type": "dcae.relationships.subscribe_to_events"
+ }
+ },
+ {
+ "capability": {
+ "id": "template.yaml/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ },
+ "name": "stream_publish_0",
+ "node": "topic1",
+ "relationship": {
+ "type": "dcae.relationships.publish_events"
+ }
+ },
+ {
+ "capability": {
+ "id": "template.yaml/dcae.capabilities.dockerHost",
+ "name": "dcae.capabilities.dockerHost"
+ },
+ "name": "host",
+ "relationship": {
+ "type": "dcae.relationships.component_contained_in"
+ }
+ },
+ {
+ "capability": {
+ "id": "template.yaml/dcae.capabilities.composition.host",
+ "name": "dcae.capabilities.composition.host"
+ },
+ "name": "composition"
+ },
+ {
+ "capability": {
+ "id": "template.yaml/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ },
+ "name": "dependency",
+ "node": "tosca.nodes.Root",
+ "occurrences": [
+ 0,
+ "UNBOUNDED"
+ ],
+ "relationship": {
+ "type": "tosca.relationships.DependsOn"
+ }
+ }
+ ],
+ "type": {
+ "name": "tosca.dcae.nodes.dockerApp.tca-docker"
+ },
+ "typeinfo": {
+ "capabilities": [
+ {
+ "name": "feature",
+ "type": {
+ "id": "{{vf_id}}/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ }
+ }
+ ],
+ "hierarchy": [
+ {
+ "id": "{{vf_id}}/tosca.dcae.nodes.dockerApp",
+ "name": "tosca.dcae.nodes.dockerApp"
+ },
+ {
+ "id": "{{vf_id}}/tosca.dcae.nodes.Root",
+ "name": "tosca.dcae.nodes.Root"
+ },
+ {
+ "description": "The TOSCA Node Type all other TOSCA base Node Types derive from",
+ "id": "{{vf_id}}/tosca.nodes.Root",
+ "name": "tosca.nodes.Root"
+ }
+ ],
+ "id": "{{vf_id}}/tosca.dcae.nodes.dockerApp.tca-docker",
+ "itemId": "{{vf_id}}/tosca.dcae.nodes.dockerApp.tca-docker",
+ "name": "tosca.dcae.nodes.dockerApp.tca-docker",
+ "requirements": [
+ {
+ "capability": {
+ "id": "{{vf_id}}/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ },
+ "id": "{{vf_id}}/stream_subscribe_0",
+ "name": "stream_subscribe_0",
+ "node": {
+ "id": "{{vf_id}}/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ },
+ "relationship": {
+ "type": "dcae.relationships.subscribe_to_events"
+ }
+ },
+ {
+ "capability": {
+ "id": "{{vf_id}}/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ },
+ "id": "{{vf_id}}/stream_publish_0",
+ "name": "stream_publish_0",
+ "node": {
+ "id": "{{vf_id}}/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ },
+ "relationship": {
+ "type": "dcae.relationships.publish_events"
+ }
+ },
+ {
+ "capability": {
+ "id": "{{vf_id}}/dcae.capabilities.dockerHost",
+ "name": "dcae.capabilities.dockerHost"
+ },
+ "id": "{{vf_id}}/host",
+ "name": "host",
+ "node": {
+ "id": "{{vf_id}}/dcae.capabilities.dockerHost",
+ "name": "dcae.capabilities.dockerHost"
+ },
+ "relationship": {
+ "type": "dcae.relationships.component_contained_in"
+ }
+ },
+ {
+ "capability": {
+ "id": "{{vf_id}}/dcae.capabilities.composition.host",
+ "name": "dcae.capabilities.composition.host"
+ },
+ "id": "{{vf_id}}/composition",
+ "name": "composition",
+ "node": {
+ "id": "{{vf_id}}/dcae.capabilities.composition.host",
+ "name": "dcae.capabilities.composition.host"
+ }
+ },
+ {
+ "capability": {
+ "id": "{{vf_id}}/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ },
+ "id": "{{vf_id}}/dependency",
+ "name": "dependency",
+ "node": {
+ "id": "{{vf_id}}/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ },
+ "occurrences": [
+ 0,
+ "UNBOUNDED"
+ ],
+ "relationship": {
+ "type": "tosca.relationships.DependsOn"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "capabilities": [
+ {
+ "name": "topic",
+ "properties": [
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "aaf_password"
+ ]
+ }
+ },
+ "name": "aaf_password",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "aaf_username"
+ ]
+ }
+ },
+ "name": "aaf_username",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "client_role"
+ ]
+ }
+ },
+ "name": "client_role",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "location"
+ ]
+ }
+ },
+ "name": "location",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "node_name"
+ ]
+ }
+ },
+ "name": "node_name",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "topic_name"
+ ]
+ }
+ },
+ "name": "topic_name",
+ "type": "string"
+ }
+ ],
+ "type": {
+ "id": "template.yaml/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ }
+ },
+ {
+ "name": "feature",
+ "type": {
+ "id": "template.yaml/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ }
+ }
+ ],
+ "description": "/sdc/v1/catalog/resources/{{vf_id}}/toscaModel/",
+ "id": "{{vf_id}}",
+ "name": "topic0",
+ "ndata": {
+ "label": "topic0",
+ "name": "n.1559041944077.1",
+ "ports": [],
+ "px": 414,
+ "py": 430.9243296300162,
+ "radius": 30,
+ "x": 415,
+ "y": 431.9243296300162
+ },
+ "nid": "n.1559041944077.1",
+ "properties": [
+ {
+ "assignment": {
+ "value": {
+ "get_input": "topic0_aaf_password"
+ }
+ },
+ "name": "aaf_password",
+ "type": "string",
+ "value": {
+ "get_input": "topic0_aaf_password"
+ }
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_input": "topic0_aaf_username"
+ }
+ },
+ "name": "aaf_username",
+ "type": "string",
+ "value": {
+ "get_input": "topic0_aaf_username"
+ }
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_input": "topic0_client_role"
+ }
+ },
+ "name": "client_role",
+ "type": "string",
+ "value": {
+ "get_input": "topic0_client_role"
+ }
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "composition",
+ "location_id"
+ ]
+ }
+ },
+ "name": "location",
+ "type": "string",
+ "value": {
+ "get_property": [
+ "SELF",
+ "composition",
+ "location_id"
+ ]
+ }
+ },
+ {
+ "assignment": {
+ "value": "__GET_NODE_NAME__"
+ },
+ "name": "node_name",
+ "type": "string",
+ "value": "__GET_NODE_NAME__"
+ },
+ {
+ "assignment": {
+ "value": ""
+ },
+ "name": "topic_name",
+ "type": "string"
+ }
+ ],
+ "requirements": [
+ {
+ "capability": {
+ "id": "template.yaml/dcae.capabilities.composition.host",
+ "name": "dcae.capabilities.composition.host"
+ },
+ "name": "composition"
+ },
+ {
+ "capability": {
+ "id": "template.yaml/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ },
+ "name": "dependency",
+ "node": "tosca.nodes.Root",
+ "occurrences": [
+ 0,
+ "UNBOUNDED"
+ ],
+ "relationship": {
+ "type": "tosca.relationships.DependsOn"
+ }
+ }
+ ],
+ "type": {
+ "name": "tosca.dcae.nodes.dmaap.topic"
+ },
+ "typeinfo": {
+ "capabilities": [
+ {
+ "name": "topic",
+ "type": {
+ "id": "{{vf_id}}/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ }
+ },
+ {
+ "name": "feature",
+ "type": {
+ "id": "{{vf_id}}/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ }
+ }
+ ],
+ "hierarchy": [
+ {
+ "id": "{{vf_id}}/tosca.dcae.nodes.Root",
+ "name": "tosca.dcae.nodes.Root"
+ },
+ {
+ "description": "The TOSCA Node Type all other TOSCA base Node Types derive from",
+ "id": "{{vf_id}}/tosca.nodes.Root",
+ "name": "tosca.nodes.Root"
+ }
+ ],
+ "id": "{{vf_id}}/tosca.dcae.nodes.dmaap.topic",
+ "itemId": "{{vf_id}}/tosca.dcae.nodes.dmaap.topic",
+ "name": "tosca.dcae.nodes.dmaap.topic",
+ "requirements": [
+ {
+ "capability": {
+ "id": "{{vf_id}}/dcae.capabilities.composition.host",
+ "name": "dcae.capabilities.composition.host"
+ },
+ "id": "{{vf_id}}/composition",
+ "name": "composition",
+ "node": {
+ "id": "{{vf_id}}/dcae.capabilities.composition.host",
+ "name": "dcae.capabilities.composition.host"
+ }
+ },
+ {
+ "capability": {
+ "id": "{{vf_id}}/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ },
+ "id": "{{vf_id}}/dependency",
+ "name": "dependency",
+ "node": {
+ "id": "{{vf_id}}/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ },
+ "occurrences": [
+ 0,
+ "UNBOUNDED"
+ ],
+ "relationship": {
+ "type": "tosca.relationships.DependsOn"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "capabilities": [
+ {
+ "name": "topic",
+ "properties": [
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "aaf_password"
+ ]
+ }
+ },
+ "name": "aaf_password",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "aaf_username"
+ ]
+ }
+ },
+ "name": "aaf_username",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "client_role"
+ ]
+ }
+ },
+ "name": "client_role",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "location"
+ ]
+ }
+ },
+ "name": "location",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "node_name"
+ ]
+ }
+ },
+ "name": "node_name",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "topic_name"
+ ]
+ }
+ },
+ "name": "topic_name",
+ "type": "string"
+ }
+ ],
+ "type": {
+ "id": "template.yaml/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ }
+ },
+ {
+ "name": "feature",
+ "type": {
+ "id": "template.yaml/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ }
+ }
+ ],
+ "description": "/sdc/v1/catalog/resources/{{vf_id}}/toscaModel/",
+ "id": "{{vf_id}}",
+ "name": "topic1",
+ "ndata": {
+ "label": "topic1",
+ "name": "n.1559041944083.2",
+ "ports": [],
+ "px": 464,
+ "py": 451.6297431929615,
+ "radius": 30,
+ "x": 465,
+ "y": 452.6297431929615
+ },
+ "nid": "n.1559041944083.2",
+ "properties": [
+ {
+ "assignment": {
+ "value": {
+ "get_input": "topic1_aaf_password"
+ }
+ },
+ "name": "aaf_password",
+ "type": "string",
+ "value": {
+ "get_input": "topic1_aaf_password"
+ }
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_input": "topic1_aaf_username"
+ }
+ },
+ "name": "aaf_username",
+ "type": "string",
+ "value": {
+ "get_input": "topic1_aaf_username"
+ }
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_input": "topic1_client_role"
+ }
+ },
+ "name": "client_role",
+ "type": "string",
+ "value": {
+ "get_input": "topic1_client_role"
+ }
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "composition",
+ "location_id"
+ ]
+ }
+ },
+ "name": "location",
+ "type": "string",
+ "value": {
+ "get_property": [
+ "SELF",
+ "composition",
+ "location_id"
+ ]
+ }
+ },
+ {
+ "assignment": {
+ "value": "__GET_NODE_NAME__"
+ },
+ "name": "node_name",
+ "type": "string",
+ "value": "__GET_NODE_NAME__"
+ },
+ {
+ "assignment": {
+ "value": ""
+ },
+ "name": "topic_name",
+ "type": "string"
+ }
+ ],
+ "requirements": [
+ {
+ "capability": {
+ "id": "template.yaml/dcae.capabilities.composition.host",
+ "name": "dcae.capabilities.composition.host"
+ },
+ "name": "composition"
+ },
+ {
+ "capability": {
+ "id": "template.yaml/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ },
+ "name": "dependency",
+ "node": "tosca.nodes.Root",
+ "occurrences": [
+ 0,
+ "UNBOUNDED"
+ ],
+ "relationship": {
+ "type": "tosca.relationships.DependsOn"
+ }
+ }
+ ],
+ "type": {
+ "name": "tosca.dcae.nodes.dmaap.topic"
+ },
+ "typeinfo": {
+ "capabilities": [
+ {
+ "name": "topic",
+ "type": {
+ "id": "{{vf_id}}/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ }
+ },
+ {
+ "name": "feature",
+ "type": {
+ "id": "{{vf_id}}/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ }
+ }
+ ],
+ "hierarchy": [
+ {
+ "id": "{{vf_id}}/tosca.dcae.nodes.Root",
+ "name": "tosca.dcae.nodes.Root"
+ },
+ {
+ "description": "The TOSCA Node Type all other TOSCA base Node Types derive from",
+ "id": "{{vf_id}}/tosca.nodes.Root",
+ "name": "tosca.nodes.Root"
+ }
+ ],
+ "id": "{{vf_id}}/tosca.dcae.nodes.dmaap.topic",
+ "itemId": "{{vf_id}}/tosca.dcae.nodes.dmaap.topic",
+ "name": "tosca.dcae.nodes.dmaap.topic",
+ "requirements": [
+ {
+ "capability": {
+ "id": "{{vf_id}}/dcae.capabilities.composition.host",
+ "name": "dcae.capabilities.composition.host"
+ },
+ "id": "{{vf_id}}/composition",
+ "name": "composition",
+ "node": {
+ "id": "{{vf_id}}/dcae.capabilities.composition.host",
+ "name": "dcae.capabilities.composition.host"
+ }
+ },
+ {
+ "capability": {
+ "id": "{{vf_id}}/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ },
+ "id": "{{vf_id}}/dependency",
+ "name": "dependency",
+ "node": {
+ "id": "{{vf_id}}/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ },
+ "occurrences": [
+ 0,
+ "UNBOUNDED"
+ ],
+ "relationship": {
+ "type": "tosca.relationships.DependsOn"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "outputs": [],
+ "relations": [
+ {
+ "meta": {
+ "n1": "n.1559041944060.0",
+ "n2": "n.1559041944077.1",
+ "p1": "stream_subscribe_0",
+ "p2": "topic",
+ "relationship": [
+ "tca-docker",
+ null,
+ "stream_subscribe_0"
+ ]
+ },
+ "n1": "n.1559041944060.0",
+ "n2": "n.1559041944077.1",
+ "name1": "tca-docker",
+ "name2": "topic0",
+ "rid": "lnk.1559041944098.3"
+ },
+ {
+ "meta": {
+ "n1": "n.1559041944060.0",
+ "n2": "n.1559041944083.2",
+ "p1": "stream_publish_0",
+ "p2": "topic",
+ "relationship": [
+ "tca-docker",
+ null,
+ "stream_publish_0"
+ ]
+ },
+ "n1": "n.1559041944060.0",
+ "n2": "n.1559041944083.2",
+ "name1": "tca-docker",
+ "name2": "topic1",
+ "rid": "lnk.1559041944104.4"
+ }
+ ],
+ "version": 0
+}
diff --git a/robot/assets/templates/sdc/dcae_monitoring_configuration.jinja b/robot/assets/templates/sdc/dcae_monitoring_configuration.jinja
new file mode 100644
index 00000000..27a5d020
--- /dev/null
+++ b/robot/assets/templates/sdc/dcae_monitoring_configuration.jinja
@@ -0,0 +1,11 @@
+{
+ "name": "{{name}}",
+ "description": "Created by robot",
+ "templateUuid": "{{template_uuid}}",
+ "vfiName": "{{vfi_name}}",
+ "serviceUuid": "{{service_uuid}}",
+ "contextType": "SERVICE",
+ "flowType": "TCA Hi Lo",
+ "cloneVFCMT": true,
+ "updateFlowType": false
+}
diff --git a/robot/resources/global_properties.robot b/robot/resources/global_properties.robot
index ff56b031..499159ad 100644
--- a/robot/resources/global_properties.robot
+++ b/robot/resources/global_properties.robot
@@ -47,4 +47,5 @@ ${GLOBAL_SO_VFC_ENDPOINT} ${GLOBAL_SO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_S
${GLOBAL_SO_VNFM_ENDPOINT} ${GLOBAL_SO_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SO_VNFM_IP_ADDR}:${GLOBAL_SO_VNFM_SERVER_PORT}
${GLOBAL_SO_HEALTH_CHECK_PATH} /manage/health
${GLOBAL_SO_CLOUD_CONFIG_PATH} /cloudSite
-${GLOBAL_SO_CLOUD_CONFIG_TEMPLATE} robot/assets/templates/so/create_cloud_config.jinja \ No newline at end of file
+${GLOBAL_SO_CLOUD_CONFIG_TEMPLATE} robot/assets/templates/so/create_cloud_config.jinja
+${GLOBAL_SDC_DCAE_BE_ENDPOINT} ${GLOBAL_SDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_DCAE_BE_IP_ADDR}:${GLOBAL_SDC_DCAE_BE_PORT}
diff --git a/robot/resources/sdc_dcaed_interface.robot b/robot/resources/sdc_dcaed_interface.robot
new file mode 100644
index 00000000..5bb49ad3
--- /dev/null
+++ b/robot/resources/sdc_dcaed_interface.robot
@@ -0,0 +1,72 @@
+*** Settings ***
+Library json
+Library ONAPLibrary.Utilities
+Library ONAPLibrary.Templating WITH NAME Templating
+Library ONAPLibrary.SDC WITH NAME SDC
+Resource global_properties.robot
+
+*** Variables ***
+${SDC_DESIGNER_USER_ID} cs0008
+${DCAE_PATH} /dcae
+${DCAE_CREATE_BLUEPRINT_PATH} /SERVICE/createBluePrint
+${DCAE_VFCMT_TEMPLATE} sdc/create_vfcmt.jinja
+${DCAE_COMPOSITION_TEMPLATE} sdc/dcae_composition.jinja
+${DCAE_MONITORING_CONFIGURATION_TEMPLATE} sdc/dcae_monitoring_configuration.jinja
+
+*** Keywords ***
+Create Monitoring Template
+ [Documentation] Create a new monitoring template containing the DCAE VF, certify it and return the uuid
+ [Arguments] ${vfcmt_name} ${vf_uuid}
+ ${vfcmt_uuid} Add VFCMT To DCAE-DS ${vfcmt_name}
+ Save Composition ${vfcmt_uuid} ${vf_uuid}
+ # Note that certification is not instructed in
+ # https://wiki.onap.org/display/DW/How+to+Create+a+Service+with+a+Monitoring+Configuration+using+SDC
+ # due to limitations of GUI so this test case goes beyond the instructions at this certification step
+ ${cert_vfcmt_uuid} Certify VFCMT ${vfcmt_uuid}
+ [return] ${cert_vfcmt_uuid}
+
+Add VFCMT To DCAE-DS
+ [Documentation] Create VFCMT with the given name and return its uuid
+ [Arguments] ${vfcmt_name}
+ ${map}= Create Dictionary vfcmtName=${vfcmt_name} description=VFCMT created by robot
+ Create Environment create_vfcmt ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Apply Template create_vfcmt ${DCAE_VFCMT_TEMPLATE} ${map}
+ ${resp}= SDC.Run Post Request ${GLOBAL_SDC_DCAE_BE_ENDPOINT} ${DCAE_PATH}/createVFCMT ${data} ${SDC_DESIGNER_USER_ID}
+ Should Be Equal As Strings ${resp.status_code} 200
+ [Return] ${resp.json()['uuid']}
+
+Save Composition
+ [Arguments] ${vfcmt_uuid} ${vf_uuid}
+ ${map}= Create Dictionary cid=${vfcmt_uuid} vf_id=${vf_uuid}
+ Create Environment dcae_composition ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Apply Template dcae_composition ${DCAE_COMPOSITION_TEMPLATE} ${map}
+ ${resp}= SDC.Run Post Request ${GLOBAL_SDC_DCAE_BE_ENDPOINT} ${DCAE_PATH}/saveComposition/${vfcmt_uuid} ${data} ${SDC_DESIGNER_USER_ID}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+Certify VFCMT
+ [Arguments] ${vfcmt_uuid}
+ ${resp}= SDC.Run Put Request ${GLOBAL_SDC_DCAE_BE_ENDPOINT} ${DCAE_PATH}/certify/vfcmt/${vfcmt_uuid} ${None} ${SDC_DESIGNER_USER_ID}
+ Should Be Equal As Strings ${resp.status_code} 200
+ [Return] ${resp.json()['uuid']}
+
+Create Monitoring Configuration To DCAE-DS
+ [Documentation] Create a monitoring configuration to DCAE-DS using SDC Catalog Service uuid,
+ ... VFMCT uuid and instance name and monitoring configuration name
+ [Arguments] ${vfcmt_uuid} ${cs_uuid} ${vfi_name} ${mc_name}
+ ${mc_uuid} Add Monitoring Configuration To DCAE-DS ${vfcmt_uuid} ${cs_uuid} ${vfi_name} ${mc_name}
+ Submit Monitoring Configuration To DCAE-DS ${mc_uuid} ${cs_uuid} ${vfi_name}
+
+Add Monitoring Configuration To DCAE-DS
+ [Arguments] ${vfcmt_uuid} ${cs_uuid} ${vfi_name} ${mc_name}
+ ${map}= Create Dictionary template_uuid=${vfcmt_uuid} service_uuid=${cs_uuid} vfi_name=${vfi_name} name=${mc_name}
+ Create Environment dcae_monitoring_configuration ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Apply Template dcae_monitoring_configuration ${DCAE_MONITORING_CONFIGURATION_TEMPLATE} ${map}
+ ${resp}= SDC.Run Post Request ${GLOBAL_SDC_DCAE_BE_ENDPOINT} ${DCAE_PATH}/importMC ${data} ${SDC_DESIGNER_USER_ID}
+ Should Be Equal As Strings ${resp.status_code} 200
+ [Return] ${resp.json()['vfcmt']['uuid']}
+
+Submit Monitoring Configuration To DCAE-DS
+ [Arguments] ${mc_uuid} ${cs_uuid} ${vfi_name}
+ ${url_vfi_name} url_encode_string ${vfi_name}
+ ${resp}= SDC.Run Post Request ${GLOBAL_SDC_DCAE_BE_ENDPOINT} ${DCAE_PATH}${DCAE_CREATE_BLUEPRINT_PATH}/${mc_uuid}/${cs_uuid}/${url_vfi_name} ${None} ${SDC_DESIGNER_USER_ID}
+ Should Be Equal As Strings ${resp.status_code} 200
diff --git a/robot/resources/sdc_interface.robot b/robot/resources/sdc_interface.robot
index 040008c1..1f77f9b7 100644
--- a/robot/resources/sdc_interface.robot
+++ b/robot/resources/sdc_interface.robot
@@ -62,6 +62,8 @@ ${SDC_CATALOG_NET_RESOURCE_INPUT_TEMPLATE} sdc/catalog_net_input_properties.j
${SDC_ALLOTTED_RESOURCE_CATALOG_RESOURCE_TEMPLATE} sdc/catalog_resource_alloted_resource.jinja
${SDC_CATALOG_ALLOTTED_RESOURCE_PROPERTIES_TEMPLATE} sdc/catalog_allotted_properties.jinja
${SDC_CATALOG_ALLOTTED_RESOURCE_INPUTS_TEMPLATE} sdc/catalog_allotted_inputs.jinja
+${SDC_CATALOG_SERVICE_MONITORING_TEMPLATE} sdc/catalog_service_monitoring.jinja
+${SDC_DCAE_COMPONENT_MICROSERVICE_TEMPLATE} sdc/dcae_component_microservice.jinja
${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH} robot/assets/sdc/blueprints/
${SDC_FE_ENDPOINT} ${GLOBAL_SDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_FE_IP_ADDR}:${GLOBAL_SDC_FE_PORT}
${SDC_BE_ENDPOINT} ${GLOBAL_SDC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDC_BE_IP_ADDR}:${GLOBAL_SDC_BE_PORT}
@@ -105,7 +107,7 @@ Distribute Model From SDC
:FOR ${vnf} IN @{vnflist}
\ ${loop_catalog_resource_resp}= Get SDC Catalog Resource ${resource_types['${vnf}']}
\ Set To Dictionary ${catalog_resources} ${resource_types['${vnf}']}=${loop_catalog_resource_resp}
- \ ${catalog_resource_unique_name}= Add SDC Resource Instance ${catalog_service_id} ${resource_types['${vnf}']} ${loop_catalog_resource_resp['name']} ${xoffset} resourceType=${resourceType}
+ \ ${catalog_resource_unique_name} ${catalog_resource_name} Add SDC Resource Instance ${catalog_service_id} ${resource_types['${vnf}']} ${loop_catalog_resource_resp['name']} ${xoffset} resourceType=${resourceType}
\ ${xoffset}= Set Variable ${xoffset+100}
#
# do this here because the loop_catalog_resource_resp is different format after adding networks
@@ -119,7 +121,7 @@ Distribute Model From SDC
\ ${loop_catalog_resource_id}= Set Variable ${generic_neutron_net_uuid}
\ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id}
\ ${loop_catalog_resource_resp}= Get SDC Catalog Resource ${loop_catalog_resource_id}
- \ ${loop_catalog_resource_id}= Add SDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${network} ${xoffset} ${0} VL
+ \ ${loop_catalog_resource_id} ${loop_catalog_resource_name} Add SDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${network} ${xoffset} ${0} VL
\ ${nf_role}= Convert To Lowercase ${network}
\ Setup SDC Catalog Resource GenericNeutronNet Properties ${catalog_service_id} ${nf_role} ${loop_catalog_resource_id}
\ ${xoffset}= Set Variable ${xoffset+100}
@@ -207,7 +209,7 @@ Distribute vCPEResCust Model From SDC
#
\ Run Keyword If '${allottedresource}'=='TunnelXConn' Setup SDC Catalog Resource AllottedResource Inputs ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id}
\ Run Keyword If '${allottedresource}'=='BRG' Setup SDC Catalog Resource AllottedResource Inputs ${catalog_service_id} ${allottedresource} ${loop_catalog_resource_id}
- \ ${loop_catalog_resource_id}= Certify SDC Catalog Resource ${loop_catalog_resource_id} ${SDC_DESIGNER_USER_ID}
+ \ ${loop_catalog_resource_id} ${loop_catalog_resource_uuid} Certify SDC Catalog Resource ${loop_catalog_resource_id} ${SDC_DESIGNER_USER_ID}
\ Add SDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${loop_catalog_resource_resp['name']}
\ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp}
${catalog_service_resp}= Get SDC Catalog Service ${catalog_service_id}
@@ -315,7 +317,7 @@ Setup SDC Catalog Resource
# Check if need to set up CDS properties
Run Keyword If '${cds}' == 'vfwng' Setup SDC Catalog Resource CDS Properties ${catalog_resource_id}
- ${catalog_resource_id}= Certify SDC Catalog Resource ${catalog_resource_id} ${SDC_DESIGNER_USER_ID}
+ ${catalog_resource_id} ${catalog_resource_uuid} Certify SDC Catalog Resource ${catalog_resource_id} ${SDC_DESIGNER_USER_ID}
[Return] ${catalog_resource_id}
Setup SDC Catalog Resource Deployment Artifact Properties
@@ -776,14 +778,14 @@ Start Certify SDC Catalog Resource
[Return] ${resp.json()}
Certify SDC Catalog Resource
- [Documentation] Certifies an SDC Catalog Resource by its id and returns the new id
+ [Documentation] Certifies an SDC Catalog Resource by its id and returns the new uniqueId and uuid
[Arguments] ${catalog_resource_id} ${user_id}=${SDC_TESTER_USER_ID}
${map}= Create Dictionary user_remarks=Robot remarks
Templating.Create Environment sdc ${GLOBAL_TEMPLATE_FOLDER}
${data}= Templating.Apply Template sdc ${SDC_USER_REMARKS_TEMPLATE} ${map}
${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${SDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${user_id} auth=${GLOBAL_SDC_AUTHENTICATION}
Should Be Equal As Strings ${resp.status_code} 200
- [Return] ${resp.json()['uniqueId']}
+ [Return] ${resp.json()['uniqueId']} ${resp.json()['uuid']}
Upload SDC Heat Package
[Documentation] Creates an SDC Software Product and returns its id
@@ -871,7 +873,7 @@ Approve SDC Catalog Service
${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${SDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH}${SDC_DISTRIBUTION_STATE_APPROVE_PATH} ${data} ${SDC_GOVERNOR_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
Should Be Equal As Strings ${resp.status_code} 200
[Return] ${resp.json()}
-
+
Distribute SDC Catalog Service
[Documentation] distribute an SDC Catalog Service by its id
[Arguments] ${catalog_service_id}
@@ -880,7 +882,7 @@ Distribute SDC Catalog Service
[Return] ${resp.json()}
Add SDC Resource Instance
- [Documentation] Creates an SDC Resource Instance and returns its id
+ [Documentation] Creates an SDC Resource Instance and returns its id and name
[Arguments] ${catalog_service_id} ${catalog_resource_id} ${catalog_resource_name} ${xoffset}=${0} ${yoffset}=${0} ${resourceType}=VF
${milli_timestamp}= Generate Timestamp
${xoffset}= Set Variable ${xoffset+306}
@@ -890,7 +892,7 @@ Add SDC Resource Instance
${data}= Templating.Apply Template sdc ${SDC_RESOURCE_INSTANCE_TEMPLATE} ${map}
${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${SDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
Should Be Equal As Strings ${resp.status_code} 201
- [Return] ${resp.json()['uniqueId']}
+ [Return] ${resp.json()['uniqueId']} ${resp.json()['name']}
Add SDC Resource Instance To Resource
[Documentation] Creates an SDC Resource Instance in a Resource (VF) and returns its id
@@ -975,8 +977,8 @@ Create Multi Part
Set To Dictionary ${addTo} ${partName}=${partData}
-Add CDS Parameters
- [Arguments] ${catalog_service_name}
+Add CDS Parameters
+ [Arguments] ${catalog_service_name}
${resp}= SDC.Run Get Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/serviceName/${catalog_service_name}/serviceVersion/0.1 ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
${service_uuid}= Set Variable ${resp.json()['uniqueId']}
${component_uuid}= Set Variable ${resp.json()['componentInstances'][0]['uniqueId']}
@@ -987,9 +989,9 @@ Add CDS Parameters
... ELSE IF '${input['name']}' == "sdnc_model_name" Set Input Parameter ${service_uuid} ${component_uuid} ${input} string vlb_cds_test
... ELSE IF '${input['name']}' == "sdnc_model_version" Set Input Parameter ${service_uuid} ${component_uuid} ${input} string 1.0.0
... ELSE IF '${input['name']}' == "skip_post_instantiation_configuration" Set Input Parameter ${service_uuid} ${component_uuid} ${input} boolean ${skip_post_instatiation}
-
-Set Input Parameter
+
+Set Input Parameter
[Arguments] ${service_uuid} ${component_uuid} ${input} ${input_type} ${input_value}
${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH}/${service_uuid}/resourceInstance/${component_uuid}/inputs {"constraints":[],"name":"${input['name']}","parentUniqueId":"${input['parentUniqueId']}","password":false,"required":false,"schema":{"property":{}},"type":"${input_type}","uniqueId":"${input['uniqueId']}","value":"${input_value}","definition":false,"toscaPresentation":{"ownerId":"${input['ownerId']}"}} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
Should Be Equal As Strings ${resp.status_code} 200
@@ -1002,3 +1004,77 @@ Get Service Model Parameter from SDC Service Catalog
${json_resp}= Set Variable ${resp.json()}
${parameter_value}= Set Variable ${json_resp["${parameter_name}"]}
[Return] ${parameter_value}
+
+Onboard DCAE Microservice
+ [Documentation] Create DCAE Microservice with a given name, add Tosca artifacts to it and certify it
+ ... Return the unique_id and uuid of the certified VF
+ [Arguments] ${test_vf_name}
+ ${data}= Create SDC Catalog Resource For DCAE Component MicroService Data ${test_vf_name} TestVendor
+ ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
+ Should Be Equal As Strings ${resp.status_code} 201
+
+ ${vf_unique_id}= Set Variable ${resp.json()['uniqueId']}
+
+ Add Tosca Artifact to Resource template ${vf_unique_id}
+ Add Tosca Artifact to Resource translate ${vf_unique_id}
+ Add Tosca Artifact to Resource schema ${vf_unique_id}
+
+ ${cert_vf_unique_id} ${cert_vf_uuid} Certify SDC Catalog Resource ${vf_unique_id} ${SDC_DESIGNER_USER_ID}
+ [return] ${cert_vf_unique_id} ${cert_vf_uuid}
+
+Create SDC Catalog Resource For DCAE Component MicroService Data
+ [Documentation] Creates and returns data for DCAE Component MicroService SDC Catalog Resource
+ [Arguments] ${resource_name} ${vendor_name}
+ ${map}= Create Dictionary resource_name=${resource_name} vendor_name=${vendor_name}
+ Templating.Create Environment sdc_dcaed ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc_dcaed ${SDC_DCAE_COMPONENT_MICROSERVICE_TEMPLATE} ${map}
+ [Return] ${data}
+
+Add Tosca Artifact To Resource
+ [Documentation] Add Tosca artifacts to given resource id
+ [Arguments] ${artifact} ${vf_id}
+ ${blueprint_data} OperatingSystem.Get File ${SDC_CATALOG_DEPLOYMENT_ARTIFACT_PATH}${artifact}.yaml
+ ${payloadData}= Base64 Encode ${blueprint_data}
+ ${dict}= Create Dictionary artifactLabel=${artifact} artifactName=${artifact}.yaml artifactType=DCAE_TOSCA artifactGroupType=DEPLOYMENT description=${artifact}.yaml payloadData=${payloadData}
+ Templating.Create Environment sdc_artifact_upload ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc_artifact_upload ${SDC_ARTIFACT_UPLOAD_TEMPLATE} ${dict}
+ # POST artifactUpload to resource
+ ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_RESOURCES_PATH}/${vf_id}/artifacts ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
+ Should Be Equal As Strings ${resp.status_code} 200
+ [Return] ${resp}
+
+Add Catalog Service For Monitoring Template
+ [Documentation] Creates SDC Catalog Service for Monitoring Template with given name
+ [Arguments] ${service_name}
+ ${map}= Create Dictionary service_name=${service_name}
+ Templating.Create Environment sdc_catalog_service ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Templating.Apply Template sdc_catalog_service ${SDC_CATALOG_SERVICE_MONITORING_TEMPLATE} ${map}
+ ${resp}= SDC.Run Post Request ${SDC_BE_ENDPOINT} ${SDC_CATALOG_SERVICES_PATH} ${data} ${SDC_DESIGNER_USER_ID} auth=${GLOBAL_SDC_AUTHENTICATION}
+ Should Be Equal As Strings ${resp.status_code} 201
+ [Return] ${resp.json()['uniqueId']} ${resp.json()['uuid']}
+
+Generate Unique Postfix
+ [Documentation] Create and return unique postfix to be used in various unique names
+ ${tmp_id} = Generate Timestamp
+ ${tmp_str} = Convert To String ${tmp_id}
+ [return] ${tmp_str}
+
+Certify And Approve SDC Catalog Service
+ [Documentation] Perform the required steps to certify and approve the given SDC catalog service
+ [Arguments] ${cs_unique_id}
+
+ Checkin SDC Catalog Service ${cs_unique_id}
+ Request Certify SDC Catalog Service ${cs_unique_id}
+ Start Certify SDC Catalog Service ${cs_unique_id}
+ ${cert_cs_unique_id}= Certify SDC Catalog Service ${cs_unique_id}
+ Approve SDC Catalog Service ${cert_cs_unique_id}
+
+Create Monitoring Configuration
+ [Documentation] Create a monitoring configuration for a given service based on a previously created VFCMT
+ ... Return the unique_id and uuid of the created catalog service for the monitoring configuration
+ ... and the name of the related VFCMT instance
+ [Arguments] ${service_name} ${vf_unique_id} ${vf_name}
+ ${cs_unique_id} ${cs_uuid} Add Catalog Service For Monitoring Template ${service_name}
+ ${vfi_uuid} ${vfi_name} Add SDC Resource Instance ${cs_unique_id} ${vf_unique_id} ${vf_name}
+ [return] ${cs_unique_id} ${cs_uuid} ${vfi_name}
+
diff --git a/robot/testsuites/sdc-dcae-d.robot b/robot/testsuites/sdc-dcae-d.robot
new file mode 100644
index 00000000..f156657f
--- /dev/null
+++ b/robot/testsuites/sdc-dcae-d.robot
@@ -0,0 +1,22 @@
+*** Settings ***
+Resource ../resources/sdc_interface.robot
+Resource ../resources/sdc_dcaed_interface.robot
+
+*** Test Cases ***
+# This test case implements the steps described in
+# https://wiki.onap.org/display/DW/How+to+Create+a+Service+with+a+Monitoring+Configuration+using+SDC
+Create Service With Monitoring Configuration Test
+ [Tags] sdc-dcae-d
+ [Documentation] Create a service with a monitoring configuration
+
+ ${unique_postfix}= sdc_interface.Generate Unique Postfix
+ ${test_vf_name}= Set Variable TestVF_${unique_postfix}
+ ${test_cs_name}= Set Variable TestService_${unique_postfix}
+ ${test_vfcmt_name}= Set Variable TestVFCMT_${unique_postfix}
+ ${test_mc_name}= Set Variable TestMC_${unique_postfix}
+
+ ${cert_vf_unique_id} ${cert_vf_uuid} sdc_interface.Onboard DCAE Microservice ${test_vf_name}
+ ${cert_vfcmt_uuid} sdc_dcaed_interface.Create Monitoring Template ${test_vfcmt_name} ${cert_vf_uuid}
+ ${cs_unique_id} ${cs_uuid} ${vfi_name} sdc_interface.Create Monitoring Configuration ${test_cs_name} ${cert_vf_unique_id} ${test_vf_name}
+ sdc_dcaed_interface.Create Monitoring Configuration To DCAE-DS ${cert_vfcmt_uuid} ${cs_uuid} ${vfi_name} ${test_mc_name}
+ sdc_interface.Certify And Approve SDC Catalog Service ${cs_unique_id}