From 3a6c1f7f293956d6b0cff1593ca248b19e63334f Mon Sep 17 00:00:00 2001 From: paweldenst Date: Wed, 23 Nov 2022 15:07:46 +0000 Subject: Use the latest JSON Schema on ONAP data provider Changes in samples Issue-ID: INT-2175 Signed-off-by: paweldenst Change-Id: I79f21c3bdad9d1f0a5dcb8a6bbf759dc3f4c41ba --- tests/test-data-2-0-version.yaml | 48 ++++++++++++++++++++++++++++++++++++++++ tests/test_config_parser.py | 3 +++ 2 files changed, 51 insertions(+) create mode 100644 tests/test-data-2-0-version.yaml (limited to 'tests') diff --git a/tests/test-data-2-0-version.yaml b/tests/test-data-2-0-version.yaml new file mode 100644 index 0000000..7e42791 --- /dev/null +++ b/tests/test-data-2-0-version.yaml @@ -0,0 +1,48 @@ +odpSchemaVersion: 2.0 +resources: + complexes: + - complex: + data-center-code: AMICPL1 + complex-name: AMIST-COMPLEX-1 + physical-location-id: &complex_id AMIST-COMPLEX-1 + physical-location-type: Office + street1: '505' + street2: Terry Fox Drive + city: Kanata + state: Ontario + postal-code: A1A1A1 + region: Eastern + country: Canada + + cloud-regions: + - cloud-region: + cloud-owner: &clown AMIST + cloud-region-id: AMCR1 + cloud-region-version: '11.0' + orchestration-disabled: true + in-maint: false + complex: + physical-location-id: *complex_id + tenants: + - tenant-id: !join ['-', [*clown, 'TENANT', 1]] + tenant-name: AMIST-TENANT-1-NAME + - tenant-id: !join [*clown, '-', 'TENANT', '-', 2] + tenant-name: AMIST-TENANT-2-NAME + availability-zones: + - cloud-owner: *clown + availability-zone-name: AMIST-AZ-1 + hypervisor-type: OpenStackAmd + + customers: + - customer: + global-customer-id: AMIST-CUST-11 + subscriber-name: AAIIST-TESTER-11 + subscriber-type: Customer + service-subscriptions: + - service-type: amist-voip + - customer: + global-customer-id: AMIST-CUST-12 + subscriber-name: AAIIST-TESTER-12 + subscriber-type: Customer + service-subscriptions: + - service-type: amist-voip diff --git a/tests/test_config_parser.py b/tests/test_config_parser.py index d7eaa4d..ace2361 100644 --- a/tests/test_config_parser.py +++ b/tests/test_config_parser.py @@ -63,3 +63,6 @@ def test_config_parser_versioning(): [parsed_objects[1].data['cloud-owner'], 'TENANT', '1']) assert parsed_objects[1].data['tenants'][1]['tenant-id'] == ''.join( [parsed_objects[1].data['cloud-owner'], '-', 'TENANT', '-', '2']) + + parser = ConfigParser([Path("tests/test-data-2-0-version.yaml")]) + assert parser.configs[0].version.value.version_number == "2.0" \ No newline at end of file -- cgit 1.2.3-korg