From 1a2435d72a46d8daec2a0259275fee4842da5a9a Mon Sep 17 00:00:00 2001 From: Pawel Date: Fri, 18 Jun 2021 15:26:31 +0200 Subject: CSIT tests update for Synchronous VES collector -When evens belonging to different domains are reported in eventBatch -When different stndDefinedNamespace is used if domain==stndDefined -Error codes resulting from DMaaP-MR errors, mapped to HTTP/503 Issue-ID: DCAEGEN2-1483 Signed-off-by: Pawel Change-Id: I4c993e4c7bfd22981030c69e126e90bbf7e48d4a --- .../dcaegen2/testcases/03__stndDefined_tests.robot | 10 ++ .../04__backwards_compatibility_tests.robot | 60 ++++++++++++ .../json_events/ves7_batch_stdnDefined_valid.json | 108 +++++++++++++++++++++ ...nDefined_withDifferentStndDefinedNamespace.json | 108 +++++++++++++++++++++ .../ves7_batch_with_different_domain.json | 67 +++++++++++++ .../collector_backwards_compatibility.properties | 83 ++++++++++++++++ .../resources/collector_basic_auth.properties | 7 +- .../resources/collector_stnd_defined.properties | 7 +- ...ollector_stnd_defined_new_schema_map.properties | 7 +- .../testcases/resources/dcae_properties.robot | 5 + .../resources/robot_library/DmaapLibrary.py | 5 + .../robot_library/dmaap_simulator/DMaaPHandler.py | 6 +- .../robot_library/dmaap_simulator/DMaaPServer.py | 6 ++ 13 files changed, 474 insertions(+), 5 deletions(-) create mode 100644 tests/dcaegen2/testcases/04__backwards_compatibility_tests.robot create mode 100644 tests/dcaegen2/testcases/assets/json_events/ves7_batch_stdnDefined_valid.json create mode 100644 tests/dcaegen2/testcases/assets/json_events/ves7_batch_stdnDefined_withDifferentStndDefinedNamespace.json create mode 100644 tests/dcaegen2/testcases/assets/json_events/ves7_batch_with_different_domain.json create mode 100755 tests/dcaegen2/testcases/resources/collector_backwards_compatibility.properties (limited to 'tests/dcaegen2') diff --git a/tests/dcaegen2/testcases/03__stndDefined_tests.robot b/tests/dcaegen2/testcases/03__stndDefined_tests.robot index 08970ef2..aac0086b 100644 --- a/tests/dcaegen2/testcases/03__stndDefined_tests.robot +++ b/tests/dcaegen2/testcases/03__stndDefined_tests.robot @@ -70,6 +70,16 @@ Publish Single VES Event With Invalid Type Of Multiply StndDefined Data Fields [Documentation] Post single event with invalid stndDefined data fields and return error Send Request And Validate Response And Error Message Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_STND_DEFINED_INVALID_TYPE_DATA} 400 The following service error occurred: %1. Error code is %2 +Publish VES Batch Event With Different StndDefinedNamespace Parameters + [Tags] DCAE-VESC-R1 DCAE-VESC-STNDDEFINED + [Documentation] Post batch event with invalid data (different stndDefinedNamespace values in events) to /eventListener/v7/eventBatch endpoint, expect 400 Response Status Code and "Value of stndDefinedNamespace fields have to be same when domain is stndDefined" message + Send Request And Validate Response And Error Message Publish Event To VES Collector ${https_basic_auth_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_BATCH_STND_DEFINED_TWO_DIFFERENT_STND_NAMESPACE} 400 Value of stndDefinedNamespace fields have to be same when domain is stndDefined + +Publish Batch VES Event With Correct Data + [Tags] DCAE-VESC-R1 DCAE-VESC-STNDDEFINED + [Documentation] Post single event with correct stndDefined data + Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_BATCH_STND_DEFINED_VALID} 202 + ##################################################### ## Section for tests with stndDefined validation OFF diff --git a/tests/dcaegen2/testcases/04__backwards_compatibility_tests.robot b/tests/dcaegen2/testcases/04__backwards_compatibility_tests.robot new file mode 100644 index 00000000..a1f285d5 --- /dev/null +++ b/tests/dcaegen2/testcases/04__backwards_compatibility_tests.robot @@ -0,0 +1,60 @@ +*** Settings *** +Resource ./resources/dcae_keywords.robot +*** Test Cases *** +VES Collector HTTP Health Check + [Tags] DCAE-VESC-R1 DCAE-VESC-HC + [Documentation] Run healthcheck over HTTP + Override Collector Properties ${VES_BACKWARDS_COMPATIBILITY_PROPERTIES} + Run Healthcheck ${http_session} + +Publish Single VES VNF Measurement Event API V7 + [Tags] DCAE-VESC-R1 + [Documentation] Post single event with valid data to /eventListener/v7 endpoint and expect 200 Response Status Code + Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 200 + +Publish Single VES VNF Measurement Event API V7 DmaaP response code mock as 404, expected VES response code 503 + [Tags] DCAE-VESC-R1 + [Documentation] Post single event with valid data to /eventListener/v7 endpoint and expect 503 Response Status Code + Set Successfull Dmaap Code 404 + Send Request And Validate Response And Error Message Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 503 ${ERROR_MESSAGE_CODE} + +Publish Single VES VNF Measurement Event API V7 DmaaP response code mock as 408, expected VES response code 503 + [Tags] DCAE-VESC-R1 + [Documentation] Post single event with valid data to /eventListener/v7 endpoint and expect 503 Response Status Code + Set Successfull Dmaap Code 408 + Send Request And Validate Response And Error Message Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 503 ${ERROR_MESSAGE_CODE} + +Publish Single VES VNF Measurement Event API V7 DmaaP response code mock as 429, expected VES response code 503 + [Tags] DCAE-VESC-R1 + [Documentation] Post single event with valid data to /eventListener/v7 endpoint and expect 503 Response Status Code + Set Successfull Dmaap Code 429 + Send Request And Validate Response And Error Message Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 503 ${ERROR_MESSAGE_CODE} + +Publish Single VES VNF Measurement Event API V7 DmaaP response code mock as 502, expected VES response code 503 + [Tags] DCAE-VESC-R1 + [Documentation] Post single event with valid data to /eventListener/v7 endpoint and expect 503 Response Status Code + Set Successfull Dmaap Code 502 + Send Request And Validate Response And Error Message Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 503 ${ERROR_MESSAGE_CODE} + +Publish Single VES VNF Measurement Event API V7 DmaaP response code mock as 503, expected VES response code 503 + [Tags] DCAE-VESC-R1 + [Documentation] Post single event with valid data to /eventListener/v7 endpoint and expect 503 Response Status Code + Set Successfull Dmaap Code 503 + Send Request And Validate Response And Error Message Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 503 ${ERROR_MESSAGE_CODE} + +Publish Single VES VNF Measurement Event API V7 DmaaP response code mock as 504, expected VES response code 503 + [Tags] DCAE-VESC-R1 + [Documentation] Post single event with valid data to /eventListener/v7 endpoint and expect 503 Response Status Code + Set Successfull Dmaap Code 504 + Send Request And Validate Response And Error Message Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 503 ${ERROR_MESSAGE_CODE} + +Publish Single VES VNF Measurement Event API V7 DmaaP response code mock as 413, expected VES response code 413 + [Tags] DCAE-VESC-R1 + [Documentation] Post single event with valid data to /eventListener/v7 endpoint and expect 413 Response Status Code + Set Successfull Dmaap Code 413 + Send Request And Validate Response And Error Message Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 413 ${ERROR_MESSAGE_CODE} + +Publish VES Batch Event With Different Domain Parameters + [Tags] DCAE-VESC-R1 + [Documentation] Post batch event with two different domain fileds data to /eventListener/v7/eventBatch endpoint, expect 400 Response Status Code and "Different value of domain fields in Batch Event" message + Send Request And Validate Response And Error Message Publish Event To VES Collector ${http_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_BATCH_TWO_DIFFERENT_DOMAIN} 400 Different value of domain fields in Batch Event \ No newline at end of file diff --git a/tests/dcaegen2/testcases/assets/json_events/ves7_batch_stdnDefined_valid.json b/tests/dcaegen2/testcases/assets/json_events/ves7_batch_stdnDefined_valid.json new file mode 100644 index 00000000..3bc68bcc --- /dev/null +++ b/tests/dcaegen2/testcases/assets/json_events/ves7_batch_stdnDefined_valid.json @@ -0,0 +1,108 @@ +{ + "eventList": [ + { + "commonEventHeader": { + "version": "4.1", + "vesEventListenerVersion": "7.2", + "domain": "stndDefined", + "eventId": "stndDefined-gNB_Nokia000001", + "eventName": "stndDefined-gNB-Nokia-PowerLost", + "stndDefinedNamespace": "3GPP-FaultSupervision", + "startEpochMicrosec": 1413378172000000, + "lastEpochMicrosec": 1413378172000000, + "reportingEntityName": "ibcx0001vm002oam001", + "sourceName": "scfx0001vm002cap001", + "sequence": 1, + "priority": "High" + }, + "stndDefinedFields": { + "schemaReference": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm", + "data": { + "href": 1, + "uri": "1", + "notificationId": 1, + "notificationType": "notifyNewAlarm", + "eventTime": "xyz", + "systemDN": "xyz", + "probableCause": 1, + "perceivedSeverity": "INDETERMINATE", + "rootCauseIndicator": false, + "specificProblem": "xyz", + "correlatedNotifications": [], + "backedUpStatus": true, + "backUpObject": "xyz", + "trendIndication": "MORE_SEVERE", + "thresholdInfo": { + "observedMeasurement": "new", + "observedValue": 123 + }, + "stateChangeDefinition": { + }, + "monitoredAttributes": { + "newAtt": "new" + }, + "proposedRepairActions": "xyz", + "additionalText": "xyz", + "additionalInformation": { + "addInfo": "new" + }, + "alarmId": "1", + "alarmType": "COMMUNICATIONS_ALARM" + }, + "stndDefinedFieldsVersion": "1.0" + } + }, + { + "commonEventHeader": { + "version": "4.1", + "vesEventListenerVersion": "7.2", + "domain": "stndDefined", + "eventId": "stndDefined-gNB_Nokia000001", + "eventName": "stndDefined-gNB-Nokia-PowerLost", + "stndDefinedNamespace": "3GPP-FaultSupervision", + "startEpochMicrosec": 1413378172000000, + "lastEpochMicrosec": 1413378172000000, + "reportingEntityName": "ibcx0001vm002oam001", + "sourceName": "scfx0001vm002cap001", + "sequence": 1, + "priority": "High" + }, + "stndDefinedFields": { + "schemaReference": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm", + "data": { + "href": 1, + "uri": "1", + "notificationId": 1, + "notificationType": "notifyNewAlarm", + "eventTime": "xyz", + "systemDN": "xyz", + "probableCause": 1, + "perceivedSeverity": "INDETERMINATE", + "rootCauseIndicator": false, + "specificProblem": "xyz", + "correlatedNotifications": [], + "backedUpStatus": true, + "backUpObject": "xyz", + "trendIndication": "MORE_SEVERE", + "thresholdInfo": { + "observedMeasurement": "new", + "observedValue": 123 + }, + "stateChangeDefinition": { + }, + "monitoredAttributes": { + "newAtt": "new" + }, + "proposedRepairActions": "xyz", + "additionalText": "xyz", + "additionalInformation": { + "addInfo": "new" + }, + "alarmId": "1", + "alarmType": "COMMUNICATIONS_ALARM" + }, + "stndDefinedFieldsVersion": "1.0" + } + } + ] +} \ No newline at end of file diff --git a/tests/dcaegen2/testcases/assets/json_events/ves7_batch_stdnDefined_withDifferentStndDefinedNamespace.json b/tests/dcaegen2/testcases/assets/json_events/ves7_batch_stdnDefined_withDifferentStndDefinedNamespace.json new file mode 100644 index 00000000..7a2c9787 --- /dev/null +++ b/tests/dcaegen2/testcases/assets/json_events/ves7_batch_stdnDefined_withDifferentStndDefinedNamespace.json @@ -0,0 +1,108 @@ +{ + "eventList": [ + { + "commonEventHeader": { + "version": "4.1", + "vesEventListenerVersion": "7.2", + "domain": "stndDefined", + "eventId": "stndDefined-gNB_Nokia000001", + "eventName": "stndDefined-gNB-Nokia-PowerLost", + "stndDefinedNamespace": "3GPP-FaultSupervision", + "startEpochMicrosec": 1413378172000000, + "lastEpochMicrosec": 1413378172000000, + "reportingEntityName": "ibcx0001vm002oam001", + "sourceName": "scfx0001vm002cap001", + "sequence": 1, + "priority": "High" + }, + "stndDefinedFields": { + "schemaReference": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm", + "data": { + "href": 1, + "uri": "1", + "notificationId": 1, + "notificationType": "notifyNewAlarm", + "eventTime": "xyz", + "systemDN": "xyz", + "probableCause": 1, + "perceivedSeverity": "INDETERMINATE", + "rootCauseIndicator": false, + "specificProblem": "xyz", + "correlatedNotifications": [], + "backedUpStatus": true, + "backUpObject": "xyz", + "trendIndication": "MORE_SEVERE", + "thresholdInfo": { + "observedMeasurement": "new", + "observedValue": 123 + }, + "stateChangeDefinition": { + }, + "monitoredAttributes": { + "newAtt": "new" + }, + "proposedRepairActions": "xyz", + "additionalText": "xyz", + "additionalInformation": { + "addInfo": "new" + }, + "alarmId": "1", + "alarmType": "COMMUNICATIONS_ALARM" + }, + "stndDefinedFieldsVersion": "1.0" + } + }, + { + "commonEventHeader": { + "version": "4.1", + "vesEventListenerVersion": "7.2", + "domain": "stndDefined", + "eventId": "stndDefined-gNB_Nokia000001", + "eventName": "stndDefined-gNB-Nokia-PowerLost", + "stndDefinedNamespace": "3GPP-FaultSupervision-Wrong", + "startEpochMicrosec": 1413378172000000, + "lastEpochMicrosec": 1413378172000000, + "reportingEntityName": "ibcx0001vm002oam001", + "sourceName": "scfx0001vm002cap001", + "sequence": 1, + "priority": "High" + }, + "stndDefinedFields": { + "schemaReference": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm", + "data": { + "href": 1, + "uri": "1", + "notificationId": 1, + "notificationType": "notifyNewAlarm", + "eventTime": "xyz", + "systemDN": "xyz", + "probableCause": 1, + "perceivedSeverity": "INDETERMINATE", + "rootCauseIndicator": false, + "specificProblem": "xyz", + "correlatedNotifications": [], + "backedUpStatus": true, + "backUpObject": "xyz", + "trendIndication": "MORE_SEVERE", + "thresholdInfo": { + "observedMeasurement": "new", + "observedValue": 123 + }, + "stateChangeDefinition": { + }, + "monitoredAttributes": { + "newAtt": "new" + }, + "proposedRepairActions": "xyz", + "additionalText": "xyz", + "additionalInformation": { + "addInfo": "new" + }, + "alarmId": "1", + "alarmType": "COMMUNICATIONS_ALARM" + }, + "stndDefinedFieldsVersion": "1.0" + } + } + ] +} \ No newline at end of file diff --git a/tests/dcaegen2/testcases/assets/json_events/ves7_batch_with_different_domain.json b/tests/dcaegen2/testcases/assets/json_events/ves7_batch_with_different_domain.json new file mode 100644 index 00000000..0a7d4a08 --- /dev/null +++ b/tests/dcaegen2/testcases/assets/json_events/ves7_batch_with_different_domain.json @@ -0,0 +1,67 @@ + +{ + "eventList": [ + { + "commonEventHeader": { + "version": "4.0.1", + "vesEventListenerVersion": "7.0.1", + "domain": "fault", + "eventName": "Fault_Vscf:Acs-Ericcson_PilotNumberPoolExhaustion", + "eventId": "fault0000250", + "sequence": 1, + "priority": "High", + "reportingEntityId": "cc305d54-75b4-431b-adb2-eb6b9e541234", + "reportingEntityName": "ibcx0001vm002oam0011234", + "sourceId": "de305d54-75b4-431b-adb2-eb6b9e546014", + "sourceName": "scfx0001vm002cap001", + "nfVendorName": "Ericsson", + "nfNamingCode": "scfx", + "nfcNamingCode": "ssc", + "startEpochMicrosec": 1413378172000000, + "lastEpochMicrosec": 1413378172000000, + "timeZoneOffset": "UTC-05:30" + }, + "faultFields": { + "faultFieldsVersion": "4.0", + "alarmCondition": "PilotNumberPoolExhaustion", + "eventSourceType": "other", + "specificProblem": "Calls cannot complete - pilot numbers are unavailable", + "eventSeverity": "CRITICAL", + "vfStatus": "Active", + "alarmAdditionalInformation": { + "PilotNumberPoolSize": "1000" + } + } + }, + { + "commonEventHeader": { + "version": "4.0.1", + "vesEventListenerVersion": "7.0.1", + "domain": "other", + "eventName": " Fault_Vscf:Acs-Ericcson_RecordingServerUnreachable", + "eventId": "other0000251", + "sequence": 0, + "priority": "High", + "reportingEntityId": "cc305d54-75b4-431b-adb2-eb6b9e541234", + "reportingEntityName": "ibcx0001vm002oam0011234", + "sourceId": "de305d54-75b4-431b-adb2-eb6b9e546014", + "sourceName": "scfx0001vm002cap001", + "nfVendorName": "Ericsson", + "nfNamingCode": "scfx", + "nfcNamingCode": "ssc", + "startEpochMicrosec": 1413378172000010, + "lastEpochMicrosec": 1413378172000010, + "timeZoneOffset": "UTC-05:30" + }, + "faultFields": { + "faultFieldsVersion": "4.0", + "alarmCondition": "RecordingServerUnreachable", + "eventSourceType": "other", + "specificProblem": "Recording server unreachable", + "eventSeverity": "CRITICAL", + "vfStatus": "Active" + } + } + ] +} + diff --git a/tests/dcaegen2/testcases/resources/collector_backwards_compatibility.properties b/tests/dcaegen2/testcases/resources/collector_backwards_compatibility.properties new file mode 100755 index 00000000..e62c14c7 --- /dev/null +++ b/tests/dcaegen2/testcases/resources/collector_backwards_compatibility.properties @@ -0,0 +1,83 @@ +############################################################################### +## +## Collector Server config +## +## - Default values are shown as commented settings. +## +############################################################################### +## +## HTTP(S) service +## +## Normally: +## +## - 8080 is http service +## - https is disabled by default +## +## - At this time, the server always binds to 0.0.0.0 +## +## +collector.service.port=8080 + +## Authentication is only supported via secure port +## When enabled - require valid keystore defined +collector.service.secure.port=8443 + +# auth.method flags: +# +# noAuth - default option - no security (http) +# certBasicAuth - auth by certificate and basic auth username / password (https) +auth.method=noAuth + +## Combination of userid,hashPassword encoded pwd list to be supported +## userid and pwd comma separated; pipe delimitation between each pair +## Password is generated by crypt-password library using BCrypt algorithm stored in dcaegen2/sdk package +## or https://nexus.onap.org/#nexus-search;quick~crypt-password +header.authlist=sample1,$2a$10$0buh.2WeYwN868YMwnNNEuNEAMNYVU9.FSMJGyIKV3dGET/7oGOi6 + +## The keystore must be setup per installation when secure port is configured +collector.keystore.file.location=etc/keystore +collector.keystore.passwordfile=etc/passwordfile + +collector.cert.subject.matcher=etc/certSubjectMatcher.properties + +## The truststore must be setup per installation when mutual tls support is configured +collector.truststore.file.location=etc/truststore +collector.truststore.passwordfile=etc/trustpasswordfile + +## Schema Validation checkflag +## default no validation checkflag (-1) +## If enabled (1) - schemafile location must be specified +collector.schema.checkflag=1 +collector.schema.file={\"v1\":\"./etc/CommonEventFormat_27.2.json\",\"v2\":\"./etc/CommonEventFormat_27.2.json\",\"v3\":\"./etc/CommonEventFormat_27.2.json\",\"v4\":\"./etc/CommonEventFormat_27.2.json\",\"v5\":\"./etc/CommonEventFormat_28.4.1.json\",\"v7\":\"./etc/CommonEventFormat_30.2.1_ONAP.json\"} + +## Schema StndDefinedFields Validation checkflag +## default no validation checkflag (-1) +## If enabled (1) - schema files locations must be specified, mapping file path must be specified, schema reference path +## in event json must be specified, path to stndDefined data field in event json must be specified +collector.externalSchema.checkflag=1 +collector.externalSchema.schemasLocation=./etc/externalRepo/ +collector.externalSchema.mappingFileLocation=./etc/externalRepo/schema-map.json +event.externalSchema.schemaRefPath=$.event.stndDefinedFields.schemaReference +event.externalSchema.stndDefinedDataPath=$.event.stndDefinedFields.data + + +## List all streamid per domain to be supported. The streamid should match to channel name on dmaapfile +collector.dmaap.streamid=fault=ves-fault,ves-other|syslog=ves-syslog|heartbeat=ves-heartbeat|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration|3GPP-FaultSupervision=ves-3gpp-fault-supervision|3GPP-Heartbeat=ves-3gpp-heartbeat|3GPP-Provisioning=ves-3gpp-provisioning|3GPP-PerformanceAssurance=ves-3gpp-performance-assurance +collector.dmaapfile=./etc/ves-dmaap-config.json + +## Path to the file containing description of api versions +collector.description.api.version.location=etc/api_version_description.json + +## Event transformation Flag - when set expects configurable transformation +## defined under ./etc/eventTransform.json +## Enabled by default; to disable set to 0 +event.transform.flag=1 + +# Describes at what frequency (measured in minutes) should application try to fetch config from CBS +collector.dynamic.config.update.frequency=5 + +# Response compatibility (set to None to turn off ves 7.2 compatibility) +# v7.2 response codes: 202, 500 +# None response code: 200, 413, 503 +collector.response.compatibility=None + diff --git a/tests/dcaegen2/testcases/resources/collector_basic_auth.properties b/tests/dcaegen2/testcases/resources/collector_basic_auth.properties index cd417635..aff4b1bb 100755 --- a/tests/dcaegen2/testcases/resources/collector_basic_auth.properties +++ b/tests/dcaegen2/testcases/resources/collector_basic_auth.properties @@ -62,7 +62,7 @@ event.externalSchema.stndDefinedDataPath=/event/stndDefinedFields/data ## List all streamid per domain to be supported. The streamid should match to channel name on dmaapfile collector.dmaap.streamid=fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration|3GPP-FaultSupervision=ves-3gpp-fault-supervision|3GPP-Heartbeat=ves-3gpp-heartbeat|3GPP-Provisioning=ves-3gpp-provisioning|3GPP-PerformanceAssurance=ves-3gpp-performance-assurance -collector.dmaapfile=./etc/DmaapConfig.json +collector.dmaapfile=./etc/ves-dmaap-config.json ## Event transformation Flag - when set expects configurable transformation ## defined under ./etc/eventTransform.json @@ -71,3 +71,8 @@ event.transform.flag=1 # Describes at what frequency (measured in minutes) should application try to fetch config from CBS collector.dynamic.config.update.frequency=5 + +# Response compatibility (set to None to turn off ves 7.2 compatibility) +# v7.2 response codes: 202, 500 +# None response code: 200, 413, 503 +collector.response.compatibility=v7.2 diff --git a/tests/dcaegen2/testcases/resources/collector_stnd_defined.properties b/tests/dcaegen2/testcases/resources/collector_stnd_defined.properties index 9712dff5..a5ae2b3a 100644 --- a/tests/dcaegen2/testcases/resources/collector_stnd_defined.properties +++ b/tests/dcaegen2/testcases/resources/collector_stnd_defined.properties @@ -62,7 +62,7 @@ event.externalSchema.stndDefinedDataPath=/event/stndDefinedFields/data ## List all streamid per domain to be supported. The streamid should match to channel name on dmaapfile collector.dmaap.streamid=fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration|3GPP-FaultSupervision=ves-3gpp-fault-supervision|3GPP-Heartbeat=ves-3gpp-heartbeat|3GPP-Provisioning=ves-3gpp-provisioning|3GPP-PerformanceAssurance=ves-3gpp-performance-assurance -collector.dmaapfile=./etc/DmaapConfig.json +collector.dmaapfile=./etc/ves-dmaap-config.json ## Event transformation Flag - when set expects configurable transformation ## defined under ./etc/eventTransform.json @@ -71,3 +71,8 @@ event.transform.flag=1 # Describes at what frequency (measured in minutes) should application try to fetch config from CBS collector.dynamic.config.update.frequency=5 + +# Response compatibility (set to None to turn off ves 7.2 compatibility) +# v7.2 response codes: 202, 500 +# None response code: 200, 413, 503 +collector.response.compatibility=v7.2 diff --git a/tests/dcaegen2/testcases/resources/collector_stnd_defined_new_schema_map.properties b/tests/dcaegen2/testcases/resources/collector_stnd_defined_new_schema_map.properties index cd417635..aff4b1bb 100644 --- a/tests/dcaegen2/testcases/resources/collector_stnd_defined_new_schema_map.properties +++ b/tests/dcaegen2/testcases/resources/collector_stnd_defined_new_schema_map.properties @@ -62,7 +62,7 @@ event.externalSchema.stndDefinedDataPath=/event/stndDefinedFields/data ## List all streamid per domain to be supported. The streamid should match to channel name on dmaapfile collector.dmaap.streamid=fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration|3GPP-FaultSupervision=ves-3gpp-fault-supervision|3GPP-Heartbeat=ves-3gpp-heartbeat|3GPP-Provisioning=ves-3gpp-provisioning|3GPP-PerformanceAssurance=ves-3gpp-performance-assurance -collector.dmaapfile=./etc/DmaapConfig.json +collector.dmaapfile=./etc/ves-dmaap-config.json ## Event transformation Flag - when set expects configurable transformation ## defined under ./etc/eventTransform.json @@ -71,3 +71,8 @@ event.transform.flag=1 # Describes at what frequency (measured in minutes) should application try to fetch config from CBS collector.dynamic.config.update.frequency=5 + +# Response compatibility (set to None to turn off ves 7.2 compatibility) +# v7.2 response codes: 202, 500 +# None response code: 200, 413, 503 +collector.response.compatibility=v7.2 diff --git a/tests/dcaegen2/testcases/resources/dcae_properties.robot b/tests/dcaegen2/testcases/resources/dcae_properties.robot index 2ae46f92..9bb16bd6 100644 --- a/tests/dcaegen2/testcases/resources/dcae_properties.robot +++ b/tests/dcaegen2/testcases/resources/dcae_properties.robot @@ -60,10 +60,15 @@ ${VES_STND_DEFINED_NO_VALUE} %{WORKSPACE}/tests/dcaegen2/testcases/a ${VES_STND_DEFINED_INVALID_TYPE_DATA} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_invalid_type_data_field.json ${VES_CERT_BASIC_AUTH_COLLECTOR_PROPERTIES} %{WORKSPACE}/tests/dcaegen2/testcases/resources/collector_basic_auth.properties ${VES_DISABLED_STNDDEFINED_COLLECTOR_PROPERTIES} %{WORKSPACE}/tests/dcaegen2/testcases/resources/collector_stnd_defined.properties +${VES_BACKWARDS_COMPATIBILITY_PROPERTIES} %{WORKSPACE}/tests/dcaegen2/testcases/resources/collector_backwards_compatibility.properties ${VES_ADD_REFERENCE_TO_OTHER_SCHEMAS} %{WORKSPACE}/tests/dcaegen2/testcases/resources/collector_stnd_defined_new_schema_map.properties ${VES_VALID_JSON_WITH_RFERENCE_TO_VALID_SCHEMA} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_valid_eventWithStndDefinedFields_with_valid_schema_ref.json ${VES_VALID_JSON_V7_STND_DEF_FIELDS_WRONG_SCHEMA_FILE_REF} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_valid_eventWithStndDefinedFields_to_schema_with_wrong_file_ref.json ${VES_VALID_JSON_V7_STND_DEF_FIELDS_WRONG_SCHEMA_INTERNAL_REF} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_valid_eventWithStndDefinedFields_to_schema_with_wrong_internal_ref.json +${VES_BATCH_TWO_DIFFERENT_DOMAIN} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_batch_with_different_domain.json +${VES_BATCH_STND_DEFINED_TWO_DIFFERENT_STND_NAMESPACE} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_batch_stdnDefined_withDifferentStndDefinedNamespace.json +${VES_BATCH_STND_DEFINED_VALID} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_batch_stdnDefined_valid.json +${ERROR_MESSAGE_CODE} The following service error occurred: %1. Error code is %2 #DCAE Health Check ${CONFIG_BINDING_URL} http://localhost:8443 diff --git a/tests/dcaegen2/testcases/resources/robot_library/DmaapLibrary.py b/tests/dcaegen2/testcases/resources/robot_library/DmaapLibrary.py index c9a0ff7b..f79ba04e 100644 --- a/tests/dcaegen2/testcases/resources/robot_library/DmaapLibrary.py +++ b/tests/dcaegen2/testcases/resources/robot_library/DmaapLibrary.py @@ -49,6 +49,7 @@ class DmaapLibrary(object): @staticmethod def cleanup_ves_events(): + DmaapLibrary.dmaap_server.reset_dmaap_succesfull_code() if DmaapLibrary.server_thread is not None: DmaapLibrary.dmaap_queue.clean_up_event() logger.console("DMaaP event queue is cleaned up") @@ -77,3 +78,7 @@ class DmaapLibrary(object): return 'true' evt_str = DmaapLibrary.dmaap_queue.deque_event() return 'false' + + @staticmethod + def set_successfull_dmaap_code(code): + DmaapLibrary.dmaap_server.set_dmaap_successfull_code(int(code)) \ No newline at end of file diff --git a/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPHandler.py b/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPHandler.py index f1c46e19..cc73c36a 100644 --- a/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPHandler.py +++ b/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPHandler.py @@ -19,9 +19,11 @@ try: except ImportError: from StringIO import StringIO - class DMaaPHandler(BaseHTTPServer.BaseHTTPRequestHandler): + DEFAULT_SUCCES_RESPONSE_CODE=200 + succes_response_code=DEFAULT_SUCCES_RESPONSE_CODE + def __init__(self, dmaap_simulator, *args): self.dmaap_simulator = dmaap_simulator BaseHTTPServer.BaseHTTPRequestHandler.__init__(self, *args) @@ -66,7 +68,7 @@ class DMaaPHandler(BaseHTTPServer.BaseHTTPRequestHandler): if 'clientThrottlingState' in self.requestline: self.send_response(204) else: - self.send_response(200) + self.send_response(self.succes_response_code) self.send_header('Content-Type', 'application/json') self.end_headers() self.wfile.write("{'count': 1, 'serverTimeMs': 3}") diff --git a/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPServer.py b/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPServer.py index 37499be8..8b66fd4d 100644 --- a/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPServer.py +++ b/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPServer.py @@ -14,6 +14,12 @@ class DMaaPServer(BaseHTTPServer.HTTPServer): serer_address = self.socket.getsockname() print "Serving HTTP on", serer_address[0], "port", serer_address[1], "..." + def set_dmaap_successfull_code(self,code_number): + DMaaPHandler.DMaaPHandler.succes_response_code=code_number + + def reset_dmaap_succesfull_code(self): + DMaaPHandler.DMaaPHandler.succes_response_code=DMaaPHandler.DMaaPHandler.DEFAULT_SUCCES_RESPONSE_CODE + def create_dmaap_server(dmaap_simulator, protocol="HTTP/1.0", port=3904): server_address = ('', port) -- cgit 1.2.3-korg