summaryrefslogtreecommitdiffstats
path: root/dpo/tosca_models
diff options
context:
space:
mode:
Diffstat (limited to 'dpo/tosca_models')
-rw-r--r--dpo/tosca_models/policy.yaml32
-rw-r--r--dpo/tosca_models/schema.yaml570
-rw-r--r--dpo/tosca_models/template.yaml104
-rw-r--r--dpo/tosca_models/translate.yaml160
4 files changed, 866 insertions, 0 deletions
diff --git a/dpo/tosca_models/policy.yaml b/dpo/tosca_models/policy.yaml
new file mode 100644
index 0000000..ec29b82
--- /dev/null
+++ b/dpo/tosca_models/policy.yaml
@@ -0,0 +1,32 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+node_types:
+ 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
+ policy.nodes.dcaegen2.services.pm-mapper:
+ derived_from: policy.nodes.Root
+ properties:
+ buscontroller_feed_subscription_endpoint:
+ type: string
+ description: DMAAP Bus Controller subscription endpoint
+ dmaap_dr_delete_endpoint:
+ type: string
+ description: DMAAP Data Router endpoint to delete file
+ dmaap_dr_feed_id:
+ type: string
+ description: ID of the data router feed that the PM Mapper will subscribe to
+ policy:
+ type: string
+ description: PM Mapper policy JSON string
diff --git a/dpo/tosca_models/schema.yaml b/dpo/tosca_models/schema.yaml
new file mode 100644
index 0000000..e851e48
--- /dev/null
+++ b/dpo/tosca_models/schema.yaml
@@ -0,0 +1,570 @@
+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.feed
+ relationship: dcae.relationships.subscribe_to_files
+ - stream_publish_0:
+ capability: dcae.capabilities.dmmap.topic
+ relationship: dcae.relationships.publish_events
+ - policy:
+ capability: dcae.capabilities.policy
+ relationship: cloudify.relationships.depends_on
+ 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.dcaegen2.services.pm-mapper:
+ derived_from: tosca.dcae.nodes.dockerApp
+ properties:
+ buscontroller_feed_subscription_endpoint:
+ type: string
+ dmaap_dr_delete_endpoint:
+ type: string
+ dmaap_dr_feed_id:
+ type: string
+ filter:
+ type: string
+ policy:
+ type: string
+ service_name:
+ type: string
+ requirements:
+ - stream_subscribe_0:
+ capability: dcae.capabilities.dmmap.feed
+ relationship: dcae.relationships.subscribe_to_files
+ - stream_publish_0:
+ capability: dcae.capabilities.dmmap.topic
+ relationship: dcae.relationships.publish_events
+ - policy:
+ capability: dcae.capabilities.policy
+ relationship: cloudify.relationships.depends_on
+ 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/dpo/tosca_models/template.yaml b/dpo/tosca_models/template.yaml
new file mode 100644
index 0000000..02fc124
--- /dev/null
+++ b/dpo/tosca_models/template.yaml
@@ -0,0 +1,104 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: dcaegen2.services.pm-mapper
+imports:
+- schema: schema.yaml
+topology_template:
+ inputs:
+ topic1_aaf_password:
+ type: string
+ topic1_aaf_username:
+ type: string
+ topic1_client_role:
+ type: string
+ node_templates:
+ dcaegen2.services.pm-mapper:
+ type: tosca.dcae.nodes.dockerApp.dcaegen2.services.pm-mapper
+ properties:
+ buscontroller_feed_subscription_endpoint: http://dmaap-bc.onap.svc.cluster.local:8080/webapi/dr_subs
+ dmaap_dr_delete_endpoint: http://dmaap-dr-node.onap.svc.cluster.local:8443/delete
+ dmaap_dr_feed_id: bulk_pm_feed
+ filter: '{ "filters":[]}'
+ location_id:
+ get_property:
+ - SELF
+ - composition
+ - location_id
+ policy: ''
+ service_name: pm-mapper
+ requirements:
+ - stream_subscribe_0: feed0
+ - stream_publish_0: topic1
+ - policy: policy_0
+ feed0:
+ type: tosca.dcae.nodes.dmaap.feed
+ properties:
+ feed_name: ''
+ location:
+ get_property:
+ - SELF
+ - composition
+ - location_id
+ node_name: __GET_NODE_NAME__
+ capabilities:
+ feed:
+ properties:
+ feed_name:
+ get_property:
+ - SELF
+ - feed_name
+ location:
+ get_property:
+ - SELF
+ - location
+ node_name:
+ get_property:
+ - SELF
+ - node_name
+ policy_0:
+ type: tosca.dcae.nodes.policy
+ properties:
+ policy_name: policy.nodes.dcaegen2.services.pm-mapper
+ 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/dpo/tosca_models/translate.yaml b/dpo/tosca_models/translate.yaml
new file mode 100644
index 0000000..2d45100
--- /dev/null
+++ b/dpo/tosca_models/translate.yaml
@@ -0,0 +1,160 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: dcaegen2.services.pm-mapper_translate
+imports:
+- schema: schema.yaml
+topology_template:
+ inputs:
+ buscontroller_feed_subscription_endpoint:
+ type: string
+ cpu_period:
+ type: integer
+ default: 10000
+ cpu_quota:
+ type: integer
+ default: 30000
+ cpu_shares:
+ type: integer
+ default: 256
+ dmaap_dr_delete_endpoint:
+ type: string
+ dmaap_dr_feed_id:
+ type: string
+ filter:
+ type: string
+ image:
+ type: string
+ location_id:
+ type: string
+ mem_limit:
+ type: string
+ default: 500m
+ policy:
+ type: string
+ restart_policy.Name:
+ type: string
+ default: on-failure
+ restart_policy.max_retry_counts:
+ type: integer
+ default: 3
+ service_component_type:
+ type: string
+ service_name:
+ type: string
+ substitution_mappings:
+ node_type: tosca.dcae.nodes.dockerApp.dcaegen2.services.pm-mapper
+ capabilities: {}
+ requirements:
+ host:
+ - dcaegen2.services.pm-mapper
+ - host
+ policy:
+ - dcaegen2.services.pm-mapper
+ - policy
+ stream_publish_0:
+ - dcaegen2.services.pm-mapper
+ - stream_publish_0
+ stream_subscribe_0:
+ - dcaegen2.services.pm-mapper
+ - stream_subscribe_0
+ node_templates:
+ dcaegen2.services.pm-mapper:
+ type: dcae.nodes.DockerContainerForComponentsUsingDmaap
+ properties:
+ application_config:
+ buscontroller_feed_subscription_endpoint:
+ get_input: buscontroller_feed_subscription_endpoint
+ dmaap_dr_delete_endpoint:
+ get_input: dmaap_dr_delete_endpoint
+ dmaap_dr_feed_id:
+ get_input: dmaap_dr_feed_id
+ filter:
+ get_input: filter
+ policy:
+ get_input: policy
+ service_name:
+ get_input: service_name
+ services_calls: {}
+ streams_publishes:
+ pm_mapper_publish_mr:
+ 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:
+ pm_mapper_subscribe_dr:
+ dmaap_info:
+ concat:
+ - '<<'
+ - get_property:
+ - SELF
+ - stream_subscribe_0
+ - node_name
+ - '>>'
+ type: data_router
+ docker_config:
+ healthcheck:
+ endpoint: /healthcheck
+ interval: 30s
+ timeout: 10s
+ type: http
+ policy:
+ script_path: /opt/app/reconfigure.sh
+ trigger_type: docker
+ image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-mapper:1.0-SNAPSHOT
+ location_id:
+ get_input: location_id
+ service_component_type: dcaegen2.services.pm-mapper
+ 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:
+ - location:
+ get_property:
+ - SELF
+ - stream_subscribe_0
+ - location
+ name:
+ get_property:
+ - SELF
+ - stream_subscribe_0
+ - node_name
+ type: data_router
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ type: tosca.interfaces.Root
+ start:
+ inputs:
+ host_config: null
+ stop:
+ inputs:
+ cleanup_image: null