2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2024 Ericsson
4 * Modifications Copyright (C) 2024-2025 OpenInfra Foundation Europe
5 * ================================================================================
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 * SPDX-License-Identifier: Apache-2.0
19 * ============LICENSE_END=========================================================
21 package contracts.decorators
23 import org.springframework.cloud.contract.spec.Contract
27 description "SUCCESS - 200: Get decorators using getTopologyByEntityTypeName - EQUALS"
30 url "/topology-inventory/v1alpha11/domains/RAN/entity-types/ODUFunction/entities?offset=0&limit=500&targetFilter=/decorators&scopeFilter=/decorators[@test-app-module:textdata = 'Stockholm']"
35 contentType('application/json')
40 "o-ran-smo-teiv-ran:ODUFunction": [
43 "test-app-module:textdata": "Stockholm",
44 "test-app-module:intdata": 456
46 "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=13,ODUFunction=13"
51 "o-ran-smo-teiv-ran:ODUFunction": [
54 "test-app-module:textdata": "Stockholm",
55 "test-app-module:intdata": 123
57 "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=14,ODUFunction=14"
62 "o-ran-smo-teiv-ran:ODUFunction": [
65 "test-app-module:textdata": "Stockholm",
66 "test-app-module:intdata": 123
68 "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=16,ODUFunction=16"
74 "href": "/domains/RAN/entity-types/ODUFunction/entities?offset=0&limit=500&targetFilter=/decorators&scopeFilter=/decorators[@test-app-module:textdata = 'Stockholm']"
77 "href": "/domains/RAN/entity-types/ODUFunction/entities?offset=0&limit=500&targetFilter=/decorators&scopeFilter=/decorators[@test-app-module:textdata = 'Stockholm']"
80 "href": "/domains/RAN/entity-types/ODUFunction/entities?offset=0&limit=500&targetFilter=/decorators&scopeFilter=/decorators[@test-app-module:textdata = 'Stockholm']"
83 "href": "/domains/RAN/entity-types/ODUFunction/entities?offset=0&limit=500&targetFilter=/decorators&scopeFilter=/decorators[@test-app-module:textdata = 'Stockholm']"
86 "href": "/domains/RAN/entity-types/ODUFunction/entities?offset=0&limit=500&targetFilter=/decorators&scopeFilter=/decorators[@test-app-module:textdata = 'Stockholm']"
91 jsonPath('$.items', byType {
94 jsonPath('$.items[0].o-ran-smo-teiv-ran:ODUFunction[0].id', byEquality())
95 jsonPath('$.items[1].o-ran-smo-teiv-ran:ODUFunction[0].id', byEquality())
96 jsonPath('$.items[2].o-ran-smo-teiv-ran:ODUFunction[0].id', byEquality())
101 description "SUCCESS - 200: Get decorators using getTopologyByEntityTypeName - CONTAINS"
104 url "/topology-inventory/v1alpha11/domains/RAN/entity-types/ODUFunction/entities?offset=0&limit=500&targetFilter=/decorators&scopeFilter=/decorators[contains(@test-app-module:textdata, 'Stock')]"
109 contentType('application/json')
114 "o-ran-smo-teiv-ran:ODUFunction": [
117 "test-app-module:textdata": "Stockholm",
118 "test-app-module:intdata": 456
120 "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=13,ODUFunction=13"
125 "o-ran-smo-teiv-ran:ODUFunction": [
128 "test-app-module:textdata": "Stockholm",
129 "test-app-module:intdata": 123
131 "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=14,ODUFunction=14"
136 "o-ran-smo-teiv-ran:ODUFunction": [
139 "test-app-module:textdata": "Stockholm",
140 "test-app-module:intdata": 123
142 "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=16,ODUFunction=16"
148 "href": "/domains/RAN/entity-types/ODUFunction/entities?offset=0&limit=500&targetFilter=/decorators&scopeFilter=/decorators[contains(@test-app-module:textdata, 'Stock')]"
151 "href": "/domains/RAN/entity-types/ODUFunction/entities?offset=0&limit=500&targetFilter=/decorators&scopeFilter=/decorators[contains(@test-app-module:textdata, 'Stock')]"
154 "href": "/domains/RAN/entity-types/ODUFunction/entities?offset=0&limit=500&targetFilter=/decorators&scopeFilter=/decorators[contains(@test-app-module:textdata, 'Stock')]"
157 "href": "/domains/RAN/entity-types/ODUFunction/entities?offset=0&limit=500&targetFilter=/decorators&scopeFilter=/decorators[contains(@test-app-module:textdata, 'Stock')]"
160 "href": "/domains/RAN/entity-types/ODUFunction/entities?offset=0&limit=500&targetFilter=/decorators&scopeFilter=/decorators[contains(@test-app-module:textdata, 'Stock')]"
165 jsonPath('$.items', byType {
168 jsonPath('$.items[0].o-ran-smo-teiv-ran:ODUFunction[0].id', byEquality())
169 jsonPath('$.items[1].o-ran-smo-teiv-ran:ODUFunction[0].id', byEquality())
170 jsonPath('$.items[2].o-ran-smo-teiv-ran:ODUFunction[0].id', byEquality())
175 description "SUCCESS - 200: Get decorators using getTopologyByEntityTypeName - CONTAINS and EQUALS"
178 url "/topology-inventory/v1alpha11/domains/RAN/entity-types/ODUFunction/entities?offset=0&limit=500&targetFilter=/decorators&scopeFilter=/decorators[contains(@test-app-module:textdata, 'Stock')] ; /decorators[@test-app-module:intdata = 123]"
183 contentType('application/json')
188 "o-ran-smo-teiv-ran:ODUFunction": [
191 "test-app-module:textdata": "Stockholm",
192 "test-app-module:intdata": 123
194 "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=14,ODUFunction=14"
199 "o-ran-smo-teiv-ran:ODUFunction": [
202 "test-app-module:textdata": "Stockholm",
203 "test-app-module:intdata": 123
205 "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=16,ODUFunction=16"
211 "href": "/domains/RAN/entity-types/ODUFunction/entities?offset=0&limit=500&targetFilter=/decorators&scopeFilter=/decorators[contains(@test-app-module:textdata, 'Stock')] ; /decorators[@test-app-module:intdata = 123]"
214 "href": "/domains/RAN/entity-types/ODUFunction/entities?offset=0&limit=500&targetFilter=/decorators&scopeFilter=/decorators[contains(@test-app-module:textdata, 'Stock')] ; /decorators[@test-app-module:intdata = 123]"
217 "href": "/domains/RAN/entity-types/ODUFunction/entities?offset=0&limit=500&targetFilter=/decorators&scopeFilter=/decorators[contains(@test-app-module:textdata, 'Stock')] ; /decorators[@test-app-module:intdata = 123]"
220 "href": "/domains/RAN/entity-types/ODUFunction/entities?offset=0&limit=500&targetFilter=/decorators&scopeFilter=/decorators[contains(@test-app-module:textdata, 'Stock')] ; /decorators[@test-app-module:intdata = 123]"
223 "href": "/domains/RAN/entity-types/ODUFunction/entities?offset=0&limit=500&targetFilter=/decorators&scopeFilter=/decorators[contains(@test-app-module:textdata, 'Stock')] ; /decorators[@test-app-module:intdata = 123]"
228 jsonPath('$.items', byType {
231 jsonPath('$.items[0].o-ran-smo-teiv-ran:ODUFunction[0].id', byEquality())
232 jsonPath('$.items[1].o-ran-smo-teiv-ran:ODUFunction[0].id', byEquality())
237 description "SUCCESS - 200: Get decorators using association name - contains"
240 url "/topology-inventory/v1alpha11/domains/RAN/entity-types/NRCellDU/entities?offset=0&limit=100&scopeFilter=/provided-by-oduFunction/decorators[contains(@test-app-module:textdata, 'ORAN')]"
245 contentType('application/json')
250 "o-ran-smo-teiv-ran:NRCellDU": [
252 "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=9,ODUFunction=9,NRCellDU=1"
257 "o-ran-smo-teiv-ran:NRCellDU": [
259 "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=9,ODUFunction=9,NRCellDU=2"
264 "o-ran-smo-teiv-ran:NRCellDU": [
266 "id": "urn:3gpp:dn:SubNetwork=Europe,SubNetwork=Hungary,MeContext=1,ManagedElement=9,ODUFunction=9,NRCellDU=3"
272 "href": "/domains/RAN/entity-types/NRCellDU/entities?offset=0&limit=100&scopeFilter=/provided-by-oduFunction/decorators[contains(@test-app-module:textdata, 'ORAN')]"
275 "href": "/domains/RAN/entity-types/NRCellDU/entities?offset=0&limit=100&scopeFilter=/provided-by-oduFunction/decorators[contains(@test-app-module:textdata, 'ORAN')]"
278 "href": "/domains/RAN/entity-types/NRCellDU/entities?offset=0&limit=100&scopeFilter=/provided-by-oduFunction/decorators[contains(@test-app-module:textdata, 'ORAN')]"
281 "href": "/domains/RAN/entity-types/NRCellDU/entities?offset=0&limit=100&scopeFilter=/provided-by-oduFunction/decorators[contains(@test-app-module:textdata, 'ORAN')]"
284 "href": "/domains/RAN/entity-types/NRCellDU/entities?offset=0&limit=100&scopeFilter=/provided-by-oduFunction/decorators[contains(@test-app-module:textdata, 'ORAN')]"
289 jsonPath('$.items', byType {
292 jsonPath('$.items[0].o-ran-smo-teiv-ran:NRCellDU[0].id', byEquality())
293 jsonPath('$.items[1].o-ran-smo-teiv-ran:NRCellDU[0].id', byEquality())
294 jsonPath('$.items[2].o-ran-smo-teiv-ran:NRCellDU[0].id', byEquality())