diff options
author | Mariusz Wagner <mariusz.wagner@nokia.com> | 2019-04-08 08:26:32 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-04-08 08:26:32 +0000 |
commit | 6a5f3b7c00d298cceddf860764ed144f7daa9b20 (patch) | |
tree | 7ecbc07cc7db3a5b5a3a737c98c304534b3db5f8 /tests/dcaegen2/prh-testcases | |
parent | f0e481ee17ecb2b93a98130e2c7f2b669a8295bc (diff) | |
parent | 1bc046c0b0001392260257a4fa18de9d7a146683 (diff) |
Merge "Fix for PRH CSITs"
Diffstat (limited to 'tests/dcaegen2/prh-testcases')
-rw-r--r-- | tests/dcaegen2/prh-testcases/resources/PrhLibrary.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py index 0dd01dcb..597f8647 100644 --- a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py +++ b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py @@ -41,16 +41,10 @@ class PrhLibrary(object): def create_pnf_ready_notification_as_pnf_ready(json_file): json_to_python = json.loads(json_file) correlation_id = PrhLibrary.extract_correlation_id_value(json_to_python, "correlationId") - serial_number = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "serial-number", "serialNumber") - vendor_name = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "equip-vendor", "vendorName") - model_number = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "equip-model", "modelNumber") - unit_type = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "equip-type", "unitType") additional_fields = PrhLibrary.extract_additional_fields_value(json_to_python) - nf_role = json_to_python.get("event").get("commonEventHeader").get("nfNamingCode") if "nfNamingCode" in json_to_python["event"]["commonEventHeader"] else "" - - str_json = '{' + correlation_id + serial_number + vendor_name + model_number + unit_type + '"nf-role":"' + nf_role + '","sw-version":"",' + additional_fields + str_json = '{' + correlation_id + additional_fields return json.dumps(str_json.rstrip(',') + '}').replace("\\", "")[1:-1] |