aboutsummaryrefslogtreecommitdiffstats
path: root/docs/development/actors/sdnc/sdnc.rst
blob: 95998daf7c0dd8eff0caf03cc3b8735a9c8c4582 (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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
.. This work is licensed under a
.. Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0

.. _sdnc-label:

##########
SDNC Actor
##########

.. contents::
    :depth: 3

Overview of SDNC Actor
######################
ONAP Policy Framework enables SDNC as one of the supported actors.
SDNC uses a REST-based interface, and supports the following operations:
*BandwidthOnDemand*, *Reroute*.

Each operation supported by the actor is associated with its own java class, which is
responsible for populating the request structure appropriately.  The operation-specific
classes are all derived from the *SdncOperation* class, which is, itself, derived from
*HttpOperation*.  Each operation class implements its own *makeRequest()* method to
construct a request appropriate to the operation.


Request
#######

A number of nested structures are populated within the request.  The following table
lists the contents of some of the fields that appear within these structures.

+----------------------------------+---------+----------------------------------------------------------------------+
| Field Name                       |  Type   |                         Description                                  |
+----------------------------------+---------+----------------------------------------------------------------------+
+----------------------------------+---------+----------------------------------------------------------------------+
| top level:                       |         |                                                                      |
+----------------------------------+---------+----------------------------------------------------------------------+
| *requestId*                      | string  |   Inserted by Policy. Maps to the UUID sent by DCAE i.e. the ID      |
|                                  |         |   used throughout the closed loop lifecycle to identify a request.   |
+----------------------------------+---------+----------------------------------------------------------------------+
+----------------------------------+---------+----------------------------------------------------------------------+
| sdnc-request-header:             |         |                                                                      |
+----------------------------------+---------+----------------------------------------------------------------------+
| *svc-action*                     | string  |   Set by Policy, based on the operation.                             |
+----------------------------------+---------+----------------------------------------------------------------------+
| *svc-request-id*                 | string  |   Generated by Policy. Is a UUID.                                    |
+----------------------------------+---------+----------------------------------------------------------------------+
+----------------------------------+---------+----------------------------------------------------------------------+
| request-information:             |         |                                                                      |
+----------------------------------+---------+----------------------------------------------------------------------+
| *request-action*                 | string  |   Set by Policy, based on the operation.                             |
+----------------------------------+---------+----------------------------------------------------------------------+
+----------------------------------+---------+----------------------------------------------------------------------+
| network-information:             |         |   Applicable to *Reroute*.                                           |
+----------------------------------+---------+----------------------------------------------------------------------+
| *network-id*                     | string  |   Set by Policy, using the                                           |
|                                  |         |   "network-information.network-id" property                          |
|                                  |         |   found within the enrichment data provided by DCAE                  |
|                                  |         |   with the ONSET event.                                              |
+----------------------------------+---------+----------------------------------------------------------------------+
+----------------------------------+---------+----------------------------------------------------------------------+
| vnf-information:                 |         |   Applicable to *BandwidthOnDemand*.                                 |
+----------------------------------+---------+----------------------------------------------------------------------+
| *vnf-id*                         | string  |   Set by Policy, using the                                           |
|                                  |         |   "vnfId" property                                                   |
|                                  |         |   found within the enrichment data provided by DCAE                  |
|                                  |         |   with the ONSET event.                                              |
+----------------------------------+---------+----------------------------------------------------------------------+
+----------------------------------+---------+----------------------------------------------------------------------+
| vf-module-input-parameters:      |         |   Applicable to *BandwidthOnDemand*.                                 |
+----------------------------------+---------+----------------------------------------------------------------------+
| *param[0]*                       | string  |   Set by Policy, using the                                           |
|                                  |         |   "bandwidth" property                                               |
|                                  |         |   found within the enrichment data provided by DCAE                  |
|                                  |         |   with the ONSET event.                                              |
+----------------------------------+---------+----------------------------------------------------------------------+
| *param[1]*                       | string  |   Set by Policy, using the                                           |
|                                  |         |   "bandwidth-change-time" property                                   |
|                                  |         |   found within the enrichment data provided by DCAE                  |
|                                  |         |   with the ONSET event.                                              |
+----------------------------------+---------+----------------------------------------------------------------------+
+----------------------------------+---------+----------------------------------------------------------------------+
| vf-module-information:           |         |   Applicable to *BandwidthOnDemand*.                                 |
+----------------------------------+---------+----------------------------------------------------------------------+
| *vf-module-id*                   | string  |   Set by Policy to "".                                               |
+----------------------------------+---------+----------------------------------------------------------------------+


Examples
########

Suppose the *ControlLoopOperationParams* were populated as follows:

.. code-block:: bash

        {
            "actor": "SDNC",
            "operation": "Reroute",
            "context": {
                "enrichment": {
                    "service-instance.service-instance-id": "c7c6a4aa-bb61-4a15-b831-ba1472dd4a65",
                    "network-information.network-id": "2246ebc9-9b9f-42d0-a5e4-0248324fb884"
                }
            }
        }

An example of a request constructed by the actor using the above parameters, sent to the
SDNC REST server:

.. code-block:: bash

        {
            "input": {
                "sdnc-request-header": {
                    "svc-request-id": "2612653e-d946-423b-96d9-a8d5e8e39618",
                    "svc-action": "reoptimize"
                },
                "request-information": {
                    "request-action": "ReoptimizeSOTNInstance"
                },
                "service-information": {
                    "service-instance-id": "c7c6a4aa-bb61-4a15-b831-ba1472dd4a65"
                },
                "network-information": {
                    "network-id": "2246ebc9-9b9f-42d0-a5e4-0248324fb884"
                }
            }
        }


An example response received from the SDNC REST service:

.. code-block:: bash

        {
          "output": {
            "svc-request-id": "2612653e-d946-423b-96d9-a8d5e8e39618",
            "response-code": "200",
            "ack-final-indicator": "Y"
          }
        }


Configuration of the SDNC Actor
###############################

The following table specifies the fields that should be provided to configure the SDNC
actor.

=============================== ====================    ==================================================================
Field name                         type                             Description
=============================== ====================    ==================================================================
clientName                        string                  Name of the HTTP client to use to send the request to the
                                                          SDNC REST server.
timeoutSec                        integer (optional)      Maximum time, in seconds, to wait for a response to be received
                                                          from the REST server.  Defaults to 90s.
path                              string                  URI appended to the URL.  This field only applies to individual
                                                          operations; it does not apply at the actor level.  Note: the
                                                          *path* should not include a leading or trailing slash.
=============================== ====================    ==================================================================

The individual operations are configured using these same field names.  However, all
of them, except the *path*, are optional, as they inherit their values from the
corresponding actor-level fields.