aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorpaweldenst <pawel.denst@external.t-mobile.pl>2022-11-23 15:07:46 +0000
committerpaweldenst <pawel.denst@external.t-mobile.pl>2022-12-26 21:20:25 +0000
commit3a6c1f7f293956d6b0cff1593ca248b19e63334f (patch)
tree8ac77d3679374992fbf2da8d1182311fd28c2703 /tests
parent3f1416193789e00f6b09029c7e841d98803e5749 (diff)
Use the latest JSON Schema on ONAP data provider
Changes in samples Issue-ID: INT-2175 Signed-off-by: paweldenst <pawel.denst@external.t-mobile.pl> Change-Id: I79f21c3bdad9d1f0a5dcb8a6bbf759dc3f4c41ba
Diffstat (limited to 'tests')
-rw-r--r--tests/test-data-2-0-version.yaml48
-rw-r--r--tests/test_config_parser.py3
2 files changed, 51 insertions, 0 deletions
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