aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dcaegen2/prh-testcases/resources
diff options
context:
space:
mode:
authorpwielebs <piotr.wielebski@nokia.com>2019-02-11 15:43:22 +0100
committerMarcin Migdal <marcin.migdal@nokia.com>2019-02-12 15:33:48 +0100
commit06088373765b46d627935673040bb3daa80d6e64 (patch)
treeb517e90ed0150dcafcee46129e43c301dc5982dc /tests/dcaegen2/prh-testcases/resources
parent82cfab5df9a39c83b3c92527885f853a0bd8ad99 (diff)
Add new json events to PRH CSIT
Change-Id: I0d09bc1d8abd686145d82694e9fc367bc486206d Issue-ID: INT-871 Signed-off-by: pwielebs <piotr.wielebski@nokia.com>
Diffstat (limited to 'tests/dcaegen2/prh-testcases/resources')
-rw-r--r--tests/dcaegen2/prh-testcases/resources/PrhLibrary.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
index dc589369..d413be58 100644
--- a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
+++ b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
@@ -24,8 +24,14 @@ class PrhLibrary(object):
json_to_python = json.loads(json_file)
ipv4 = json_to_python.get("event").get("pnfRegistrationFields").get("oamV4IpAddress")
ipv6 = json_to_python.get("event").get("pnfRegistrationFields").get("oamV6IpAddress") if "oamV6IpAddress" in json_to_python["event"]["pnfRegistrationFields"] else ""
+ serial_number = json_to_python.get("event").get("pnfRegistrationFields").get("serial-number") if "serial-number" in json_to_python["event"]["pnfRegistrationFields"] else ""
+ equip_vendor = json_to_python.get("event").get("pnfRegistrationFields").get("equip-vendor") if "equip-vendor" in json_to_python["event"]["pnfRegistrationFields"] else ""
+ equip_model = json_to_python.get("event").get("pnfRegistrationFields").get("equip-model") if "equip-model" in json_to_python["event"]["pnfRegistrationFields"] else ""
+ equip_type = json_to_python.get("event").get("pnfRegistrationFields").get("equip-type") if "equip-type" in json_to_python["event"]["pnfRegistrationFields"] else ""
+ nf_role = json_to_python.get("event").get("pnfRegistrationFields").get("nf-role") if "nf-role" in json_to_python["event"]["pnfRegistrationFields"] else ""
+ sw_version = json_to_python.get("event").get("pnfRegistrationFields").get("sw-version") if "sw-version" in json_to_python["event"]["pnfRegistrationFields"] else ""
correlation_id = json_to_python.get("event").get("commonEventHeader").get("sourceName")
- str_json = '{"correlationId":"' + correlation_id + '","ipaddress-v4-oam":"' + ipv4 + '","ipaddress-v6-oam":"' + ipv6 + '"}'
+ str_json = '{"correlationId":"' + correlation_id + '","ipaddress-v4-oam":"' + ipv4 + '","ipaddress-v6-oam":"' + ipv6 + '","serial-number":"' + serial_number + '","equip-vendor":"' + equip_vendor + '","equip-model":"' + equip_model + '","equip-type":"' + equip_type + '","nf-role":"' + nf_role + '","sw-version":"' + sw_version + '"}'
python_to_json = json.dumps(str_json)
return python_to_json.replace("\\", "")[1:-1]