Add declarative acceptance tests
[ccsdk/cds.git] / components / model-catalog / blueprint-model / uat-blueprints / pnf_config / Tests / uat.yaml
1 %YAML 1.1
2 ---
3 processes:
4   - name: config-assign
5     request:
6       commonHeader: &commonHeader
7         originatorId: sdnc
8         requestId: "123456-1000"
9         subRequestId: sub-123456-1000
10       actionIdentifiers: &assign-ai
11         blueprintName: configuration_over_restconf
12         blueprintVersion: "1.0.0"
13         actionName: config-assign
14         mode: sync
15       payload:
16         config-assign-request:
17           resolution-key: &resKey "RES-KEY 61"
18           config-assign-properties:
19             service-instance-id: siid_1234
20             pnf-id: &pnfId pnf-id-2019-07-12
21             pnf-ipv4-address: &pnfAddress "192.168.100.11"
22             service-model-uuid: service-model-uuid
23             pnf-customization-uuid: pnf-customization-uuid
24     expectedResponse:
25       commonHeader: *commonHeader
26       actionIdentifiers: *assign-ai
27       status:
28         code: 200
29         eventType: EVENT_COMPONENT_EXECUTED
30         errorMessage: null
31         message: success
32       payload:
33         config-assign-response: {}
34       stepData:
35         name: config-assign
36         properties:
37           resource-assignment-params:
38             config-assign: &assignPatch
39               ietf-restconf:yang-patch:
40                 patch-id: patch-1
41                 edit:
42                   - edit-id: edit1
43                     operation: merge
44                     target: /
45                     value: { netconflist: { netconf: [ { netconf-id: "10", netconf-param: "1000" }]}}
46                   - edit-id: edit2
47                     operation: merge
48                     target: /
49                     value: { netconflist: { netconf: [ { netconf-id: "20", netconf-param: "2000" }]}}
50                   - edit-id: edit3
51                     operation: merge
52                     target: /
53                     value: { netconflist: { netconf: [ { netconf-id: "30", netconf-param: "3000" }]}}
54           status: success
55   - name: config-deploy
56     request:
57       commonHeader: *commonHeader
58       actionIdentifiers: &deploy-ai
59         actionName: config-deploy
60         blueprintName: configuration_over_restconf
61         blueprintVersion: "1.0.0"
62         mode: sync
63       payload:
64         config-deploy-request:
65           resolution-key: *resKey
66           config-deploy-properties:
67             service-instance-id: siid_1234
68             pnf-id: *pnfId
69             pnf-ipv4-address: *pnfAddress
70             service-model-uuid: service-model-uuid
71             pnf-customization-uuid: pnf-customization-uuid
72     expectedResponse:
73       commonHeader: *commonHeader
74       actionIdentifiers: *deploy-ai
75       payload:
76         config-deploy-response: {}
77       status:
78         code: 200
79         errorMessage: null
80         eventType: EVENT_COMPONENT_EXECUTED
81         message: success
82       stepData:
83         name: config-deploy
84         properties:
85           response-data: ""
86           status: success
87
88 external-services:
89   - selector: sdncodl
90     expectations:
91       - request:
92           method: PUT
93           path: &configUri [ restconf/config, &nodeIdentifier [network-topology:network-topology/topology/topology-netconf/node, *pnfId]]
94           content-type: application/json
95           body:
96             node:
97               - node-id: *pnfId
98                 netconf-node-topology:protocol: { name: TLS }
99                 netconf-node-topology:host: *pnfAddress
100                 netconf-node-topology:key-based:
101                   username: netconf
102                   key-id: ODL_private_key_0
103                 netconf-node-topology:port: 6513
104                 netconf-node-topology:tcp-only: false
105                 netconf-node-topology:max-connection-attempts: 5
106         response:
107           status: 201
108       - request:
109           method: GET
110           path: [ restconf/operational, *nodeIdentifier]
111         response:
112           body:
113             node: [ { netconf-node-topology:connection-status: connected }]
114       - request:
115           method: GET
116           path: [*configUri, &configletResourcePath yang-ext:mount/mynetconf:netconflist]
117         response:
118           body: {}
119       - request:
120           method: PATCH
121           path: [*configUri, *configletResourcePath]
122           content-type: application/yang.patch+json
123           body: *assignPatch
124       - request:
125           method: DELETE
126           path: *configUri