1 # Copyright (c) 2018 Orange
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.swagger: "2.0"
18 Feature: Service Catalog
22 * def Context = Java.type('org.onap.nbi.test.Context');
23 * call Context.startServers();
25 Scenario: testServiceCatalogGetResourceWithoutTosca
26 Given path 'serviceSpecification','1e3feeb0-8e36-46c6-862c-236d9c626439_withoutTosca'
29 And match $ contains { id : '1e3feeb0-8e36-46c6-862c-236d9c626439' , name : 'vFW' , invariantUUID : 'b58a118e-eeb9-4f6e-bdca-e292f84d17df' , toscaModelURL : '/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439toto/toscaModel' , distributionStatus : 'DISTRIBUTED' , version : '2.0' , lifecycleStatus : 'CERTIFIED' , @type : 'ONAPservice' , attachment : '#array' , relatedParty : '#notnull' , resourceSpecification : '#array' }
30 And match $.relatedParty contains { name : 'Joni Mitchell', role : 'lastUpdater' }
31 And match $.resourceSpecification[0] contains { name : 'vFW-vSINK', resourceInstanceName : 'vFW-vSINK 0', resourceType : 'VF' , resourceInvariantUUID : '18b90934-aa82-456f-938e-e74a07a426f3' , @type : 'ONAPresource', modelCustomizationName : 'vFW-vSINK 0' }
32 And match $.resourceSpecification == '#[2]'
33 And match $.attachment == '#[5]'
35 Scenario: testServiceCatalogGetServiceWithToscaInput
36 Given path 'serviceSpecification','462f84e5-f0e5-44c5-ab95-38fb4bf77064'
39 And match $ contains { id : '462f84e5-f0e5-44c5-ab95-38fb4bf77064' , name : 'vFW' , invariantUUID : 'b58a118e-eeb9-4f6e-bdca-e292f84d17df' , toscaModelURL : '/sdc/v1/catalog/services/462f84e5-f0e5-44c5-ab95-38fb4bf77064/toscaModel' , distributionStatus : 'DISTRIBUTED' , version : '2.0' , lifecycleStatus : 'CERTIFIED' , @type : 'ONAPservice' , attachment : '#array' , relatedParty : '#notnull' , resourceSpecification : '#array' }
40 And match $.serviceSpecCharacteristic contains
43 name : 'vFW_ServiceCharacteristics',
44 description : 'This object describes all the inputs needed from the client to interact with the vFW Service Topology',
46 @type : 'ONAPServiceCharacteristic',
47 @schemaLocation : 'null',
48 serviceSpecCharacteristicValue :
51 @schemaLocation : '/serviceSpecification/462f84e5-f0e5-44c5-ab95-38fb4bf77064/specificationInputSchema',
52 @type : 'vFW_ServiceCharacteristic',
58 Scenario: testServiceCatalogInputSchema
59 Given path 'serviceSpecification','462f84e5-f0e5-44c5-ab95-38fb4bf77064'
62 Given path 'serviceSpecification','462f84e5-f0e5-44c5-ab95-38fb4bf77064','specificationInputSchema'
68 "ServiceCharacteristics" : {
69 "required" : [ "sdwanconnectivity0_name", "sdwanconnectivity0_topology" ],
71 "sdwanconnectivity0_topology" : {
73 "description" : "full mesh, hub-spoke"
75 "sdwanconnectivity0_name" : {
77 "description" : "the name of this VPM object"
85 Scenario: findServiceCatalog
86 Given path 'serviceSpecification'
89 And assert response.length == 21
90 And match $[0] contains { id : '446afaf6-79b5-420e-aff8-7551b00bb510' , name : 'FreeRadius-service' , invariantUUID : '7e4781e8-6c6e-41c5-b889-6a321d5f2490' , category : 'Network L4+' , distributionStatus : 'DISTRIBUTED' , version : '1.0' , lifecycleStatus : 'CERTIFIED' }
91 And match $[0].relatedParty contains { role : 'lastUpdater' }
95 Scenario: findServiceCatalogWithFilter
96 Given path 'serviceSpecification'
97 And params {fields:'name'}
100 And assert response.length == 21
101 And match $[0] contains { name : 'FreeRadius-service' }
103 Scenario: findServiceCatalogWithoutWiremock
104 * call Context.stopWiremock();
105 Given path 'serviceSpecification','1e3feeb0-8e36-46c6-862c-236d9c626439'
108 * call Context.startServers();