aboutsummaryrefslogtreecommitdiffstats
path: root/components/model-catalog/blueprint-model/uat-blueprints/pnf_config/Tests/uat.yaml
blob: 85b10c61198d46d077af3e50a19235e81c77b885 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
%YAML 1.1
---
processes:
  - name: config-assign
    request:
      commonHeader: &commonHeader
        originatorId: sdnc
        requestId: "123456-1000"
        subRequestId: sub-123456-1000
      actionIdentifiers: &assign-ai
        blueprintName: pnf_config
        blueprintVersion: "1.0.0"
        actionName: config-assign
        mode: sync
      payload:
        config-assign-request:
          resolution-key: &resKey "RES-KEY 61"
          config-assign-properties:
            service-instance-id: siid_1234
            pnf-id: &pnfId pnf-id-2019-07-12
            service-model-uuid: service-model-uuid
            pnf-customization-uuid: pnf-customization-uuid
    expectedResponse:
      commonHeader: *commonHeader
      actionIdentifiers: *assign-ai
      status:
        code: 200
        eventType: EVENT_COMPONENT_EXECUTED
        errorMessage: null
        message: success
      payload:
        config-assign-response: {}
  - name: config-deploy
    request:
      commonHeader: *commonHeader
      actionIdentifiers: &deploy-ai
        actionName: config-deploy
        blueprintName: pnf_config
        blueprintVersion: "1.0.0"
        mode: sync
      payload:
        config-deploy-request:
          resolution-key: *resKey
          config-deploy-properties:
            service-instance-id: siid_1234
            pnf-id: *pnfId
            service-model-uuid: service-model-uuid
            pnf-customization-uuid: pnf-customization-uuid
            pnf-ipv4-address: &pnfAddress 13.13.13.13
            ipaddress-v6-oam: 1::13
    expectedResponse:
      commonHeader: *commonHeader
      actionIdentifiers: *deploy-ai
      payload:
        config-deploy-response: {}
      status:
        code: 200
        errorMessage: null
        eventType: EVENT_COMPONENT_EXECUTED
        message: success

external-services:
  - selector: sdnc
    expectations:
      - request:
          method: PUT
          path: &configUri [ restconf/config, &nodeIdentifier [network-topology:network-topology/topology/topology-netconf/node, *pnfId]]
          headers:
            Content-Type: application/json
          body:
            node:
              - node-id: *pnfId
                netconf-node-topology:protocol: { name: TLS }
                netconf-node-topology:host: *pnfAddress
                netconf-node-topology:key-based:
                  username: netconf
                  key-id: ODL_private_key_0
                netconf-node-topology:port: 6513
                netconf-node-topology:tcp-only: false
                netconf-node-topology:max-connection-attempts: 5
        response:
          status: 201
      - request:
          method: GET
          path: [ restconf/operational, *nodeIdentifier]
        response:
          body:
            node: [ { netconf-node-topology:connection-status: connected }]
      - request:
          method: GET
          path: [*configUri, &configletResourcePath yang-ext:mount/mynetconf:netconflist]
        response:
          body: {}
      - request:
          method: PATCH
          path: [*configUri, *configletResourcePath]
          headers:
            Content-Type: application/yang.patch+json
          body:
            ietf-restconf:yang-patch:
              patch-id: patch-1
              edit:
                - edit-id: edit1
                  operation: merge
                  target: /
                  value: { netconflist: { netconf: [ { netconf-id: "10", netconf-param: "1000" }]}}
                - edit-id: edit2
                  operation: merge
                  target: /
                  value: { netconflist: { netconf: [ { netconf-id: "20", netconf-param: "2000" }]}}
                - edit-id: edit3
                  operation: merge
                  target: /
                  value: { netconflist: { netconf: [ { netconf-id: "30", netconf-param: "3000" }]}}
      - request:
          method: DELETE
          path: *configUri