summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorVijay Venkatesh Kumar <vv770d@att.com>2020-02-17 16:27:06 +0000
committerGerrit Code Review <gerrit@onap.org>2020-02-17 16:27:06 +0000
commitd42ac06c733c43e19a01b4203c1b987b4973ccfd (patch)
treec102d59e054fe718660d58b6c277945989a72fce /components
parentff923eefcd8bbbd53fbee16e6a7bfca3d2b34e3b (diff)
parent5510c12378772030e1fa0c3aa1fb3dadfbeeca86 (diff)
Merge "Added initial component spec and blueprint"
Diffstat (limited to 'components')
-rwxr-xr-xcomponents/pm-subscription-handler/dpo/blueprints/k8s-pmsh.yaml213
-rwxr-xr-xcomponents/pm-subscription-handler/dpo/data-formats/aai-event-format.json11
-rwxr-xr-xcomponents/pm-subscription-handler/dpo/data-formats/pmsh-cl-input.json11
-rwxr-xr-xcomponents/pm-subscription-handler/dpo/data-formats/pmsh-cl-output.json199
-rwxr-xr-xcomponents/pm-subscription-handler/dpo/spec/pmsh-component-spec.json143
5 files changed, 577 insertions, 0 deletions
diff --git a/components/pm-subscription-handler/dpo/blueprints/k8s-pmsh.yaml b/components/pm-subscription-handler/dpo/blueprints/k8s-pmsh.yaml
new file mode 100755
index 00000000..13116c19
--- /dev/null
+++ b/components/pm-subscription-handler/dpo/blueprints/k8s-pmsh.yaml
@@ -0,0 +1,213 @@
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 2020 Nordix Foundation.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the 'License');
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an 'AS IS' BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+#
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+imports:
+ - 'http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'
+ - 'https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.2/k8splugin_types.yaml'
+ - 'https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/dmaap/dmaap.yaml'
+ - 'https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/pgaas/1.1.0/pgaas_types.yaml'
+ - 'https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/clamppolicyplugin/1.1.0/clamppolicyplugin_types.yaml'
+
+inputs:
+ tag_version:
+ type: string
+ description: Docker image to be used
+ default: 'nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pmsh:latest'
+ replicas:
+ type: integer
+ description: Number of instances
+ default: 1
+ policy_model_id:
+ type: 'string'
+ default: 'onap.policies.monitoring.dcae-pm-subscription-handler'
+ policy_id:
+ type: 'string'
+ default: 'onap.policies.monitoring.dcae-pm-subscription-handler'
+ operational_policy_name:
+ type: string
+ default: 'pmsh-operational-policy'
+ control_loop_name:
+ type: string
+ pm_publish_topic_name:
+ type: string
+ default: 'DCAE_CL_OUTPUT'
+ pm_subscribe_topic_name:
+ type: string
+ default: 'PMSH_CL_INPUT'
+ aai_subscribe_topic_name:
+ type: string
+ default: 'AAI_EVENT'
+ publisher_client_role:
+ type: string
+ description: Client role to request secure access to topic
+ default: 'org.onap.dcae.pmPublisher'
+ subscriber_client_role:
+ type: string
+ description: Client role to request secure access to topic
+ default: 'org.onap.dcae.pmSubscriber'
+ client_id:
+ type: string
+ description: Client id for given AAF client
+ default: 'dcae@dcae.onap.org'
+ client_password:
+ type: string
+ description: Password for AAF client provided as client_id
+ dcae_location:
+ type: string
+ description: DCAE location for the subscriber, used to set up routing
+ default: 'san-francisco'
+ pmsh_service_port:
+ type: string
+ description: PMSH host port
+ default: '8443'
+ dmaap_mr_service_protocol:
+ type: string
+ description: DMAAP Message Router protocol
+ default: 'https'
+ dmaap_mr_service_host:
+ type: string
+ description: DMAAP Message Router host address
+ default: 'message-router'
+ dmaap_mr_service_port:
+ type: string
+ description: DMAAP Message Router host port
+ default: '3905'
+ cpu_limit:
+ type: string
+ default: '1000m'
+ cpu_request:
+ type: string
+ default: '1000m'
+ memory_limit:
+ type: string
+ default: '1024Mi'
+ memory_request:
+ type: string
+ default: '1024Mi'
+ pgaas_cluster_name:
+ type: string
+ default: 'dcae-pg-primary.onap'
+node_templates:
+ pgaasvm:
+ type: dcae.nodes.pgaas.database
+ properties:
+ writerfqdn: { get_input: pgaas_cluster_name }
+ name: 'pmsh'
+ pm_publish_topic:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: pm_publish_topic_name }
+ pm_subscribe_topic:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: pm_subscribe_topic_name }
+ aai_subscribe_topic:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: aai_subscribe_topic_name }
+ pmsh:
+ type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ ports:
+ - '8443:0'
+ envs:
+ PMSH_PG_URL:
+ { get_attribute: [ pgaasvm, admin, host ] }
+ PMSH_PG_PASSWORD:
+ { get_attribute: [ pgaasvm, admin, password ] }
+ PMSH_PG_USERNAME:
+ { get_attribute: [ pgaasvm, admin, user ] }
+ PMSH_DB_NAME:
+ { get_attribute: [ pgaasvm, admin, database ] }
+
+ relationships:
+ - type: ccsdk.relationships.publish_events
+ target: pm_publish_topic
+ - type: ccsdk.relationships.subscribe_to_events
+ target: pm_subscribe_topic
+ - type: ccsdk.relationships.subscribe_to_events
+ target: aai_subscribe_topic
+ - type: cloudify.relationships.depends_on
+ target: pgaasvm
+ - type: cloudify.relationships.depends_on
+ target: pmsh-policy
+
+ properties:
+ service_component_type: 'dcae-pmsh'
+ service_component_name_override: 'dcae-pmsh'
+ application_config:
+ aaf_identity: { get_input: client_id }
+ aaf_password: { get_input: client_password }
+ operational_policy_name: { get_input: operational_policy_name }
+ control_loop_name: { get_input: control_loop_name }
+ cert_path: '/opt/app/pmsh/etc/certs/cert.pem'
+ key_path: '/opt/app/pmsh/etc/certs/key.pem'
+ ca_cert_path: '/opt/app/pmsh/etc/certs/cacert.pem'
+ streams_publishes:
+ policy_pm_publisher:
+ type: message_router
+ dmaap_info: <<pm_publish_topic>>
+ streams_subscribes:
+ policy_pm_subscriber:
+ type: message_router
+ dmaap_info: <<pm_subscribe_topic>>
+ aai_subscriber:
+ type: message_router
+ dmaap_info: <<aai_subscribe_topic>>
+ resource_config:
+ limits:
+ cpu: { get_input: cpu_limit }
+ memory: { get_input: memory_limit }
+ requests:
+ cpu: { get_input: cpu_request }
+ memory: { get_input: memory_request }
+ streams_publishes:
+ - name: pm_publish_topic
+ location: { get_input: dcae_location }
+ client_role: { get_input: publisher_client_role }
+ type: message-router
+ streams_subscribes:
+ - name: pm_subscribe_topic
+ location: { get_input: dcae_location }
+ client_role: { get_input: subscriber_client_role }
+ type: message-router
+ - name: aai_subscribe_topic
+ location: { get_input: dcae_location }
+ client_role: { get_input: subscriber_client_role }
+ type: message-router
+ image: { get_input: tag_version }
+ replicas: { get_input: replicas }
+ log_info:
+ log_directory: '/var/log/ONAP/dcaegen2/services/pmsh'
+ tls_info:
+ cert_directory: '/opt/app/pmsh/etc/certs'
+ use_tls: true
+ pmsh-policy:
+ type: clamp.nodes.policy
+ properties:
+ policy_model_id:
+ get_input: policy_model_id
+ policy_id:
+ get_input: policy_id \ No newline at end of file
diff --git a/components/pm-subscription-handler/dpo/data-formats/aai-event-format.json b/components/pm-subscription-handler/dpo/data-formats/aai-event-format.json
new file mode 100755
index 00000000..a33f3cc3
--- /dev/null
+++ b/components/pm-subscription-handler/dpo/data-formats/aai-event-format.json
@@ -0,0 +1,11 @@
+{
+ "self": {
+ "name": "AAI_EVENT_FORMAT",
+ "version": "1.0.0",
+ "description": "AAI EVENT output format"
+ },
+ "dataformatversion": "1.0.0",
+ "unstructured": {
+ "encoding": "UTF-8"
+ }
+} \ No newline at end of file
diff --git a/components/pm-subscription-handler/dpo/data-formats/pmsh-cl-input.json b/components/pm-subscription-handler/dpo/data-formats/pmsh-cl-input.json
new file mode 100755
index 00000000..9c1d252f
--- /dev/null
+++ b/components/pm-subscription-handler/dpo/data-formats/pmsh-cl-input.json
@@ -0,0 +1,11 @@
+{
+ "self": {
+ "name": "PMSH_CL_INPUT",
+ "version": "1.0.0",
+ "description": "Unstructured PMSH CL INPUT"
+ },
+ "dataformatversion": "1.0.0",
+ "unstructured": {
+ "encoding": "UTF-8"
+ }
+} \ No newline at end of file
diff --git a/components/pm-subscription-handler/dpo/data-formats/pmsh-cl-output.json b/components/pm-subscription-handler/dpo/data-formats/pmsh-cl-output.json
new file mode 100755
index 00000000..503d6ca8
--- /dev/null
+++ b/components/pm-subscription-handler/dpo/data-formats/pmsh-cl-output.json
@@ -0,0 +1,199 @@
+{
+ "self": {
+ "name": "DCAE_CL_OUTPUT",
+ "version": "1.0.0",
+ "description": "The output format of PM Subscription CL event to Policy"
+ },
+ "dataformatversion": "1.0.0",
+ "jsonSchema": {
+ "name": "PM Subscription CL event",
+ "version": "1.0.0",
+ "properties": {
+ "version": {
+ "type": "string",
+ "enum": [
+ "1.0.2"
+ ]
+ },
+ "closedLoopControlName": {
+ "type": "string",
+ "description" : "This is the unique ID for the Control Loop. It is created by the CLAMP platform during Control Loop design"
+ },
+ "requestID": {
+ "type": "string",
+ "description" : "For the control loop, when an instance of the Control Loop occurs, this unique ID must be created. The same ID must be forwarded for both the ONSET and the ABATED control loop messages"
+ },
+ "closedLoopEventStatus": {
+ "type": "string",
+ "description" : "This is the status of the closedLoopControlName/requestID pair",
+ "enum": [
+ "ONSET",
+ "ABATED"
+ ]
+ },
+ "closedLoopAlarmStart": {
+ "type": "string",
+ "description" : "When the alarm was first detected"
+ },
+ "closedLoopAlarmEnd" : {
+ "type" : "string",
+ "description" : "When the alarm was cleared. This field need only be present in the ABATED message"
+ },
+ "policyVersion": {
+ "type": "string",
+ "description" : "The version of the Policy driving the DCAE Micro service. Should be a part of the configuration policy setup by CLAMP and passed by DCAE controller"
+ },
+ "policyName": {
+ "type": "string",
+ "description" : "The name of the Operational Policy driving the DCAE micro service."
+ },
+ "policyScope": {
+ "type": "string",
+ "description" : "The scope of the Policy driving the DCAE micro service. Should be a part of the configuration policy setup by CLAMP and passed by DCAE controller"
+ },
+ "from": {
+ "type": "string",
+ "description" : "The ONAP platform component publishing this message",
+ "enum": [
+ "DCAE"
+ ]
+ },
+ "target_type": {
+ "type": "string",
+ "description" : "The type of the target: PNF or VNF",
+ "enum": [
+ "VNF",
+ "PNF"
+ ]
+ },
+ "target": {
+ "type": "string",
+ "description" : "This is the name of the field within the A&AI sub-tag that indicates the actual entity Node details. There should be a matching node field within the A&AI subtag holding this value",
+ "enum": [
+ "generic-vnf.vnf-name",
+ "pnf.pnf-name"
+ ]
+ },
+ "AAI": {
+ "description" : "Contains the A&AI Node-Attribute list",
+ "anyOf": [
+ {
+ "generic-vnf.vnf-name": {
+ "type": "string"
+ }
+ },
+ {
+ "pnf.pnf-name": {
+ "type": "string"
+ }
+ }
+ ]
+ },
+ "changeType": {
+ "type": "string",
+ "description": "This is the change indicator that determines whether to apply/remove a PM subscription",
+ "enum": [
+ "CREATE",
+ "DELETE"
+ ]
+ },
+ "subscription": {
+ "type": "object",
+ "description": "This is the PM subscription to be applied/removed to/from an xNF",
+ "properties": {
+ "subscriptionName": {
+ "type": "string"
+ },
+ "administrativeState": {
+ "type": "string",
+ "enum": [
+ "UNLOCKED",
+ "LOCKED"
+ ]
+ },
+ "fileBasedGP": {
+ "type": "integer"
+ },
+ "fileLocation": {
+ "type": "string"
+ },
+ "measurementGroups": {
+ "type": "array",
+ "items": [
+ {
+ "type": "object",
+ "properties": {
+ "measurementGroup": {
+ "type": "object",
+ "properties": {
+ "measurementTypes": {
+ "type": "array",
+ "items": [
+ {
+ "type": "object",
+ "properties": {
+ "measurementType": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "measurementType"
+ ]
+ }
+ ]
+ },
+ "managedObjectDNsBasic": {
+ "type": "array",
+ "items": [
+ {
+ "type": "object",
+ "properties": {
+ "DN": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "DN"
+ ]
+ }
+ ]
+ }
+ },
+ "required": [
+ "measurementTypes",
+ "managedObjectDNsBasic"
+ ]
+ }
+ },
+ "required": [
+ "measurementGroup"
+ ]
+ }
+ ]
+ }
+ },
+ "required": [
+ "subscriptionName",
+ "administrativeState",
+ "fileBasedGP",
+ "fileLocation",
+ "measurementGroups"
+ ]
+ }
+ },
+ "required": [
+ "version",
+ "closedLoopControlName",
+ "requestID",
+ "closedLoopEventStatus",
+ "closedLoopAlarmStart",
+ "policyName",
+ "from",
+ "target_type",
+ "target",
+ "AAI",
+ "changeType",
+ "subscription"
+ ]
+ }
+} \ No newline at end of file
diff --git a/components/pm-subscription-handler/dpo/spec/pmsh-component-spec.json b/components/pm-subscription-handler/dpo/spec/pmsh-component-spec.json
new file mode 100755
index 00000000..64eae4ff
--- /dev/null
+++ b/components/pm-subscription-handler/dpo/spec/pmsh-component-spec.json
@@ -0,0 +1,143 @@
+{
+ "self": {
+ "name": "dcae-pmsh",
+ "version": "1.0.0",
+ "description": "Docker application that handles XNF's PM Subscriptions",
+ "component_type": "docker"
+ },
+ "streams": {
+ "subscribes": [
+ {
+ "type": "message_router",
+ "config_key": "pm_subscribe_topic",
+ "format": "PMSH_CL_INPUT",
+ "version": "1.0.0"
+ },
+ {
+ "type": "message_router",
+ "config_key": "aai_subscribe_topic",
+ "format": "AAI_EVENT_FORMAT",
+ "version": "1.0.0"
+ }
+ ],
+ "publishes": [
+ {
+ "type": "message_router",
+ "config_key": "pm_publish_topic",
+ "format": "DCAE_CL_OUTPUT",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ "services": {
+ "calls": [],
+ "provides": []
+ },
+ "auxilary": {
+ "ports": [
+ "8443:0"
+ ]
+ },
+ "artifacts": [
+ {
+ "uri": "nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pmsh:latest",
+ "type": "docker image"
+ }
+ ],
+ "parameters": [
+ {
+ "name": "pm_publish_topic_name",
+ "value": "DCAE_CL_OUTPUT",
+ "description": "Name of the topic PMSH publishes to for policy consumption",
+ "designer_editable": true,
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "pm_subscribe_topic_name",
+ "value": "PMSH_CL_INPUT",
+ "description": "Name of the topic PMSH subscribes to for policy outputs",
+ "designer_editable": true,
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "aai_subscribe_topic_name",
+ "value": "AAI_EVENT",
+ "description": "Name of the topic PMSH subscribes to for AAI Events",
+ "designer_editable": true,
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "cert_path",
+ "value": "/opt/app/pmsh/etc/certs/cert.pem",
+ "description": "Path to certificate file",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": false
+ },
+ {
+ "name": "key_path",
+ "value": "/opt/app/pmsh/etc/certs/key.pem",
+ "description": "Path to the key for the certificate",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": false
+ },
+ {
+ "name": "ca_cert_path",
+ "value": "/opt/app/pmsh/etc/certs/cacert.pem",
+ "description": "Path to the ca certificate file",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": false
+ },
+ {
+ "name": "policy_model_id",
+ "value": "onap.policies.monitoring.dcae-pm-initiation-handler",
+ "description": "PMSH monitoring policy model id",
+ "designer_editable": true,
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "policy_id",
+ "value": "onap.policies.monitoring.dcae-pm-initiation-handler",
+ "description": "PMSH monitoring policy id",
+ "designer_editable": true,
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "operational_policy_name",
+ "value": "pmsh-operational-policy",
+ "description": "PMSH operational policy name",
+ "designer_editable": true,
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "control_loop_name",
+ "value": "",
+ "description": "PMSH control loop name",
+ "designer_editable": true,
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "type": "string",
+ "required": true
+ }
+ ]
+} \ No newline at end of file