diff options
author | 2019-02-21 18:38:35 +0530 | |
---|---|---|
committer | 2019-02-25 10:47:04 +0000 | |
commit | 6489bbca90237d869669dbf2e2e677f2e360b72b (patch) | |
tree | 62fc24012422d867b0eb596a4de2239df63ce31e /UniversalVesAdapter/src/main/resources/kv.json | |
parent | dbee500d4d3f8e54d9aff5367356ba688e1358d2 (diff) |
starts threads each for every supported collector
Make code changes so that mapper starts one thread each for every supported collector as per configuration
Change-Id: I90d3b9d27d0d64107b1b33c6752dc2f0c49344de
Issue-ID: DCAEGEN2-1174
Signed-off-by: amshegokar <AS00500801@techmahindra.com>
Diffstat (limited to 'UniversalVesAdapter/src/main/resources/kv.json')
-rw-r--r-- | UniversalVesAdapter/src/main/resources/kv.json | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/UniversalVesAdapter/src/main/resources/kv.json b/UniversalVesAdapter/src/main/resources/kv.json new file mode 100644 index 0000000..065ac64 --- /dev/null +++ b/UniversalVesAdapter/src/main/resources/kv.json @@ -0,0 +1,21 @@ +{"collectors": [ + { + "identifier": "notify OID", + "subscriberTopic": "ONAP-COLLECTOR-SNMPTRAP", + "mapping-files": [{ + "1.3.6.1.6.3.1.1.5.3": "<?xml version='1.0'?> <smooks-resource-list xmlns='http://www.milyn.org/xsd/smooks-1.1.xsd' xmlns:json='http://www.milyn.org/xsd/smooks/json-1.1.xsd' xmlns:jb='http://www.milyn.org/xsd/smooks/javabean-1.4.xsd'> <json:reader rootName='vesevent' keyWhitspaceReplacement='-'> <json:keyMap> <json:key from='date&time' to='date-and-time' /> <\/json:keyMap> <\/json:reader> <jb:bean class='org.onap.dcaegen2.ves.domain.VesEvent' beanId='vesEvent' createOnElement='vesevent'> <jb:wiring property='event' beanIdRef='event'/> <\/jb:bean> <jb:bean class='org.onap.dcaegen2.ves.domain.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.CommonEventHeader' beanId='commonEventHeader' createOnElement='vesevent'> <jb:expression property='version'>'3.0'<\/jb:expression> <jb:expression property='eventId'>'XXXX'<\/jb:expression> <jb:expression property='reportingEntityName'>'VesAdapter'<\/jb:expression> <jb:expression property='domain'>'fault'<\/jb:expression> <jb:expression property='eventName' execOnElement='vesevent' >commonEventHeader.domain+'_'+'_'+ faultFields.alarmCondition;<\/jb:expression> <jb:value property='sequence' data='0' default='0' decoder='Long'/> <jb:value property='lastEpochMicrosec' data='#/time-received' decoder='Double' /> <jb:value property='startEpochMicrosec' data='#/time-received' decoder='Double'/> <jb:expression property='priority'>'Medium'<\/jb:expression> <jb:value property='sourceName' data='#/agent-address'/> <\/jb:bean> <jb:bean class='org.onap.dcaegen2.ves.domain.FaultFields' beanId='faultFields' createOnElement='vesevent'> <jb:value property='alarmCondition' data='#/trap-category' /> <jb:expression property='eventSeverity'>'MINOR'<\/jb:expression> <jb:expression property='eventSourceType'>'SNMP Agent'<\/jb:expression> <jb:expression property='specificProblem'>'SNMP Fault'<\/jb:expression> <jb:value property='faultFieldsVersion' data='2.0' default='2.0' decoder='Double' /> <jb:wiring property='alarmAdditionalInformation' beanIdRef='alarmAdditionalInformationroot'/> <jb:expression property='vfStatus'>'Active'<\/jb:expression> <\/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.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>", + ".1.3.6.1.4.1.74.2.46.12.1.1": "<?xml version='19.0'?> <smooks-resource-list xmlns='http://www.milyn.org/xsd/smooks-1.1.xsd' xmlns:json='http://www.milyn.org/xsd/smooks/json-1.1.xsd' xmlns:jb='http://www.milyn.org/xsd/smooks/javabean-1.4.xsd'> <json:reader rootName='vesevent' keyWhitspaceReplacement='-'> <json:keyMap> <json:key from='date&time' to='date-and-time' /> <\/json:keyMap> <\/json:reader> <jb:bean class='org.onap.dcaegen2.ves.domain.VesEvent' beanId='vesEvent' createOnElement='vesevent'> <jb:wiring property='event' beanIdRef='event'/> <\/jb:bean> <jb:bean class='org.onap.dcaegen2.ves.domain.Event' beanId='event' createOnElement='vesevent'> <jb:wiring property='commonEventHeader' beanIdRef='commonEventHeader'/> <jb:wiring property='faultFields' beanIdRef='faultFields'/> <!--<jb:wiring property='measurementsForVfScalingFields' beanIdRef='measurementsForVfScalingFields'/> --> <\/jb:bean> <!--<jb:bean class='org.onap.dcaegen2.ves.domain.MeasurementsForVfScalingFields' beanId='measurementsForVfScalingFields' createOnElement='simple'> <jb:wiring property='additionalMeasurements' beanIdRef='additionalMeasurements'/> <\/jb:bean>--> <jb:bean class='org.onap.dcaegen2.ves.domain.CommonEventHeader' beanId='commonEventHeader' createOnElement='vesevent'> <jb:expression property='version'>'3.0'<\/jb:expression> <jb:expression property='eventId'>'XXXX'<\/jb:expression><!-- --> <jb:expression property='reportingEntityName'>'VesAdapter'<\/jb:expression> <jb:expression property='domain'>'fault'<\/jb:expression> <jb:expression property='eventName' execOnElement='vesevent' >commonEventHeader.domain+'_'+'_'+ faultFields.alarmCondition;<\/jb:expression> <jb:value property='sequence' data='0' default='0' decoder='Long'/> <jb:value property='lastEpochMicrosec' data='#/time-received' decoder='Double' /> <jb:value property='startEpochMicrosec' data='#/time-received' decoder='Double'/> <jb:expression property='priority'>'Medium'<\/jb:expression> <jb:expression property='sourceName'>'VesAdapter'<\/jb:expression> <\/jb:bean> <jb:bean class='org.onap.dcaegen2.ves.domain.FaultFields' beanId='faultFields' createOnElement='vesevent'> <jb:value property='alarmCondition' data='#/trap-category' /> <jb:expression property='eventSeverity'>'MINOR'<\/jb:expression> <jb:expression property='eventSourceType'>'SNMP Agent'<\/jb:expression> <jb:expression property='specificProblem'>'SNMP Fault'<\/jb:expression> <jb:value property='faultFieldsVersion' data='2.0' default='2.0' decoder='Double' /> <jb:wiring property='alarmAdditionalInformation' beanIdRef='alarmAdditionalInformationroot'/> <jb:expression property='vfStatus'>'Active'<\/jb:expression> <\/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.AlarmAdditionalInformation' beanId='alarmAdditionalInformation' createOnElement='varbinds/element'> <jb:value property='name' data='#/varbind_oid'/> <jb:value property='value' data='#/varbind_value' /> <\/jb:bean> <!--<jb:bean class='java.util.ArrayList' beanId='additionalMeasurements' createOnElement='simple'> <jb:wiring beanIdRef='additionalMeasurement'/> <\/jb:bean> <jb:bean class='org.onap.dcaegen2.ves.domain.AdditionalMeasurement' beanId='additionalMeasurement' createOnElement='varbinds/element'> <jb:value property='name' data='#/varbind_value' /> <\/jb:bean> --> <\/smooks-resource-list>", + "eventname1": "SNMP xml mapping string", + "defaultMappingFile-ONAP-COLLECTOR-SNMPTRAP": "<?xml version='1.0'?> <smooks-resource-list xmlns='http://www.milyn.org/xsd/smooks-1.1.xsd' xmlns:json='http://www.milyn.org/xsd/smooks/json-1.1.xsd' xmlns:jb='http://www.milyn.org/xsd/smooks/javabean-1.4.xsd'> <json:reader rootName='vesevent' keyWhitspaceReplacement='-'> <json:keyMap> <json:key from='date&time' to='date-and-time' /> <\/json:keyMap> <\/json:reader> <jb:bean class='org.onap.dcaegen2.ves.domain.VesEvent' beanId='vesEvent' createOnElement='vesevent'> <jb:wiring property='event' beanIdRef='event'/> <\/jb:bean> <jb:bean class='org.onap.dcaegen2.ves.domain.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.CommonEventHeader' beanId='commonEventHeader' createOnElement='vesevent'> <jb:expression property='version'>'3.0'<\/jb:expression> <jb:expression property='eventId'>'XXXsnmp'<\/jb:expression> <jb:expression property='reportingEntityName'>'VesAdapter'<\/jb:expression> <jb:expression property='domain'>'fault'<\/jb:expression> <jb:expression property='eventName' execOnElement='vesevent' >commonEventHeader.domain+'_'+'_'+ faultFields.alarmCondition;<\/jb:expression> <jb:value property='sequence' data='0' default='0' decoder='Long'/> <jb:value property='lastEpochMicrosec' data='#/time-received' decoder='Double' /> <jb:value property='startEpochMicrosec' data='#/time-received' decoder='Double'/> <jb:expression property='priority'>'Medium'<\/jb:expression> <jb:value property='sourceName' data='#/agent-address'/> <\/jb:bean> <jb:bean class='org.onap.dcaegen2.ves.domain.FaultFields' beanId='faultFields' createOnElement='vesevent'> <jb:value property='alarmCondition' data='#/trap-category' /> <jb:expression property='eventSeverity'>'MINOR'<\/jb:expression> <jb:expression property='eventSourceType'>'SNMP Agent'<\/jb:expression> <jb:expression property='specificProblem'>'SNMP Fault'<\/jb:expression> <jb:value property='faultFieldsVersion' data='2.0' default='2.0' decoder='Double' /> <jb:wiring property='alarmAdditionalInformation' beanIdRef='alarmAdditionalInformationroot'/> <jb:expression property='vfStatus'>'Active'<\/jb:expression> <\/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.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>" + }] + }, + { + "identifier": "notification1-id", + "subscriberTopic": "ONAP-COLLECTOR-RESTCONFTRAP", + "mapping-files": [{ + "defaultMappingFile-ONAP-COLLECTOR-RESTCONFTRAP": "<?xml version='1.0'?> <smooks-resource-list xmlns='http://www.milyn.org/xsd/smooks-1.1.xsd' xmlns:json='http://www.milyn.org/xsd/smooks/json-1.1.xsd' xmlns:jb='http://www.milyn.org/xsd/smooks/javabean-1.4.xsd'> <json:reader rootName='vesevent' keyWhitspaceReplacement='-'> <json:keyMap> <json:key from='date&time' to='date-and-time' /> <\/json:keyMap> <\/json:reader> <jb:bean class='org.onap.dcaegen2.ves.domain.VesEvent' beanId='vesEvent' createOnElement='vesevent'> <jb:wiring property='event' beanIdRef='event'/> <\/jb:bean> <jb:bean class='org.onap.dcaegen2.ves.domain.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.CommonEventHeader' beanId='commonEventHeader' createOnElement='vesevent'> <jb:expression property='version'>'3.0'<\/jb:expression> <jb:expression property='eventId'>'XXXRestConf'<\/jb:expression> <jb:expression property='reportingEntityName'>'VesAdapter'<\/jb:expression> <jb:expression property='domain'>'fault'<\/jb:expression> <jb:expression property='eventName' execOnElement='vesevent' >commonEventHeader.domain+'_'+'_'+ faultFields.alarmCondition;<\/jb:expression> <jb:value property='sequence' data='0' default='0' decoder='Long'/> <jb:value property='lastEpochMicrosec' data='#/time-received' decoder='Double' /> <jb:value property='startEpochMicrosec' data='#/time-received' decoder='Double'/> <jb:expression property='priority'>'Medium'<\/jb:expression> <jb:value property='sourceName' data='#/agent-address'/> <\/jb:bean> <jb:bean class='org.onap.dcaegen2.ves.domain.FaultFields' beanId='faultFields' createOnElement='vesevent'> <jb:value property='alarmCondition' data='#/trap-category' /> <jb:expression property='eventSeverity'>'MINOR'<\/jb:expression> <jb:expression property='eventSourceType'>'SNMP Agent'<\/jb:expression> <jb:expression property='specificProblem'>'SNMP Fault'<\/jb:expression> <jb:value property='faultFieldsVersion' data='2.0' default='2.0' decoder='Double' /> <jb:wiring property='alarmAdditionalInformation' beanIdRef='alarmAdditionalInformationroot'/> <jb:expression property='vfStatus'>'Active'<\/jb:expression> <\/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.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>", + "eventname2": "rest conf xml mapping string", + "2541256": "<?xml version2='1.0'?> <smooks-resource-list xmlns='http://www.milyn.org/xsd/smooks-1.1.xsd' xmlns:json='http://www.milyn.org/xsd/smooks/json-1.1.xsd' xmlns:jb='http://www.milyn.org/xsd/smooks/javabean-1.4.xsd' xmlns:core='http://www.milyn.org/xsd/smooks/smooks-core-1.4.xsd'> <core:namespaces> <core:namespace prefix='ietf-restconf' uri='http://urn:ietf:params:xml:ns:yang:ietf-restconf '/> <core:namespace prefix='ietf-yang-patch' uri='http://urn:ietf:params:xml:ns:yang:ietf-yang-patch'/> <core:namespace prefix='ietf-yang-push' uri='http://urn:ietf:params:xml:ns:yang:ietf-yang-push'/> <core:namespace prefix='ietf-network-topology' uri='http://urn:ietf:params:xml:ns:yang:ietf-network-topology'/> <\/core:namespaces> <json:reader rootName='vesevent' keyWhitspaceReplacement='-'> <json:keyMap> <json:key from='date&time' to='date-and-time'/> <json:key from='ietf-restconf:notification'>notification<\/json:key> <json:key from='ietf-yang-push:push-change-update'>push-change-update<\/json:key> <json:key from='ietf-yang-patch:yang-patch'>yang-patch<\/json:key> <json:key from='ietf-network-topology:termination-point'>termination-point<\/json:key> <\/json:keyMap> <\/json:reader> <jb:bean class='org.onap.dcaegen2.ves.domain.VesEvent' beanId='vesEvent' createOnElement='vesevent'> <jb:wiring property='event' beanIdRef='event'/> <\/jb:bean> <jb:bean class='org.onap.dcaegen2.ves.domain.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.CommonEventHeader' beanId='commonEventHeader' createOnElement='vesevent'> <jb:value property='sourceId' data='#/notification/push-change-update/datastore-changes/yang-patch/edit/element/target'/> <jb:value property='startEpochMicrosec' data='0' default='1413378172000000' decoder='Double'/> <!-- <jb:expression property='eventId'>'ab305d54-85b4-a31b-7db2-fb6b977766'<\/jb:expression> --> <jb:value property='eventId' data='#/notification/push-change-update/datastore-changes/yang-patch/edit/element/value/termination-point/element/supporting-termination-point/element/network-ref'/> <!-- /termination-point/element/supporting-termination-point/element/network-ref--> <jb:value property='sequence' data='0' default='0' decoder='Long'/> <jb:expression property='domain'>'fault'<\/jb:expression> <jb:value property='lastEpochMicrosec' data='0' default='1413378172000033' decoder='Double'/> <jb:expression property='eventName'>'fault_Status_Change'<\/jb:expression> <jb:value property='sourceName' data='#/notification/push-change-update/datastore-changes/yang-patch/edit/element/target'/> <jb:expression property='priority'>'High'<\/jb:expression> <jb:expression property='version'>'3.0'<\/jb:expression> <jb:expression property='reportingEntityName'>'Domain_Contorller'<\/jb:expression> <\/jb:bean> <jb:bean class='org.onap.dcaegen2.ves.domain.FaultFields' beanId='faultFields' createOnElement='vesevent'> <jb:expression property='eventSeverity'>'CRITICAL'<\/jb:expression> <jb:expression property='alarmCondition'>'Route_Status'<\/jb:expression> <jb:value property='faultFieldsVersion' data='2.0' default='2.0' decoder='Double' /> <jb:expression property='specificProblem'>'Fault_SOTN_Service_Status'<\/jb:expression> <jb:wiring property='alarmAdditionalInformation' beanIdRef='alarmAdditionalInformationroot'/> <jb:expression property='eventSourceType'>'other'<\/jb:expression> <jb:expression property='vfStatus'>'Active'<\/jb:expression> <\/jb:bean> <jb:bean class='java.util.ArrayList' beanId='alarmAdditionalInformationroot' createOnElement='vesevent'> <jb:wiring beanIdRef='alarmAdditionalInformation'/> <\/jb:bean> <!-- createOnElement='/notification/push-change-update/datastore-changes/yang-patch/varbinds/element' #/notification/push-change-update/datastore-changes/yang-patch/varbinds/element/varbind_value' and createOnElement='vesevent' in this case last element from array will be fetach varbinds/element --> <!-- <jb:bean class='org.onap.dcaegen2.ves.domain.AlarmAdditionalInformation' beanId='alarmAdditionalInformation' createOnElement='/notification/push-change-update/datastore-changes/yang-patch/varbinds/element'> <jb:value property='name' data='#/varbind_oid'/> <jb:value property='value' data='#/varbind_value' /> <\/jb:bean> --> <jb:bean class='org.onap.dcaegen2.ves.domain.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>" + }] + } +]}
\ No newline at end of file |