Align BBS-ep CSIT tests with latest code changes (DCAE-SDK upgrade) 48/102848/1
authorStavros Kanarakis <stavros.kanarakis@nokia.com>
Tue, 3 Mar 2020 11:47:45 +0000 (13:47 +0200)
committerStavros Kanarakis <stavros.kanarakis@nokia.com>
Tue, 3 Mar 2020 11:51:22 +0000 (13:51 +0200)
Issue-ID: DCAEGEN2-2105
Signed-off-by: Stavros Kanarakis <stavros.kanarakis@nokia.com>
Change-Id: I5d23ffff7e6c21bbd85eaa54147053d5d5893ec2

18 files changed:
tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_with_all_fields.json
tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_with_missing_new_old_state.json
tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_with_missing_rgmac.json
tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_with_missing_sourceName.json
tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_with_wrong_sourceName.json
tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_without_swversion.json
tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_malformed_json_format.json [new file with mode: 0644]
tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_not_json_format.json [deleted file]
tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_policy_with_all_fields.json
tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_event_with_all_fields.json
tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_event_with_missing_attachment.json
tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_event_with_missing_correlation.json
tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_event_with_wrong_correlation.json
tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_malformed_json_format.json [new file with mode: 0644]
tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_not_json_format.json [deleted file]
tests/dcaegen2-services-bbs-event-processor/bbs-testcases/bbs_tests.robot
tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/BbsLibrary.py
tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/docker-compose.yml

index 3ad1fec..d275850 100644 (file)
@@ -1,30 +1 @@
-{
-    "event": {
-        "commonEventHeader": {
-            "version": "4.0.1",
-            "eventName": "StateChange_cpe_authentication",
-            "domain": "stateChange",
-            "eventId": "ab305d54-85b4-a31b-7db2fb6b9e546015",
-            "eventType": "applicationNf",
-            "sourceId": "",
-            "sourceName": "NVendor-Equip_Model-SN1234",
-            "reportingEntityId": "",
-            "reportingEntityName": "thirdparty-sdnc-idfromesrrequest",
-            "priority": "Normal",
-            "startEpochMicrosec": 1.413378172e+15,
-            "lastEpochMicrosec": 1.413378172e+15,
-            "sequence": 0,
-           "vesEventListenerVersion": "7.1"
-        },
-        "stateChangeFields": {
-            "stateChangeFieldsVersion": 1,
-            "oldState": "outOfService",
-            "newState": "inService",
-            "stateInterface": "",
-            "additionalFields": {
-                "macAddress": "01:02:03:04:05:06",
-                "swVersion": "1.2.3"
-            }
-        }
-    }
-}
+["{\"event\":{\"commonEventHeader\":{\"version\":\"4.0.1\",\"eventName\":\"StateChange_cpe_authentication\",\"domain\":\"stateChange\",\"eventId\": \"ab305d54-85b4-a31b-7db2fb6b9e546015\",\"eventType\":\"applicationNf\",\"sourceId\":\"\",\"sourceName\":\"NVendor-Equip_Model-SN1234\",\"reportingEntityId\":\"\",\"reportingEntityName\":\"thirdparty-sdnc-idfromesrrequest\",\"priority\":\"Normal\",\"startEpochMicrosec\":1.413378172e+15,\"lastEpochMicrosec\":1.413378172e+15,\"sequence\":0,\"vesEventListenerVersion\":\"7.1\"},\"stateChangeFields\":{\"stateChangeFieldsVersion\":1,\"oldState\":\"outOfService\",\"newState\":\"inService\",\"stateInterface\":\"\",\"additionalFields\":{\"macAddress\":\"01:02:03:04:05:06\",\"swVersion\":\"1.2.3\"}}}}"]
\ No newline at end of file
index 2c14d46..da1313a 100644 (file)
@@ -1,29 +1 @@
-{
-    "event": {
-        "commonEventHeader": {
-            "version": "4.0.1",
-            "eventName": "StateChange_cpe_authentication",
-            "domain": "stateChange",
-            "eventId": "ab305d54-85b4-a31b-7db2fb6b9e546015",
-            "eventType": "applicationNf",
-            "sourceId": "",
-            "sourceName": "NVendor-Equip_Model-SN1234",
-            "reportingEntityId": "",
-            "reportingEntityName": "thirdparty-sdnc-idfromesrrequest",
-            "priority": "Normal",
-            "startEpochMicrosec": 1.413378172e+15,
-            "lastEpochMicrosec": 1.413378172e+15,
-            "sequence": 0,
-           "vesEventListenerVersion": "7.1"
-        },
-        "stateChangeFields": {
-            "stateChangeFieldsVersion": 1,
-            "oldState": "",
-            "newState": "",
-            "stateInterface": "",
-            "additionalFields": {
-                "macAddress": "01:02:03:04:05:06"
-            }
-        }
-    }
-}
\ No newline at end of file
+["{\"event\":{\"commonEventHeader\":{\"version\":\"4.0.1\",\"eventName\":\"StateChange_cpe_authentication\",\"domain\":\"stateChange\",\"eventId\": \"ab305d54-85b4-a31b-7db2fb6b9e546015\",\"eventType\":\"applicationNf\",\"sourceId\":\"\",\"sourceName\":\"NVendor-Equip_Model-SN1234\",\"reportingEntityId\":\"\",\"reportingEntityName\":\"thirdparty-sdnc-idfromesrrequest\",\"priority\":\"Normal\",\"startEpochMicrosec\":1.413378172e+15,\"lastEpochMicrosec\":1.413378172e+15,\"sequence\":0,\"vesEventListenerVersion\":\"7.1\"},\"stateChangeFields\":{\"stateChangeFieldsVersion\":1,\"oldState\":\"\",\"newState\":\"\",\"stateInterface\":\"\",\"additionalFields\":{\"macAddress\":\"01:02:03:04:05:06\",\"swVersion\":\"1.2.3\"}}}}"]
\ No newline at end of file
index 21d9725..817107d 100644 (file)
@@ -1,30 +1 @@
-{
-    "event": {
-        "commonEventHeader": {
-            "version": "4.0.1",
-            "eventName": "StateChange_cpe_authentication",
-            "domain": "stateChange",
-            "eventId": "ab305d54-85b4-a31b-7db2fb6b9e546015",
-            "eventType": "applicationNf",
-            "sourceId": "",
-            "sourceName": "NVendor-Equip_Model-SN1234",
-            "reportingEntityId": "",
-            "reportingEntityName": "thirdparty-sdnc-idfromesrrequest",
-            "priority": "Normal",
-            "startEpochMicrosec": 1.413378172e+15,
-            "lastEpochMicrosec": 1.413378172e+15,
-            "sequence": 0,
-           "vesEventListenerVersion": "7.1"
-        },
-        "stateChangeFields": {
-            "stateChangeFieldsVersion": 1,
-            "oldState": "outOfService",
-            "newState": "inService",
-            "stateInterface": "",
-            "additionalFields": {
-                "macAddress": "",
-                "swVersion": "1.2.3"
-            }
-        }
-    }
-}
+["{\"event\":{\"commonEventHeader\":{\"version\":\"4.0.1\",\"eventName\":\"StateChange_cpe_authentication\",\"domain\":\"stateChange\",\"eventId\": \"ab305d54-85b4-a31b-7db2fb6b9e546015\",\"eventType\":\"applicationNf\",\"sourceId\":\"\",\"sourceName\":\"NVendor-Equip_Model-SN1234\",\"reportingEntityId\":\"\",\"reportingEntityName\":\"thirdparty-sdnc-idfromesrrequest\",\"priority\":\"Normal\",\"startEpochMicrosec\":1.413378172e+15,\"lastEpochMicrosec\":1.413378172e+15,\"sequence\":0,\"vesEventListenerVersion\":\"7.1\"},\"stateChangeFields\":{\"stateChangeFieldsVersion\":1,\"oldState\":\"outOfService\",\"newState\":\"inService\",\"stateInterface\":\"\",\"additionalFields\":{\"macAddress\":\"\",\"swVersion\":\"1.2.3\"}}}}"]
\ No newline at end of file
index 538a56c..e1a6fe3 100644 (file)
@@ -1,30 +1 @@
-{
-    "event": {
-        "commonEventHeader": {
-            "version": "4.0.1",
-            "eventName": "StateChange_cpe_authentication",
-            "domain": "stateChange",
-            "eventId": "ab305d54-85b4-a31b-7db2fb6b9e546015",
-            "eventType": "applicationNf",
-            "sourceId": "",
-            "sourceName": "",
-            "reportingEntityId": "",
-            "reportingEntityName": "thirdparty-sdnc-idfromesrrequest",
-            "priority": "Normal",
-            "startEpochMicrosec": 1.413378172e+15,
-            "lastEpochMicrosec": 1.413378172e+15,
-            "sequence": 0,
-           "vesEventListenerVersion": "7.1"
-        },
-        "stateChangeFields": {
-            "stateChangeFieldsVersion": 1,
-            "oldState": "outOfService",
-            "newState": "inService",
-            "stateInterface": "",
-            "additionalFields": {
-                "macAddress": "01:02:03:04:05:06",
-                "swVersion": "1.2.3"
-            }
-        }
-    }
-}
+["{\"event\":{\"commonEventHeader\":{\"version\":\"4.0.1\",\"eventName\":\"StateChange_cpe_authentication\",\"domain\":\"stateChange\",\"eventId\": \"ab305d54-85b4-a31b-7db2fb6b9e546015\",\"eventType\":\"applicationNf\",\"sourceId\":\"\",\"sourceName\":\"\",\"reportingEntityId\":\"\",\"reportingEntityName\":\"thirdparty-sdnc-idfromesrrequest\",\"priority\":\"Normal\",\"startEpochMicrosec\":1.413378172e+15,\"lastEpochMicrosec\":1.413378172e+15,\"sequence\":0,\"vesEventListenerVersion\":\"7.1\"},\"stateChangeFields\":{\"stateChangeFieldsVersion\":1,\"oldState\":\"outOfService\",\"newState\":\"inService\",\"stateInterface\":\"\",\"additionalFields\":{\"macAddress\":\"01:02:03:04:05:06\",\"swVersion\":\"1.2.3\"}}}}"]
\ No newline at end of file
index 39a9e4a..ffe031e 100644 (file)
@@ -1,30 +1 @@
-{
-    "event": {
-        "commonEventHeader": {
-            "version": "4.0.1",
-            "eventName": "StateChange_cpe_authentication",
-            "domain": "stateChange",
-            "eventId": "ab305d54-85b4-a31b-7db2fb6b9e546015",
-            "eventType": "applicationNf",
-            "sourceId": "",
-            "sourceName": "Wrong-PNF-Name",
-            "reportingEntityId": "",
-            "reportingEntityName": "thirdparty-sdnc-idfromesrrequest",
-            "priority": "Normal",
-            "startEpochMicrosec": 1.413378172e+15,
-            "lastEpochMicrosec": 1.413378172e+15,
-            "sequence": 0,
-           "vesEventListenerVersion": "7.1"
-        },
-        "stateChangeFields": {
-            "stateChangeFieldsVersion": 1,
-            "oldState": "outOfService",
-            "newState": "inService",
-            "stateInterface": "",
-            "additionalFields": {
-                "macAddress": "01:02:03:04:05:06",
-                "swVersion": "1.2.3"
-            }
-        }
-    }
-}
+["{\"event\":{\"commonEventHeader\":{\"version\":\"4.0.1\",\"eventName\":\"StateChange_cpe_authentication\",\"domain\":\"stateChange\",\"eventId\": \"ab305d54-85b4-a31b-7db2fb6b9e546015\",\"eventType\":\"applicationNf\",\"sourceId\":\"\",\"sourceName\":\"Wrong-PNF-Name\",\"reportingEntityId\":\"\",\"reportingEntityName\":\"thirdparty-sdnc-idfromesrrequest\",\"priority\":\"Normal\",\"startEpochMicrosec\":1.413378172e+15,\"lastEpochMicrosec\":1.413378172e+15,\"sequence\":0,\"vesEventListenerVersion\":\"7.1\"},\"stateChangeFields\":{\"stateChangeFieldsVersion\":1,\"oldState\":\"outOfService\",\"newState\":\"inService\",\"stateInterface\":\"\",\"additionalFields\":{\"macAddress\":\"01:02:03:04:05:06\",\"swVersion\":\"1.2.3\"}}}}"]
\ No newline at end of file
index fcacf1c..f50ed5c 100644 (file)
@@ -1,16 +1 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "sourceName":"NVendor-Equip_Model-SN1234"
-    },
-    "stateChangeFields": {
-      "stateChangeFieldsVersion": 1,
-      "newState": "inService",
-      "oldState": "outOfService",
-      "stateInterface": "",
-      "additionalFields": {
-          "macAddress": "00:11:22:33:44:55"
-      }
-    }
-  }
-}
+["{\"event\":{\"commonEventHeader\":{\"version\":\"4.0.1\",\"eventName\":\"StateChange_cpe_authentication\",\"domain\":\"stateChange\",\"eventId\": \"ab305d54-85b4-a31b-7db2fb6b9e546015\",\"eventType\":\"applicationNf\",\"sourceId\":\"\",\"sourceName\":\"NVendor-Equip_Model-SN1234\",\"reportingEntityId\":\"\",\"reportingEntityName\":\"thirdparty-sdnc-idfromesrrequest\",\"priority\":\"Normal\",\"startEpochMicrosec\":1.413378172e+15,\"lastEpochMicrosec\":1.413378172e+15,\"sequence\":0,\"vesEventListenerVersion\":\"7.1\"},\"stateChangeFields\":{\"stateChangeFieldsVersion\":1,\"oldState\":\"outOfService\",\"newState\":\"inService\",\"stateInterface\":\"\",\"additionalFields\":{\"macAddress\":\"01:02:03:04:05:06\"}}}}"]
diff --git a/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_malformed_json_format.json b/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_malformed_json_format.json
new file mode 100644 (file)
index 0000000..fba0214
--- /dev/null
@@ -0,0 +1 @@
+["{\"event\":{\"commonEventHeader\":{\"version\":\"4.0.1\",\"eventName\":\"StateChange_cpe_authentication\",\"domain\":\"stateChange\",\"eventId\": \"ab305d54-85b4-a31b-7db2fb6b9e546015\",\"eventType\":\"applicationNf\",\"sourceId\":\"\",\"sourceName\":\"NVendor-Equip_Model-SN1234\",\"reportingEntityId\":\"\",\"reportingEntityName\":\"thirdparty-sdnc-idfromesrrequest\",\"priority\":\"Normal\",\"startEpochMicrosec\":1.413378172e+15,\"lastEpochMicrosec\":1.413378172e+15,\"sequence\":0,\"vesEventListenerVersion\":\"7.1\"},\"stateChangeFields\":{\"stateChangeFieldsVersion\":1,\"oldState\":\"outOfService\",\"newState\":\"inService\",\"stateInterface\":\"\",\"additionalFields\":{\"macAddress\":\"01:02:03:04:05:06\",\"swVersion\":\"1.2.3\",}}}}"]
\ No newline at end of file
diff --git a/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_not_json_format.json b/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_not_json_format.json
deleted file mode 100644 (file)
index 7801ad6..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-{
-    "event": {
-        "commonEventHeader": {
-            "version": "4.0.1",
-            "eventName": "StateChange_cpe_authentication",
-            "domain": "stateChange",
-            "eventId": "ab305d54-85b4-a31b-7db2fb6b9e546015",
-            "eventType": "applicationNf",
-            "sourceId": "",
-            "sourceName": "NVendor-Equip_Model-SN1234pnf-11",
-            "reportingEntityId": "",
-            "reportingEntityName": "thirdparty-sdnc-idfromesrrequest",
-            "priority": "Normal",
-            "startEpochMicrosec": 1.413378172e+15,
-            "lastEpochMicrosec": 1.413378172e+15,
-            "sequence": 0,
-           "vesEventListenerVersion": "7.1"
-        },
-        "stateChangeFields": {
-            "stateChangeFieldsVersion": 1,
-            "oldState": "outOfService",
-            "newState": "inService",
-            "stateInterface": "",
-            "additionalFields": {
-                "macAddress": "01:02:03:04:05:06",
-                "swVersion": "1.2.3",
-            }
-        }
-    }
-}
index 6fe2319..c70a368 100644 (file)
@@ -1,16 +1 @@
-{
- "nf-role":"role",
- "equip-type":"Equipment-Type-1",
- "equip-vendor":"NVendor",
- "equip-model":"Equip_Model",
- "serial-number":"SN1234",
- "sw-version":"SW-version-1",
- "correlationId":"NVendor-Equip_Model-SN1234",
-   "additionalFields": {
-     "attachment-point": "olt1-1-1",
-     "cvlan": "1005",
-     "svlan": "100",
-     "remote-id": "some-remote-id"
-   }
- }
\ No newline at end of file
+["{\"nf-role\":\"role\",\"equip-type\":\"Equipment-Type-1\",\"equip-vendor\":\"NVendor\",\"equip-model\":\"Equip_Model\",\"serial-number\":\"SN1234\",\"sw-version\":\"SW-version-1\",\"correlationId\":\"NVendor-Equip_Model-SN1234\",\"additionalFields\":{\"attachment-point\":\"olt1-1-1\",\"cvlan\":\"1005\",\"svlan\":\"100\",\"remote-id\":\"some-remote-id\"}}"]
\ No newline at end of file
index 43d1b21..e5941d1 100644 (file)
@@ -1,15 +1 @@
-{
- "nf-role":"role",
- "equip-type":"Equipment-Type-1",
- "equip-vendor":"NVendor",
- "equip-model":"Equip_Model",
- "serial-number":"SN1234",
- "sw-version":"SW-version-1",
- "correlationId":"NVendor-Equip_Model-SN1234",
-   "additionalFields": {
-     "attachment-point": "",
-     "cvlan": "1005",
-     "svlan": "100",
-     "remote-id": "some-remote-id"
-   }
- }
+["{\"nf-role\":\"role\",\"equip-type\":\"Equipment-Type-1\",\"equip-vendor\":\"NVendor\",\"equip-model\":\"Equip_Model\",\"serial-number\":\"SN1234\",\"sw-version\":\"SW-version-1\",\"correlationId\":\"NVendor-Equip_Model-SN1234\",\"additionalFields\":{\"attachment-point\":\"\",\"cvlan\":\"1005\",\"svlan\":\"100\",\"remote-id\":\"some-remote-id\"}}"]
\ No newline at end of file
index a1aaee3..da00b16 100644 (file)
@@ -1,15 +1 @@
-{
- "nf-role":"role",
- "equip-type":"Equipment-Type-1",
- "equip-vendor":"Vendor",
- "equip-model":"Equip_Model",
- "serial-number":"SN1234",
- "sw-version":"SW-version-1",
- "correlationId":"",
-   "additionalFields": {
-     "attachment-point": "olt1-1-1",
-     "cvlan": "1005",
-     "svlan": "100",
-     "remote-id": "some-remote-id"
-   }
- }
+["{\"nf-role\":\"role\",\"equip-type\":\"Equipment-Type-1\",\"equip-vendor\":\"NVendor\",\"equip-model\":\"Equip_Model\",\"serial-number\":\"SN1234\",\"sw-version\":\"SW-version-1\",\"correlationId\":\"\",\"additionalFields\":{\"attachment-point\":\"olt1-1-1\",\"cvlan\":\"1005\",\"svlan\":\"100\",\"remote-id\":\"some-remote-id\"}}"]
\ No newline at end of file
index f1dca03..2981c9d 100644 (file)
@@ -1,15 +1 @@
-{
- "nf-role":"role",
- "equip-type":"Equipment-Type-1",
- "equip-vendor":"NVendor",
- "equip-model":"Equip_Model",
- "serial-number":"SN1234",
- "sw-version":"SW-version-1",
- "correlationId":"Wrong-Correlation-Id",
-   "additionalFields": {
-     "attachment-point": "olt1-1-1",
-     "cvlan": "1005",
-     "svlan": "100",
-     "remote-id": "some-remote-id"
-   }
- }
+["{\"nf-role\":\"role\",\"equip-type\":\"Equipment-Type-1\",\"equip-vendor\":\"NVendor\",\"equip-model\":\"Equip_Model\",\"serial-number\":\"SN1234\",\"sw-version\":\"SW-version-1\",\"correlationId\":\"Wrong-Correlation-Id\",\"additionalFields\":{\"attachment-point\":\"olt1-1-1\",\"cvlan\":\"1005\",\"svlan\":\"100\",\"remote-id\":\"some-remote-id\"}}"]
\ No newline at end of file
diff --git a/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_malformed_json_format.json b/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_malformed_json_format.json
new file mode 100644 (file)
index 0000000..efb5cff
--- /dev/null
@@ -0,0 +1 @@
+["{\"nf-role\":\"role\",\"equip-type\":\"Equipment-Type-1\",\"equip-vendor\":\"NVendor\",\"equip-model\":\"Equip_Model\",\"serial-number\":\"SN1234\",\"sw-version\":\"SW-version-1\",\"correlationId\":\"NVendor-Equip_Model-SN1234\",\"additionalFields\":{\"attachment-point\":\"olt1-1-1\",\"cvlan\":\"1005\",\"svlan\":\"100\",\"remote-id\":\"some-remote-id\",}}"]
\ No newline at end of file
diff --git a/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_not_json_format.json b/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_not_json_format.json
deleted file mode 100644 (file)
index ab5b214..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "nf-role":"role",
- "equip-type":"Equipment-Type-1",
- "equip-vendor":"NVendor",
- "equip-model":"Equip_Model",
- "serial-number":"SN1234",
- "sw-version":"SW-version-1",
- "correlationId":"NVendor-Equip_Model-SN1234",
-   "additionalFields": {
-     "attachment-point": "olt1-1-1",
-     "cvlan": "1005",
-     "svlan": "100",
-     "remote-id": "some-remote-id",
-   }
- }
index a0db4b2..c60ffe6 100644 (file)
@@ -14,16 +14,15 @@ ${AAI_SIMULATOR_SETUP_URL}    http://${AAI_SIMULATOR_SETUP}
 ${AUTH_EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}    %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_with_all_fields.json
 ${AUTH_EVENT_WITH_WRONG_SOURCENAME}    %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_with_wrong_sourceName.json
 ${AUTH_EVENT_WITHOUT_SWVERSION}    %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_without_swversion.json
-${AUTH_EVENT_WITH_MISSING_RGMAC}    %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_with_missing_rgmac.json
 ${AUTH_EVENT_WITH_MISSING_STATE}    %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_with_missing_new_old_state.json
 ${AUTH_EVENT_WITH_MISSING_SOURCENAME}    %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_with_missing_sourceName.json
-${AUTH_NOT_JSON_FORMAT}    %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_not_json_format.json
+${AUTH_MALFORMED_JSON_FORMAT}    %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_malformed_json_format.json
 ${AUTH_POLICY}    %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_policy_with_all_fields.json
 ${UPDATE_EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}    %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_event_with_all_fields.json
 ${UPDATE_EVENT_WITH_WRONG_CORRELATION}    %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_event_with_wrong_correlation.json
 ${UPDATE_EVENT_WITH_MISSING_ATTACHMENT}    %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_event_with_missing_attachment.json
 ${UPDATE_EVENT_WITH_MISSING_CORRELATION}    %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_event_with_missing_correlation.json
-${UPDATE_NOT_JSON_FORMAT}    %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_not_json_format.json
+${UPDATE_MALFORMED_JSON_FORMAT}    %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_malformed_json_format.json
 ${UPDATE_POLICY}    %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_policy_with_all_fields.json
 ${AAI_PNFS}    %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/aai_records/aai_pnfs.json
 ${AAI_SERVICES}    %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/aai_records/aai_services.json
@@ -37,12 +36,6 @@ Valid DMaaP CPE_AUTHENTICATION event can trigger Policy
     ${AUTH_EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
     ${AUTH_EVENT_WITHOUT_SWVERSION}
 
-Invalid DMaaP CPE_AUTHENTICATION event RG MAC cannot trigger Policy
-    [Documentation]    BBS get invalid RG MAC CPE_AUTHENTICATION event from DMaaP with missing required fields - BBS does not trigger Policy
-    [Tags]    BBS    Invalid RG MAC CPE_AUTHENTICATION event
-    [Template]    Invalid rgmac auth event processing
-    ${AUTH_EVENT_WITH_MISSING_RGMAC}
-
 Invalid DMaaP CPE_AUTHENTICATION event cannot trigger Policy
     [Documentation]    BBS get invalid CPE_AUTHENTICATION event from DMaaP with missing required fields - BBS does not trigger Policy
     [Tags]    BBS    Invalid CPE_AUTHENTICATION event
@@ -58,23 +51,23 @@ Get valid CPE_AUTHENTICATION event from DMaaP and PNF record in AAI does not exi
     Set event in DMaaP    ${data}
     Wait Until Keyword Succeeds    20x    2000ms    Check BBS log    Error while retrieving PNF: A&AI Request for (/aai/v14/network/pnfs/pnf/Wrong-PNF-Name?depth=all)
 
-CPE_AUTHENTICATION Event in DMaaP is not JSON format
-    [Documentation]    BBS CPE_AUTHENTICATION not JSON format event from DMaaP - BBS does not Trigger Policy
+CPE_AUTHENTICATION Event in DMaaP has malformed JSON format
+    [Documentation]    BBS CPE_AUTHENTICATION has malformed JSON format event from DMaaP - BBS does not Trigger Policy
     [Tags]    BBS
-    ${data}=    Get Data From File    ${AUTH_NOT_JSON_FORMAT}
+    ${data}=    Get Data From File    ${AUTH_MALFORMED_JSON_FORMAT}
     Set event in DMaaP    ${data}
-    Wait Until Keyword Succeeds    20x    2000ms    Check BBS log    DMaaP Consumption Exception: Not a JSON Array:
+    Wait Until Keyword Succeeds    20x    2000ms    Check BBS log    DMaaP Consumer error: com.google.gson.stream.MalformedJsonException
 
-# Get valid CPE_AUTHENTICATION event from DMaaP and AAI is not responding
-#     [Documentation]    BBS get valid CPE_AUTHENTICATION event from DMaaP with all required fields and AAI is not responding - BBS does not trigger Policy
-#     [Tags]    BBS    AAI    Uses containers
-#     [Timeout]    180s
-#     ${data}=    Get Data From File    ${AUTH_EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
-#     Ensure Container Is Exited   aai_simulator
-#     Set event in DMaaP    ${data}
-#     Wait Until Keyword Succeeds    20x    2000ms    Check BBS log    Error while retrieving PNF: aai_simulator: Try again
-#     Ensure Container Is Running  aai_simulator
-#     Set AAI Records
+    # Get valid CPE_AUTHENTICATION event from DMaaP and AAI is not responding
+    #     [Documentation]    BBS get valid CPE_AUTHENTICATION event from DMaaP with all required fields and AAI is not responding - BBS does not trigger Policy
+    #     [Tags]    BBS    AAI    Uses containers
+    #     [Timeout]    180s
+    #     ${data}=    Get Data From File    ${AUTH_EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
+    #     Ensure Container Is Exited   aai_simulator
+    #     Set event in DMaaP    ${data}
+    #     Wait Until Keyword Succeeds    20x    2000ms    Check BBS log    Error while retrieving PNF: aai_simulator: Try again
+    #     Ensure Container Is Running  aai_simulator
+    #     Set AAI Records
 
 Valid DMaaP PNF_UPDATE event can trigger Policy
     [Documentation]    BBS get valid PNF_UPDATE event from DMaaP with required fields - BBS triggers Policy
@@ -98,20 +91,20 @@ Get valid PNF_UPDATE event from DMaaP and PNF record in AAI does not exist
     Wait Until Keyword Succeeds    20x    2000ms    Check BBS log    Error while retrieving PNF: A&AI Request for (/aai/v14/network/pnfs/pnf/Wrong-Correlation-Id?depth=all)
 
 
-PNF_UPDATE Event in DMaaP is not JSON format
-    [Documentation]    BBS PNF_UPDATE not JSON format event from DMaaP - BBS does not Trigger Policy
+PNF_UPDATE Event in DMaaP has malformed JSON format
+    [Documentation]    BBS PNF_UPDATE has malformed JSON format event from DMaaP - BBS does not Trigger Policy
     [Tags]    BBS
-    ${data}=    Get Data From File    ${UPDATE_NOT_JSON_FORMAT}
+    ${data}=    Get Data From File    ${UPDATE_MALFORMED_JSON_FORMAT}
     Set event in DMaaP    ${data}
-    Wait Until Keyword Succeeds    20x    2000ms    Check BBS log    DMaaP Consumption Exception: Not a JSON Array:
+    Wait Until Keyword Succeeds    20x    2000ms    Check BBS log    DMaaP Consumer error: com.google.gson.stream.MalformedJsonException
 
-# Get valid PNF_UPDATE event from DMaaP and AAI is not responding
-#     [Documentation]    BBS get valid PNF_UPDATE event from DMaaP with all required fields and AAI is not responding - BBS does not trigger Policy
-#     [Tags]    BBS    AAI    Uses containers
-#     [Timeout]    180s
-#     ${data}=    Get Data From File    ${UPDATE_EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
-#     Ensure Container Is Exited   aai_simulator
-#     Set event in DMaaP    ${data}
-#     Wait Until Keyword Succeeds    20x    2000ms    Check BBS log    Error while retrieving PNF: aai_simulator: Try again
-#     Ensure Container Is Running  aai_simulator
-#     Set AAI Records
+    # Get valid PNF_UPDATE event from DMaaP and AAI is not responding
+    #     [Documentation]    BBS get valid PNF_UPDATE event from DMaaP with all required fields and AAI is not responding - BBS does not trigger Policy
+    #     [Tags]    BBS    AAI    Uses containers
+    #     [Timeout]    180s
+    #     ${data}=    Get Data From File    ${UPDATE_EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
+    #     Ensure Container Is Exited   aai_simulator
+    #     Set event in DMaaP    ${data}
+    #     Wait Until Keyword Succeeds    20x    2000ms    Check BBS log    Error while retrieving PNF: aai_simulator: Try again
+    #     Ensure Container Is Running  aai_simulator
+    #     Set AAI Records
index 8dbdc5a..c58e67e 100644 (file)
@@ -40,7 +40,8 @@ class BbsLibrary(object):
         Get the correlationId, oldState, newState, stateInterface, macAddress, swVersion elements
         from the invalid message and place the elements into a JSON object (string) as fields for comparision
         """
-        json_to_python = json.loads(json_file)
+        eventString = json.loads(json_file)[0]
+        json_to_python = json.loads(eventString.replace("\\", ""))
         correlation_id = json_to_python.get("event").get("commonEventHeader").get("sourceName")
         oldState = json_to_python.get("event").get("stateChangeFields").get("oldState")
         newState = json_to_python.get("event").get("stateChangeFields").get("newState")
@@ -73,7 +74,8 @@ class BbsLibrary(object):
         Get the correlationId, attachment-point, remote-id, cvlan, svlan, elements
         from the invalid message and place the elements into a JSON object (string) as fields for comparision
         """
-        json_to_python = json.loads(json_file)
+        eventString = json.loads(json_file)[0]
+        json_to_python = json.loads(eventString.replace("\\", ""))
         correlation_id = json_to_python.get("correlationId")
         attachmentPoint = json_to_python.get("additionalFields").get("attachment-point")
         remoteId = json_to_python.get("additionalFields").get("remote-id")
@@ -109,7 +111,7 @@ class BbsLibrary(object):
             python_dmaap_policy = ""
 
         try:
-            d_policy = python_dmaap_policy.get("policyName")
+            d_policy = python_dmaap_policy[0].get("policyName")
         except:
             d_policy = ""
 
index f210272..b24006d 100644 (file)
@@ -1,7 +1,7 @@
 version: '3'
 services:
   bbs:
-    image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.bbs-event-processor:1.0.0
+    image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.bbs-event-processor:latest
     command: >
         --dmaap.dmaapConsumerConfiguration.dmaapHostName=dmaap_simulator
         --dmaap.dmaapConsumerConfiguration.dmaapPortNumber=2222
@@ -36,6 +36,10 @@ services:
       CONFIGS_APPLICATION_CPE-AUTHENTICATION_POLICYSCOPE: "cpe-auth_policy_scope"
       CONFIGS_APPLICATION_CPE-AUTHENTICATION_CLCONTROLNAME: "cpe-auth_cl"
       LOGGING_LEVEL_ORG_ONAP_BBS: TRACE
+      CONFIGS_SECURITY_TRUSTSTOREPATH: KeyStore.jks
+      CONFIGS_SECURITY_TRUSTSTOREPASSWORDPATH: KeyStorePass.txt
+      CONFIGS_SECURITY_KEYSTOREPATH: KeyStore.jks
+      CONFIGS_SECURITY_KEYSTOREPASSWORDPATH: KeyStorePass.txt
     container_name: bbs
     depends_on:
      - dmaap-bc