diff options
author | grabinsk <maciej.grabinski@nokia.com> | 2019-05-22 14:59:02 +0200 |
---|---|---|
committer | grabinsk <maciej.grabinski@nokia.com> | 2019-05-22 14:59:02 +0200 |
commit | db4c4a5f83b674d6c04f9e6f3355171b13d67fa4 (patch) | |
tree | 728a3c21caa50fae71635dce425d5b86f867d469 /tests | |
parent | b6f2ac350d36cf7cc22e0c6e02804d7aa82d77eb (diff) |
Update PRH tests after SDK update to El Alto in PRH
Change-Id: I0ce656cc2b0e59254b788ac114f5617cacea1ffb
Issue-ID: Issue-ID: DCAEGEN2-1501
Signed-off-by: grabinsk <maciej.grabinski@nokia.com>
Diffstat (limited to 'tests')
27 files changed, 489 insertions, 443 deletions
diff --git a/tests/dcaegen2/prh-testcases/assets/aai-missing-entry/ves-event.json b/tests/dcaegen2/prh-testcases/assets/aai-missing-entry/ves-event.json index d8f3c90c..10ce41c5 100644 --- a/tests/dcaegen2/prh-testcases/assets/aai-missing-entry/ves-event.json +++ b/tests/dcaegen2/prh-testcases/assets/aai-missing-entry/ves-event.json @@ -1,37 +1,39 @@ -{ - "event": { - "commonEventHeader": { - "startEpochMicrosec": 1540212137393, - "sourceId": "val13", - "eventId": "registration_40212137", - "nfcNamingCode": "oam", - "internalHeaderFields": { - "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC" +[ + { + "event": { + "commonEventHeader": { + "startEpochMicrosec": 1540212137393, + "sourceId": "val13", + "eventId": "registration_40212137", + "nfcNamingCode": "oam", + "internalHeaderFields": { + "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC" + }, + "eventType": "pnfRegistration", + "priority": "Normal", + "version": "4.0.1", + "reportingEntityName": "NOK6061ZW8", + "sequence": 0, + "domain": "pnfRegistration", + "lastEpochMicrosec": 1540212137393, + "eventName": "pnfRegistration_Nokia_5gDu", + "vesEventListenerVersion": "7.0.1", + "sourceName": "NOK6061ZW8", + "nfNamingCode": "gNB" }, - "eventType": "pnfRegistration", - "priority": "Normal", - "version": "4.0.1", - "reportingEntityName": "NOK6061ZW8", - "sequence": 0, - "domain": "pnfRegistration", - "lastEpochMicrosec": 1540212137393, - "eventName": "pnfRegistration_Nokia_5gDu", - "vesEventListenerVersion": "7.0.1", - "sourceName": "NOK6061ZW8", - "nfNamingCode": "gNB" - }, - "pnfRegistrationFields": { - "unitType": "val8", - "serialNumber": "6061ZW9", - "pnfRegistrationFieldsVersion": "2.0", - "manufactureDate": "1540212137393", - "modelNumber": "val6", - "lastServiceDate": "1540212137393", - "unitFamily": "BBU", - "vendorName": "Nokia", - "oamV4IpAddress": "val3", - "oamV6IpAddress": "val4", - "softwareVersion": "val7" + "pnfRegistrationFields": { + "unitType": "val8", + "serialNumber": "6061ZW9", + "pnfRegistrationFieldsVersion": "2.0", + "manufactureDate": "1540212137393", + "modelNumber": "val6", + "lastServiceDate": "1540212137393", + "unitFamily": "BBU", + "vendorName": "Nokia", + "oamV4IpAddress": "val3", + "oamV6IpAddress": "val4", + "softwareVersion": "val7" + } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/aai-not-responding/ves-event.json b/tests/dcaegen2/prh-testcases/assets/aai-not-responding/ves-event.json index d8f3c90c..10ce41c5 100644 --- a/tests/dcaegen2/prh-testcases/assets/aai-not-responding/ves-event.json +++ b/tests/dcaegen2/prh-testcases/assets/aai-not-responding/ves-event.json @@ -1,37 +1,39 @@ -{ - "event": { - "commonEventHeader": { - "startEpochMicrosec": 1540212137393, - "sourceId": "val13", - "eventId": "registration_40212137", - "nfcNamingCode": "oam", - "internalHeaderFields": { - "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC" +[ + { + "event": { + "commonEventHeader": { + "startEpochMicrosec": 1540212137393, + "sourceId": "val13", + "eventId": "registration_40212137", + "nfcNamingCode": "oam", + "internalHeaderFields": { + "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC" + }, + "eventType": "pnfRegistration", + "priority": "Normal", + "version": "4.0.1", + "reportingEntityName": "NOK6061ZW8", + "sequence": 0, + "domain": "pnfRegistration", + "lastEpochMicrosec": 1540212137393, + "eventName": "pnfRegistration_Nokia_5gDu", + "vesEventListenerVersion": "7.0.1", + "sourceName": "NOK6061ZW8", + "nfNamingCode": "gNB" }, - "eventType": "pnfRegistration", - "priority": "Normal", - "version": "4.0.1", - "reportingEntityName": "NOK6061ZW8", - "sequence": 0, - "domain": "pnfRegistration", - "lastEpochMicrosec": 1540212137393, - "eventName": "pnfRegistration_Nokia_5gDu", - "vesEventListenerVersion": "7.0.1", - "sourceName": "NOK6061ZW8", - "nfNamingCode": "gNB" - }, - "pnfRegistrationFields": { - "unitType": "val8", - "serialNumber": "6061ZW9", - "pnfRegistrationFieldsVersion": "2.0", - "manufactureDate": "1540212137393", - "modelNumber": "val6", - "lastServiceDate": "1540212137393", - "unitFamily": "BBU", - "vendorName": "Nokia", - "oamV4IpAddress": "val3", - "oamV6IpAddress": "val4", - "softwareVersion": "val7" + "pnfRegistrationFields": { + "unitType": "val8", + "serialNumber": "6061ZW9", + "pnfRegistrationFieldsVersion": "2.0", + "manufactureDate": "1540212137393", + "modelNumber": "val6", + "lastServiceDate": "1540212137393", + "unitFamily": "BBU", + "vendorName": "Nokia", + "oamV4IpAddress": "val3", + "oamV6IpAddress": "val4", + "softwareVersion": "val7" + } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV4.json b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV4.json index ac7c3090..75a73fa2 100644 --- a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV4.json +++ b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV4.json @@ -1,15 +1,17 @@ -{ - "event": { - "commonEventHeader": { - "sourceName":"NOK6061ZW2" - }, - "pnfRegistrationFields": { - "oamV4IpAddress":"10.17.123.234", - "oamV6IpAddress":"", - "serialNumber":"NOkkaaa123", - "vendorName":"equipVendor", - "modelNumber":"equipModel", - "unitType":"equipType" +[ + { + "event": { + "commonEventHeader": { + "sourceName": "NOK6061ZW2" + }, + "pnfRegistrationFields": { + "oamV4IpAddress": "10.17.123.234", + "oamV6IpAddress": "", + "serialNumber": "NOkkaaa123", + "vendorName": "equipVendor", + "modelNumber": "equipModel", + "unitType": "equipType" + } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV6.json b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV6.json index 7fdef4fc..ae43bd60 100644 --- a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV6.json +++ b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV6.json @@ -1,16 +1,18 @@ -{ - "event": { - "commonEventHeader": { - "sourceName":"ERI6061ZW3" - }, - "pnfRegistrationFields": { - "oamV4IpAddress":"", - "oamV6IpAddress":"2001:0db8:85a3:0000:0000:8b2e:0370:7334", - "serialNumber":"NOkkaaa123", - "vendorName":"equipVendor", - "modelNumber":"equipModel", - "unitType":"equipType", - "additionalFields": {} +[ + { + "event": { + "commonEventHeader": { + "sourceName": "ERI6061ZW3" + }, + "pnfRegistrationFields": { + "oamV4IpAddress": "", + "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8b2e:0370:7334", + "serialNumber": "NOkkaaa123", + "vendorName": "equipVendor", + "modelNumber": "equipModel", + "unitType": "equipType", + "additionalFields": {} + } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_all_fields.json b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_all_fields.json index eb4dfaf9..13c564c1 100644 --- a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_all_fields.json +++ b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_all_fields.json @@ -1,21 +1,23 @@ -{ - "event": { - "commonEventHeader": { - "sourceName":"NOK6061ZW1", - "nfNamingCode": "nfNamingCode" - }, - "pnfRegistrationFields": { - "oamV4IpAddress":"10.16.123.234", - "oamV6IpAddress":"2001:0db8:85a3:0000:0000:8a2e:0370:7334", - "serialNumber":"serialNumber", - "vendorName":"vendorName", - "modelNumber":"modelNumber", - "unitType":"unitType", - "additionalFields": { - "attachmentPoint": "bla-bla-30-3", - "svlan": "1005", - "cvlan": "678" +[ + { + "event": { + "commonEventHeader": { + "sourceName": "NOK6061ZW1", + "nfNamingCode": "nfNamingCode" + }, + "pnfRegistrationFields": { + "oamV4IpAddress": "10.16.123.234", + "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8a2e:0370:7334", + "serialNumber": "serialNumber", + "vendorName": "vendorName", + "modelNumber": "modelNumber", + "unitType": "unitType", + "additionalFields": { + "attachmentPoint": "bla-bla-30-3", + "svlan": "1005", + "cvlan": "678" + } } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_IPV4_and_IPV6.json b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_IPV4_and_IPV6.json index 6a14bfd4..7ac9bf19 100644 --- a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_IPV4_and_IPV6.json +++ b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_IPV4_and_IPV6.json @@ -1,15 +1,17 @@ -{ - "event": { - "commonEventHeader": { - "sourceName":"NOK6061ZW4" - }, - "pnfRegistrationFields": { - "oamV4IpAddress":"", - "oamV6IpAddress":"", - "serialNumber":"", - "vendorName":"", - "modelNumber":"", - "unitType":"" +[ + { + "event": { + "commonEventHeader": { + "sourceName": "NOK6061ZW4" + }, + "pnfRegistrationFields": { + "oamV4IpAddress": "", + "oamV6IpAddress": "", + "serialNumber": "", + "vendorName": "", + "modelNumber": "", + "unitType": "" + } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName.json b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName.json index 2bae7e64..88e2536f 100644 --- a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName.json +++ b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName.json @@ -1,16 +1,18 @@ -{ - "event": { - "commonEventHeader": { - "sourceName":"" - }, - "pnfRegistrationFields": { - "oamV4IpAddress":"10.18.123.234", - "oamV6IpAddress":"2001:0db8:85a3:0000:0000:8a2a:0370:7334", - "serialNumber":"", - "vendorName":"", - "modelNumber":"", - "unitType":"", - "additionalFields": {} +[ + { + "event": { + "commonEventHeader": { + "sourceName": "" + }, + "pnfRegistrationFields": { + "oamV4IpAddress": "10.18.123.234", + "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8a2a:0370:7334", + "serialNumber": "", + "vendorName": "", + "modelNumber": "", + "unitType": "", + "additionalFields": {} + } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_IPV4_and_IPV6.json b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_IPV4_and_IPV6.json index de1f576c..04d5b3d6 100644 --- a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_IPV4_and_IPV6.json +++ b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_IPV4_and_IPV6.json @@ -1,11 +1,13 @@ -{ - "event": { - "commonEventHeader": { - "sourceName":"" - }, - "pnfRegistrationFields": { - "oamV4IpAddress":"", - "oamV6IpAddress":"" +[ + { + "event": { + "commonEventHeader": { + "sourceName": "" + }, + "pnfRegistrationFields": { + "oamV4IpAddress": "", + "oamV6IpAddress": "" + } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV4.json b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV4.json index 4838f1b0..3b6b7add 100644 --- a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV4.json +++ b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV4.json @@ -1,11 +1,13 @@ -{ - "event": { - "commonEventHeader": { - "sourceName":"" - }, - "pnfRegistrationFields": { - "oamV4IpAddress":"", - "oamV6IpAddress":"2001:0db8:85a3:0000:0000:8b2f:0370:7334" +[ + { + "event": { + "commonEventHeader": { + "sourceName": "" + }, + "pnfRegistrationFields": { + "oamV4IpAddress": "", + "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8b2f:0370:7334" + } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV6.json b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV6.json index 253869ac..c81c5a72 100644 --- a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV6.json +++ b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV6.json @@ -1,12 +1,13 @@ -{ - "event": { - "commonEventHeader": { - "sourceName":"" - }, - "pnfRegistrationFields": { - "oamV4IpAddress":"10.17.163.234", - "oamV6IpAddress":"" - +[ + { + "event": { + "commonEventHeader": { + "sourceName": "" + }, + "pnfRegistrationFields": { + "oamV4IpAddress": "10.17.163.234", + "oamV6IpAddress": "" + } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_all_filled.json b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_all_filled.json index 39fadb8a..9be02f10 100644 --- a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_all_filled.json +++ b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_all_filled.json @@ -1,22 +1,24 @@ -{ - "event": { - "commonEventHeader": { - "sourceName":"NOK6061ZW4", - "nfNamingCode": "nfNamingCode", - "nfcNamingCode": "nfcNamingCode" - }, - "pnfRegistrationFields": { - "oamV4IpAddress":"ipv4", - "oamV6IpAddress":"", - "serialNumber":"sn1234", - "vendorName":"vendorName", - "modelNumber":"modelNumber", - "unitType":"unitType", - "additionalFields": { - "attachmentPoint": "bla-bla-30-3", - "svlan": "1005", - "cvlan": "678" +[ + { + "event": { + "commonEventHeader": { + "sourceName": "NOK6061ZW4", + "nfNamingCode": "nfNamingCode", + "nfcNamingCode": "nfcNamingCode" + }, + "pnfRegistrationFields": { + "oamV4IpAddress": "ipv4", + "oamV6IpAddress": "", + "serialNumber": "sn1234", + "vendorName": "vendorName", + "modelNumber": "modelNumber", + "unitType": "unitType", + "additionalFields": { + "attachmentPoint": "bla-bla-30-3", + "svlan": "1005", + "cvlan": "678" + } } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_empty.json b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_empty.json index 986b992d..a80a70a8 100644 --- a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_empty.json +++ b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_empty.json @@ -1,17 +1,19 @@ -{ - "event": { - "commonEventHeader": { - "sourceName":"NOK6061ZW3", - "nfNamingCode": "" - }, - "pnfRegistrationFields": { - "oamV4IpAddress":"10.16.123.234", - "oamV6IpAddress":"2001:0db8:85a3:0000:0000:8a2e:0370:7334", - "serialNumber":"", - "vendorName":"", - "modelNumber":"", - "unitType":"", - "additionalFields": {} +[ + { + "event": { + "commonEventHeader": { + "sourceName": "NOK6061ZW3", + "nfNamingCode": "" + }, + "pnfRegistrationFields": { + "oamV4IpAddress": "10.16.123.234", + "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8a2e:0370:7334", + "serialNumber": "", + "vendorName": "", + "modelNumber": "", + "unitType": "", + "additionalFields": {} + } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_missing_all.json b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_missing_all.json index 16963e1b..9acbeb39 100644 --- a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_missing_all.json +++ b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_missing_all.json @@ -1,11 +1,13 @@ -{ - "event": { - "commonEventHeader": { - "sourceName":"NOK6061ZW1" - }, - "pnfRegistrationFields": { - "oamV4IpAddress":"10.16.123.234", - "oamV6IpAddress":"2001:0db8:85a3:0000:0000:8a2e:0370:7334" +[ + { + "event": { + "commonEventHeader": { + "sourceName": "NOK6061ZW1" + }, + "pnfRegistrationFields": { + "oamV4IpAddress": "10.16.123.234", + "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8a2e:0370:7334" + } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_missing_partial.json b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_missing_partial.json index c10f0d61..6c0666c7 100644 --- a/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_missing_partial.json +++ b/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_missing_partial.json @@ -1,14 +1,16 @@ -{ - "event": { - "commonEventHeader": { - "sourceName":"NOK6061ZW4" - }, - "pnfRegistrationFields": { - "oamV4IpAddress":"10.16.123.234", - "oamV6IpAddress":"", - "serialNumber":"123", - "modelNumber":"sn123243", - "unitType": "unitType" +[ + { + "event": { + "commonEventHeader": { + "sourceName": "NOK6061ZW4" + }, + "pnfRegistrationFields": { + "oamV4IpAddress": "10.16.123.234", + "oamV6IpAddress": "", + "serialNumber": "123", + "modelNumber": "sn123243", + "unitType": "unitType" + } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/json_events/event_without_IPV6_field.json b/tests/dcaegen2/prh-testcases/assets/json_events/event_without_IPV6_field.json index 02f01370..a053f7a3 100644 --- a/tests/dcaegen2/prh-testcases/assets/json_events/event_without_IPV6_field.json +++ b/tests/dcaegen2/prh-testcases/assets/json_events/event_without_IPV6_field.json @@ -1,14 +1,16 @@ -{ - "event": { - "commonEventHeader": { - "sourceName":"NOK6061ZW9" - }, - "pnfRegistrationFields": { - "oamV4IpAddress":"10.17.123.24", - "serialNumber":"NOkkaaa123", - "vendorName":"equipVendor", - "modelNumber":"equipModel", - "unitType":"equipType" +[ + { + "event": { + "commonEventHeader": { + "sourceName": "NOK6061ZW9" + }, + "pnfRegistrationFields": { + "oamV4IpAddress": "10.17.123.24", + "serialNumber": "NOkkaaa123", + "vendorName": "equipVendor", + "modelNumber": "equipModel", + "unitType": "equipType" + } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/json_events/not_json_format.json b/tests/dcaegen2/prh-testcases/assets/json_events/not_json_format.json index f6afb1d3..87afc51a 100644 --- a/tests/dcaegen2/prh-testcases/assets/json_events/not_json_format.json +++ b/tests/dcaegen2/prh-testcases/assets/json_events/not_json_format.json @@ -1,15 +1,17 @@ -{ - "event": { - "commonEventHeader": { - "sourceName":"NOK6061ZW1" - }, - "pnfRegistrationFields": { - "oamV4IpAddress":"10.16.123.234", - "oamV6IpAddress":"2001:0db8:85a3:0000:0000:8a2e:0370:7334", - "serialNumber":"NOkkaaa123", - "vendorName":"equipVendor", - "modelNumber":"equipModel", - "unitType":"equipType", +[ + { + "event": { + "commonEventHeader": { + "sourceName": "NOK6061ZW1" + }, + "pnfRegistrationFields": { + "oamV4IpAddress": "10.16.123.234", + "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8a2e:0370:7334", + "serialNumber": "NOkkaaa123", + "vendorName": "equipVendor", + "modelNumber": "equipModel", + "unitType": "equipType", + } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/json_events/ves-event-pnf-registration-simple.json b/tests/dcaegen2/prh-testcases/assets/json_events/ves-event-pnf-registration-simple.json index c3089678..02a84e6f 100644 --- a/tests/dcaegen2/prh-testcases/assets/json_events/ves-event-pnf-registration-simple.json +++ b/tests/dcaegen2/prh-testcases/assets/json_events/ves-event-pnf-registration-simple.json @@ -1,14 +1,16 @@ -{ - "event": { - "commonEventHeader": { - "sourceName":"NOK6061ZW1", - "nfNamingCode": "nfNamingCode" - }, - "pnfRegistrationFields": { - "serialNumber":"serialNumber", - "vendorName":"vendorName", - "modelNumber":"modelNumber", - "unitType":"unitType" +[ + { + "event": { + "commonEventHeader": { + "sourceName": "NOK6061ZW1", + "nfNamingCode": "nfNamingCode" + }, + "pnfRegistrationFields": { + "serialNumber": "serialNumber", + "vendorName": "vendorName", + "modelNumber": "modelNumber", + "unitType": "unitType" + } } } -}
\ No newline at end of file +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/json_events/ves-event-pnf-registration-with-attachment-point.json b/tests/dcaegen2/prh-testcases/assets/json_events/ves-event-pnf-registration-with-attachment-point.json index 9d730bf6..054774c5 100644 --- a/tests/dcaegen2/prh-testcases/assets/json_events/ves-event-pnf-registration-with-attachment-point.json +++ b/tests/dcaegen2/prh-testcases/assets/json_events/ves-event-pnf-registration-with-attachment-point.json @@ -1,19 +1,21 @@ -{ - "event": { - "commonEventHeader": { - "sourceName":"NOK6061ZW1", - "nfNamingCode": "nfNamingCode" - }, - "pnfRegistrationFields": { - "serialNumber":"serialNumber", - "vendorName":"vendorName", - "modelNumber":"modelNumber", - "unitType":"unitType", - "additionalFields": { - "attachmentPoint": "bla-bla-30-3", - "svlan": "1005", - "cvlan": "678" +[ + { + "event": { + "commonEventHeader": { + "sourceName": "NOK6061ZW1", + "nfNamingCode": "nfNamingCode" + }, + "pnfRegistrationFields": { + "serialNumber": "serialNumber", + "vendorName": "vendorName", + "modelNumber": "modelNumber", + "unitType": "unitType", + "additionalFields": { + "attachmentPoint": "bla-bla-30-3", + "svlan": "1005", + "cvlan": "678" + } } } } -}
\ No newline at end of file +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/ves-event-missing-field/invalid-ves-event.json b/tests/dcaegen2/prh-testcases/assets/ves-event-missing-field/invalid-ves-event.json index 52024d69..2bdc0570 100644 --- a/tests/dcaegen2/prh-testcases/assets/ves-event-missing-field/invalid-ves-event.json +++ b/tests/dcaegen2/prh-testcases/assets/ves-event-missing-field/invalid-ves-event.json @@ -1,16 +1,18 @@ -{ - "event": { - "commonEventHeader": { - "sourceName": "" - }, - "pnfRegistrationFields": { - "oamV4IpAddress": "10.18.123.236", - "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8a2a:0370:7334", - "serialNumber": "", - "vendorName": "", - "modelNumber": "", - "unitType": "", - "additionalFields": {} +[ + { + "event": { + "commonEventHeader": { + "sourceName": "" + }, + "pnfRegistrationFields": { + "oamV4IpAddress": "10.18.123.236", + "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8a2a:0370:7334", + "serialNumber": "", + "vendorName": "", + "modelNumber": "", + "unitType": "", + "additionalFields": {} + } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/ves-event-not-array/invalid-ves-event.json b/tests/dcaegen2/prh-testcases/assets/ves-event-not-array/invalid-ves-event.json index f6afb1d3..cc6502fd 100644 --- a/tests/dcaegen2/prh-testcases/assets/ves-event-not-array/invalid-ves-event.json +++ b/tests/dcaegen2/prh-testcases/assets/ves-event-not-array/invalid-ves-event.json @@ -9,7 +9,7 @@ "serialNumber":"NOkkaaa123", "vendorName":"equipVendor", "modelNumber":"equipModel", - "unitType":"equipType", + "unitType":"equipType" } } } diff --git a/tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/ves-event.json b/tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/ves-event.json index c67d863e..9f024983 100644 --- a/tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/ves-event.json +++ b/tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/ves-event.json @@ -1,40 +1,42 @@ -{ - "event": { - "commonEventHeader": { - "startEpochMicrosec": 1540212137393, - "sourceId": "val13", - "eventId": "registration_40212137", - "nfcNamingCode": "oam", - "internalHeaderFields": { - "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC" +[ + { + "event": { + "commonEventHeader": { + "startEpochMicrosec": 1540212137393, + "sourceId": "val13", + "eventId": "registration_40212137", + "nfcNamingCode": "oam", + "internalHeaderFields": { + "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC" + }, + "eventType": "pnfRegistration", + "priority": "Normal", + "version": "4.0.1", + "reportingEntityName": "NOK6061ZW9", + "sequence": 0, + "domain": "pnfRegistration", + "lastEpochMicrosec": 1540212137393, + "eventName": "pnfRegistration_Nokia_5gDu", + "vesEventListenerVersion": "7.0.1", + "sourceName": "NOK6061ZW9", + "nfNamingCode": "gNB" }, - "eventType": "pnfRegistration", - "priority": "Normal", - "version": "4.0.1", - "reportingEntityName": "NOK6061ZW9", - "sequence": 0, - "domain": "pnfRegistration", - "lastEpochMicrosec": 1540212137393, - "eventName": "pnfRegistration_Nokia_5gDu", - "vesEventListenerVersion": "7.0.1", - "sourceName": "NOK6061ZW9", - "nfNamingCode": "gNB" - }, - "pnfRegistrationFields": { - "unitType": "val8", - "serialNumber": "6061ZW9", - "pnfRegistrationFieldsVersion": "2.0", - "manufactureDate": "1540212137393", - "modelNumber": "val6", - "lastServiceDate": "1540212137393", - "unitFamily": "BBU", - "vendorName": "Nokia", - "oamV4IpAddress": "val3", - "oamV6IpAddress": "val4", - "softwareVersion": "val7", - "additionalFields": { - "attachmentPoint": "bbs-link" + "pnfRegistrationFields": { + "unitType": "val8", + "serialNumber": "6061ZW9", + "pnfRegistrationFieldsVersion": "2.0", + "manufactureDate": "1540212137393", + "modelNumber": "val6", + "lastServiceDate": "1540212137393", + "unitFamily": "BBU", + "vendorName": "Nokia", + "oamV4IpAddress": "val3", + "oamV6IpAddress": "val4", + "softwareVersion": "val7", + "additionalFields": { + "attachmentPoint": "bbs-link" + } } } } -} +] diff --git a/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-additional-fields/ves-event.json b/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-additional-fields/ves-event.json index 8fbfff32..b7e5af5e 100644 --- a/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-additional-fields/ves-event.json +++ b/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-additional-fields/ves-event.json @@ -1,39 +1,41 @@ -{ - "event": { - "commonEventHeader": { - "startEpochMicrosec": 1540212137393, - "sourceId": "val13", - "eventId": "registration_40212137", - "nfcNamingCode": "oam", - "internalHeaderFields": { - "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC" +[ + { + "event": { + "commonEventHeader": { + "startEpochMicrosec": 1540212137393, + "sourceId": "val13", + "eventId": "registration_40212137", + "nfcNamingCode": "oam", + "internalHeaderFields": { + "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC" + }, + "eventType": "pnfRegistration", + "priority": "Normal", + "version": "4.0.1", + "reportingEntityName": "NOK6061ZW8", + "sequence": 0, + "domain": "pnfRegistration", + "lastEpochMicrosec": 1540212137393, + "eventName": "pnfRegistration_Nokia_5gDu", + "vesEventListenerVersion": "7.0.1", + "sourceName": "NOK6061ZW8", + "nfNamingCode": "gNB" }, - "eventType": "pnfRegistration", - "priority": "Normal", - "version": "4.0.1", - "reportingEntityName": "NOK6061ZW8", - "sequence": 0, - "domain": "pnfRegistration", - "lastEpochMicrosec": 1540212137393, - "eventName": "pnfRegistration_Nokia_5gDu", - "vesEventListenerVersion": "7.0.1", - "sourceName": "NOK6061ZW8", - "nfNamingCode": "gNB" - }, - "pnfRegistrationFields": { - "unitType": "val8", - "serialNumber": "6061ZW9", - "pnfRegistrationFieldsVersion": "2.0", - "manufactureDate": "1540212137393", - "modelNumber": "val6", - "lastServiceDate": "1540212137393", - "unitFamily": "BBU", - "vendorName": "Nokia", - "oamV4IpAddress": "val3", - "oamV6IpAddress": "val4", - "softwareVersion": "val7", - "additionalFields": { + "pnfRegistrationFields": { + "unitType": "val8", + "serialNumber": "6061ZW9", + "pnfRegistrationFieldsVersion": "2.0", + "manufactureDate": "1540212137393", + "modelNumber": "val6", + "lastServiceDate": "1540212137393", + "unitFamily": "BBU", + "vendorName": "Nokia", + "oamV4IpAddress": "val3", + "oamV6IpAddress": "val4", + "softwareVersion": "val7", + "additionalFields": { + } } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-attachment-point/ves-event.json b/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-attachment-point/ves-event.json index d90869e3..c1b6dc2c 100644 --- a/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-attachment-point/ves-event.json +++ b/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-attachment-point/ves-event.json @@ -1,40 +1,42 @@ -{ - "event": { - "commonEventHeader": { - "startEpochMicrosec": 1540212137393, - "sourceId": "val13", - "eventId": "registration_40212137", - "nfcNamingCode": "oam", - "internalHeaderFields": { - "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC" +[ + { + "event": { + "commonEventHeader": { + "startEpochMicrosec": 1540212137393, + "sourceId": "val13", + "eventId": "registration_40212137", + "nfcNamingCode": "oam", + "internalHeaderFields": { + "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC" + }, + "eventType": "pnfRegistration", + "priority": "Normal", + "version": "4.0.1", + "reportingEntityName": "NOK6061ZW8", + "sequence": 0, + "domain": "pnfRegistration", + "lastEpochMicrosec": 1540212137393, + "eventName": "pnfRegistration_Nokia_5gDu", + "vesEventListenerVersion": "7.0.1", + "sourceName": "NOK6061ZW8", + "nfNamingCode": "gNB" }, - "eventType": "pnfRegistration", - "priority": "Normal", - "version": "4.0.1", - "reportingEntityName": "NOK6061ZW8", - "sequence": 0, - "domain": "pnfRegistration", - "lastEpochMicrosec": 1540212137393, - "eventName": "pnfRegistration_Nokia_5gDu", - "vesEventListenerVersion": "7.0.1", - "sourceName": "NOK6061ZW8", - "nfNamingCode": "gNB" - }, - "pnfRegistrationFields": { - "unitType": "val8", - "serialNumber": "6061ZW9", - "pnfRegistrationFieldsVersion": "2.0", - "manufactureDate": "1540212137393", - "modelNumber": "val6", - "lastServiceDate": "1540212137393", - "unitFamily": "BBU", - "vendorName": "Nokia", - "oamV4IpAddress": "val3", - "oamV6IpAddress": "val4", - "softwareVersion": "val7", - "additionalFields": { - "attachmentPoint": "" + "pnfRegistrationFields": { + "unitType": "val8", + "serialNumber": "6061ZW9", + "pnfRegistrationFieldsVersion": "2.0", + "manufactureDate": "1540212137393", + "modelNumber": "val6", + "lastServiceDate": "1540212137393", + "unitFamily": "BBU", + "vendorName": "Nokia", + "oamV4IpAddress": "val3", + "oamV6IpAddress": "val4", + "softwareVersion": "val7", + "additionalFields": { + "attachmentPoint": "" + } } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/assets/ves-event-without-additional-fields/ves-event.json b/tests/dcaegen2/prh-testcases/assets/ves-event-without-additional-fields/ves-event.json index d8f3c90c..10ce41c5 100644 --- a/tests/dcaegen2/prh-testcases/assets/ves-event-without-additional-fields/ves-event.json +++ b/tests/dcaegen2/prh-testcases/assets/ves-event-without-additional-fields/ves-event.json @@ -1,37 +1,39 @@ -{ - "event": { - "commonEventHeader": { - "startEpochMicrosec": 1540212137393, - "sourceId": "val13", - "eventId": "registration_40212137", - "nfcNamingCode": "oam", - "internalHeaderFields": { - "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC" +[ + { + "event": { + "commonEventHeader": { + "startEpochMicrosec": 1540212137393, + "sourceId": "val13", + "eventId": "registration_40212137", + "nfcNamingCode": "oam", + "internalHeaderFields": { + "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC" + }, + "eventType": "pnfRegistration", + "priority": "Normal", + "version": "4.0.1", + "reportingEntityName": "NOK6061ZW8", + "sequence": 0, + "domain": "pnfRegistration", + "lastEpochMicrosec": 1540212137393, + "eventName": "pnfRegistration_Nokia_5gDu", + "vesEventListenerVersion": "7.0.1", + "sourceName": "NOK6061ZW8", + "nfNamingCode": "gNB" }, - "eventType": "pnfRegistration", - "priority": "Normal", - "version": "4.0.1", - "reportingEntityName": "NOK6061ZW8", - "sequence": 0, - "domain": "pnfRegistration", - "lastEpochMicrosec": 1540212137393, - "eventName": "pnfRegistration_Nokia_5gDu", - "vesEventListenerVersion": "7.0.1", - "sourceName": "NOK6061ZW8", - "nfNamingCode": "gNB" - }, - "pnfRegistrationFields": { - "unitType": "val8", - "serialNumber": "6061ZW9", - "pnfRegistrationFieldsVersion": "2.0", - "manufactureDate": "1540212137393", - "modelNumber": "val6", - "lastServiceDate": "1540212137393", - "unitFamily": "BBU", - "vendorName": "Nokia", - "oamV4IpAddress": "val3", - "oamV6IpAddress": "val4", - "softwareVersion": "val7" + "pnfRegistrationFields": { + "unitType": "val8", + "serialNumber": "6061ZW9", + "pnfRegistrationFieldsVersion": "2.0", + "manufactureDate": "1540212137393", + "modelNumber": "val6", + "lastServiceDate": "1540212137393", + "unitFamily": "BBU", + "vendorName": "Nokia", + "oamV4IpAddress": "val3", + "oamV6IpAddress": "val4", + "softwareVersion": "val7" + } } } -} +]
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/prh_tests.robot b/tests/dcaegen2/prh-testcases/prh_tests.robot index b4666d10..4d4bf694 100644 --- a/tests/dcaegen2/prh-testcases/prh_tests.robot +++ b/tests/dcaegen2/prh-testcases/prh_tests.robot @@ -4,6 +4,7 @@ Documentation Integration tests for PRH. Suite Setup Run keywords Create Headers AND Create sessions AND Ensure Container Is Running prh AND Ensure Container Is Exited ssl_prh Suite Teardown Ensure Container Is Running ssl_prh Test Teardown Reset Simulators +Test Timeout 2 minutes Library resources/PrhLibrary.py Resource resources/prh_library.robot diff --git a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py index f6439be3..88aeb45c 100644 --- a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py +++ b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py @@ -24,16 +24,16 @@ class PrhLibrary(object): @staticmethod def create_invalid_notification(json_file): - json_to_python = json.loads(json_file) - correlation_id = PrhLibrary.extract_correlation_id_value(json_to_python, "correlationId") - ipv4 = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "oamV4IpAddress", "oamV4IpAddress") - ipv6 = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "oamV6IpAddress", "oamV6IpAddress") - serial_number = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "serialNumber", "serialNumber") - vendor_name = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "vendorName", "vendorName") - model_number = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "modelNumber", "modelNumber") - unit_type = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "unitType", "unitType") - - additional_fields = PrhLibrary.extract_additional_fields(json_to_python) + event = json.loads(json_file)[0] + correlation_id = PrhLibrary.extract_correlation_id_value(event, "correlationId") + ipv4 = PrhLibrary.extract_value_from_pnfRegistrationFields(event, "oamV4IpAddress", "oamV4IpAddress") + ipv6 = PrhLibrary.extract_value_from_pnfRegistrationFields(event, "oamV6IpAddress", "oamV6IpAddress") + serial_number = PrhLibrary.extract_value_from_pnfRegistrationFields(event, "serialNumber", "serialNumber") + vendor_name = PrhLibrary.extract_value_from_pnfRegistrationFields(event, "vendorName", "vendorName") + model_number = PrhLibrary.extract_value_from_pnfRegistrationFields(event, "modelNumber", "modelNumber") + unit_type = PrhLibrary.extract_value_from_pnfRegistrationFields(event, "unitType", "unitType") + + additional_fields = PrhLibrary.extract_additional_fields(event) str_json = '{' + correlation_id + ipv4 + ipv6 + serial_number + vendor_name + model_number + unit_type + '"nfNamingCode":""' + "," + '"softwareVersion":"",' + additional_fields return json.dumps(str_json).replace("\\", "")[1:-1].replace("\":", "\": ").rstrip(',') + '\\n}' diff --git a/tests/dcaegen2/prh-testcases/resources/prh_library.robot b/tests/dcaegen2/prh-testcases/resources/prh_library.robot index 663f2ea7..5680f2f4 100644 --- a/tests/dcaegen2/prh-testcases/resources/prh_library.robot +++ b/tests/dcaegen2/prh-testcases/resources/prh_library.robot @@ -33,7 +33,7 @@ Verify incorrect JSON event is logged [Arguments] ${test_case_directory} ${invalid_ves_event}= Get Data From File ${test_case_directory}/invalid-ves-event.json Set VES event in DMaaP ${invalid_ves_event} - Wait Until Keyword Succeeds 10x 3000ms Check PRH log |Element is neither JSON Object or Array + Wait Until Keyword Succeeds 10x 3000ms Check PRH log |com.google.gson.JsonSyntaxException: Expected a com.google.gson.JsonArray Verify missing AAI record is logged [Timeout] 100s |