b7c277a1228559f1c71fc2873c788fb2fa7ed5d7
[dcaegen2/platform/blueprints.git] / blueprints / k8s-ves-mapper.yaml
1 #
2 # ============LICENSE_START====================================================
3 # =============================================================================
4 # Copyright (c) 2019 TechMahindra. All rights reserved.
5 # Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
6 # =============================================================================
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 #      http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 # ============LICENSE_END======================================================
19
20 description: "This blueprint deploys the UniversalVESAdapter"
21 imports:
22   - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml
23   - plugin:k8splugin?version=3.4.2
24
25 inputs:
26   rcc_notification_url:
27     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_RCC_OUTPUT"
28     type: string
29   snmp_notification_url:
30     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.ONAP-COLLECTOR-SNMPTRAP"
31     type: string
32   tag_version:
33     default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.mapper.vesadapter.universalvesadaptor:1.1.0"
34     type: string
35   universal_mapper_name:
36     default: "dcaegen2-svc-mapper"
37     type: string
38   ves_fault_publish_url:
39     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_FAULT_OUTPUT"
40     type: string
41   ves_measurement_publish_url:
42     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT"
43     type: string
44   ves_notification_publish_url:
45     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
46     type: string
47   ves_pnfRegistration_publish_url:
48     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_PNFREG_OUTPUT"
49     type: string
50 node_templates:
51   universalvesadapter:
52     interfaces:
53       cloudify.interfaces.lifecycle:
54         start:
55           inputs:
56             envs:
57               CONFIG_BINDING_SERVICE: config_binding_service
58             max_wait: 3600
59             ports:
60               - "80:0"
61     properties:
62       application_config:
63         app_preferences:
64           collectors:
65             -
66               identifier: notification-id
67               mapping-files:
68                 -
69                   defaultMappingFile-rcc-notification: "<?xml version='1.0' encoding='UTF-8'?><smooks-resource-list xmlns='http://www.milyn.org/xsd/smooks-1.1.xsd' xmlns:jb='http://www.milyn.org/xsd/smooks/javabean-1.4.xsd' xmlns:json='http://www.milyn.org/xsd/smooks/json-1.1.xsd'><json:reader rootName='vesevent' keyWhitspaceReplacement='-'><json:keyMap><json:key from='date&amp;time' to='date-and-time' /></json:keyMap></json:reader><jb:bean class='org.onap.dcaegen2.ves.domain.ves70.VesEvent' beanId='vesEvent' createOnElement='vesevent'><jb:wiring property='event' beanIdRef='event' /></jb:bean><jb:bean class='org.onap.dcaegen2.ves.domain.ves70.Event' beanId='event' createOnElement='vesevent'><jb:wiring property='commonEventHeader' beanIdRef='commonEventHeader' /><jb:wiring property='pnfRegistrationFields' beanIdRef='pnfRegistrationFields' /></jb:bean><jb:bean class='org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader' beanId='commonEventHeader' createOnElement='vesevent'><jb:expression property='version'>org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.Version._4_0_1</jb:expression><jb:expression property='eventType'>'pnfRegistration'</jb:expression><jb:expression property='vesEventListenerVersion'>org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.VesEventListenerVersion._7_0_1</jb:expression><jb:expression property='eventId' execOnElement='vesevent'>'registration_'+commonEventHeader.ts1</jb:expression><jb:expression property='reportingEntityName'>'VESMapper'</jb:expression><jb:expression property='domain'>org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.Domain.PNF_REGISTRATION</jb:expression><jb:expression property='eventName' execOnElement='vesevent'>commonEventHeader.domain</jb:expression><jb:value property='sequence' data='0' default='0' decoder='Long' /><jb:expression property='lastEpochMicrosec' execOnElement='vesevent'>commonEventHeader.ts1</jb:expression><jb:expression property='startEpochMicrosec' execOnElement='vesevent'>commonEventHeader.ts1</jb:expression><jb:expression property='priority'>org.onap.dcaegen2.ves.domain.ves70.CommonEventHeader.Priority.NORMAL</jb:expression><jb:expression property='sourceName' execOnElement='vesevent'>pnfRegistrationFields.vendorName+'-'+pnfRegistrationFields.serialNumber</jb:expression></jb:bean><jb:bean class='org.onap.dcaegen2.ves.domain.ves70.PnfRegistrationFields' beanId='pnfRegistrationFields' createOnElement='vesevent'><jb:expression property='pnfRegistrationFieldsVersion'>org.onap.dcaegen2.ves.domain.ves70.PnfRegistrationFields.PnfRegistrationFieldsVersion._2_0</jb:expression><jb:value property='serialNumber' data='pnfRegistration/serialNumber' /><jb:value property='lastServiceDate' data='pnfRegistration/lastServiceDate' /><jb:value property='manufactureDate' data='pnfRegistration/manufactureDate' /><jb:value property='modelNumber' data='pnfRegistration/modelNumber' /><jb:value property='oamV4IpAddress' data='pnfRegistration/oamV4IpAddress' /><jb:value property='oamV6IpAddress' data='pnfRegistration/oamV6IpAddress' /><jb:value property='softwareVersion' data='pnfRegistration/softwareVersion' /><jb:value property='unitFamily' data='pnfRegistration/unitFamily' /><jb:value property='unitType' data='pnfRegistration/unitType' /><jb:value property='vendorName' data='pnfRegistration/vendorName' /><jb:wiring property='additionalFields' beanIdRef='alarmAdditionalInformation' /></jb:bean><jb:bean class='org.onap.dcaegen2.ves.domain.ves70.AlarmAdditionalInformation' beanId='alarmAdditionalInformation' createOnElement='vesevent'><jb:wiring property='additionalProperties' beanIdRef='additionalFields2' /></jb:bean><jb:bean beanId='additionalFields2' class='java.util.HashMap' createOnElement='vesevent/pnfRegistration/additionalFields'><jb:value data='pnfRegistration/additionalFields/*'/></jb:bean></smooks-resource-list>"
70               stream_publisher: ves-pnfRegistration
71               stream_subscriber: rcc-notification
72             -
73               identifier: notify OID
74               mapping-files:
75                 -
76                   defaultMappingFile-snmp-notification: "<?xml version='1.0' encoding='UTF-8'?><smooks-resource-list xmlns='http://www.milyn.org/xsd/smooks-1.1.xsd' xmlns:jb='http://www.milyn.org/xsd/smooks/javabean-1.4.xsd' xmlns:json='http://www.milyn.org/xsd/smooks/json-1.1.xsd'><json:reader rootName='vesevent' keyWhitspaceReplacement='-'><json:keyMap><json:key from='date&amp;time' to='date-and-time' /></json:keyMap></json:reader><jb:bean class='org.onap.dcaegen2.ves.domain.ves54.VesEvent' beanId='vesEvent' createOnElement='vesevent'><jb:wiring property='event' beanIdRef='event' /></jb:bean><jb:bean class='org.onap.dcaegen2.ves.domain.ves54.Event' beanId='event' createOnElement='vesevent'><jb:wiring property='commonEventHeader' beanIdRef='commonEventHeader' /><jb:wiring property='faultFields' beanIdRef='faultFields' /></jb:bean><jb:bean class='org.onap.dcaegen2.ves.domain.ves54.CommonEventHeader' beanId='commonEventHeader' createOnElement='vesevent'><jb:expression property='version'>'3.0'</jb:expression><jb:expression property='eventType'>'FaultField'</jb:expression><jb:expression property='eventId' execOnElement='vesevent'>'XXXX'</jb:expression><jb:expression property='reportingEntityName'>'VESMapper'</jb:expression><jb:expression property='domain'>org.onap.dcaegen2.ves.domain.ves54.CommonEventHeader.Domain.FAULT</jb:expression><jb:expression property='eventName' execOnElement='vesevent'>commonEventHeader.domain</jb:expression><jb:value property='sequence' data='0' default='0' decoder='Long' /><jb:value property='lastEpochMicrosec' data='#/time-received' /><jb:value property='startEpochMicrosec' data='#/time-received' /><jb:expression property='priority'>org.onap.dcaegen2.ves.domain.ves54.CommonEventHeader.Priority.NORMAL</jb:expression><jb:expression property='sourceName'>'VesAdapter'</jb:expression></jb:bean><jb:bean class='org.onap.dcaegen2.ves.domain.ves54.FaultFields' beanId='faultFields' createOnElement='vesevent'><jb:value property='faultFieldsVersion' data='2.0' default='2.0' decoder='Double' /><jb:value property='alarmCondition' data='#/trap-category' /><jb:expression property='specificProblem'>'SNMP Fault'</jb:expression><jb:expression property='vfStatus'>org.onap.dcaegen2.ves.domain.ves54.FaultFields.VfStatus.ACTIVE</jb:expression><jb:expression property='eventSeverity'>org.onap.dcaegen2.ves.domain.ves54.FaultFields.EventSeverity.MINOR</jb:expression><jb:wiring property='alarmAdditionalInformation' beanIdRef='alarmAdditionalInformationroot' /></jb:bean><jb:bean class='java.util.ArrayList' beanId='alarmAdditionalInformationroot' createOnElement='vesevent'><jb:wiring beanIdRef='alarmAdditionalInformation' /></jb:bean><jb:bean class='org.onap.dcaegen2.ves.domain.ves54.AlarmAdditionalInformation' beanId='alarmAdditionalInformation' createOnElement='varbinds/element'><jb:value property='name' data='#/varbind_oid' /><jb:value property='value' data='#/varbind_value' /></jb:bean></smooks-resource-list>"
77               stream_publisher: ves-fault
78               stream_subscriber: snmp-notification
79         streams_publishes:
80           ves-fault:
81             dmaap_info:
82               topic_url:
83                 get_input: ves_fault_publish_url
84             type: message_router
85           ves-pnfRegistration:
86             dmaap_info:
87               topic_url:
88                 get_input: ves_pnfRegistration_publish_url
89             type: message_router
90         streams_subscribes:
91           rcc-notification:
92             dmaap_info:
93               topic_url:
94                 get_input: rcc_notification_url
95             type: message_router
96           snmp-notification:
97             dmaap_info:
98               topic_url:
99                 get_input: snmp_notification_url
100             type: message_router
101       docker_config: {}
102       image:
103         get_input: tag_version
104       service_component_type:
105         get_input: universal_mapper_name
106     type: dcae.nodes.ContainerizedServiceComponent
107 tosca_definitions_version: cloudify_dsl_1_3
108