update link to upper-constraints.txt
[dcaegen2.git] / docs / sections / apis / PRH.rst
1 .. This work is licensed under a
2    Creative Commons Attribution 4.0 International License.
3    http://creativecommons.org/licenses/by/4.0
4
5 .. _prh_api:
6
7 ==============================
8 PRH (PNF Registration Handler)
9 ==============================
10
11 :Date: 2018-09-13
12
13 .. contents::
14     :depth: 3
15
16 Overview
17 ========
18
19 Physical Network Function Registration Handler is responsible for registration
20 of PNF (Physical Network Function) to ONAP (Open Network Automation Platform)
21 in plug and play manner.
22
23 .. csv-table::
24    :header: "API name", "Swagger JSON", "Swagger YAML"
25    :widths: 10,5,5
26
27    "PNF Registration Handler", ":download:`link <PRH.json>`", ":download:`link <PRH.yaml>`"
28
29 .. swaggerv2doc:: PRH.json
30
31 Introduction
32 ============
33
34 PRH is delivered as one **Docker container** which hosts application server and
35 can be started by `docker-compose`.
36
37 Functionality
38 =============
39 .. image:: ../images/prhAlgo.png
40
41 Paths
42 =====
43
44 GET /events/unauthenticated.VES_PNFREG_OUTPUT
45 ---------------------------------------------
46
47 Description
48 ~~~~~~~~~~~
49
50 Reads PNF registration fromD DMaaP (Data Movement as a Platform)
51
52 Responses
53 ~~~~~~~~~
54
55 +-----------+-------------------------------------------+
56 | HTTP Code | Description                               |
57 +===========+===========================================+
58 | **200**   | successful response                       |
59 +-----------+-------------------------------------------+
60
61 PATCH /aai/v12/network/pnfs/{pnf-name}
62 --------------------------------------
63
64 Description
65 ~~~~~~~~~~~
66
67 Update AAI (Active and Available Inventory) PNF's specific entries:
68     - ipv4 to ipaddress-v4-oam
69     - ipv6 to ipaddress-v6-oam
70
71 Parameters
72 ~~~~~~~~~~
73
74 +----------+---------------+---------------------------------+------------------+
75 | Type     | Name          | Description                     | Schema           |
76 +==========+===============+=================================+==================+
77 | **Path** | | **pnf-name**| Name of the PNF.                | string (text)    |
78 |          | | *required*  |                                 |                  |
79 +----------+---------------+---------------------------------+------------------+
80 | **Body** | **patchbody** | Required patch body.            |                  |
81 +----------+---------------+---------------------------------+------------------+
82
83 Responses
84 ~~~~~~~~~
85
86 +-----------+-------------------------------------------+
87 | HTTP Code | Description                               |
88 +===========+===========================================+
89 | **200**   | successful response                       |
90 +-----------+-------------------------------------------+
91
92 POST /events/unauthenticated.PNF_READY
93 --------------------------------------
94
95 Description
96 ~~~~~~~~~~~
97
98 Publish PNF_READY to DMaaP and set:
99     - pnf-id to correlationID
100     - ipv4 to ipaddress-v4-oam
101     - ipv6 to ipaddress-v6-oam
102
103 Parameters
104 ~~~~~~~~~~
105
106 +----------+----------------+---------------------------------+------------------+
107 | Type     | Name           | Description                     | Schema           |
108 +==========+================+=================================+==================+
109 | **Body** | | **postbody** | Required patch body.            | `hydratorappput  |
110 |          | | *required*   |                                 | <#_hydratorapppu |
111 |          |                |                                 | t>`__            |
112 +----------+----------------+---------------------------------+------------------+
113
114 Responses
115 ~~~~~~~~~
116
117 +-----------+-------------------------------------------+
118 | HTTP Code | Description                               |
119 +===========+===========================================+
120 | **200**   | successful response                       |
121 +-----------+-------------------------------------------+
122
123 Compiling PRH
124 =============
125
126 Whole project (top level of PRH directory) and each module (sub module
127 directory) can be compiled using `mvn clean install` command.
128
129 Main API Endpoints
130 ==================
131
132 Running with dev-mode of PRH
133     - Heartbeat: **http://<container_address>:8100/heartbeat** or **https://<container_address>:8443/heartbeat**
134     - Start PRH: **http://<container_address>:8100/start** or **https://<container_address>:8433/start**
135     - Stop PRH: **http://<container_address>:8100/stopPrh** or **https://<container_address>:8433/stopPrh**
136
137 Maven GroupId:
138 ==============
139
140 org.onap.dcaegen2.services
141
142 Maven Parent ArtifactId:
143 ========================
144
145 dcae-services
146
147 Maven Children Artifacts:
148 =========================
149
150 1. prh-app-server: Pnf Registration Handler (PRH) server
151 2. prh-aai-client: Contains implementation of AAI client
152 3. prh-dmaap-client: Contains implementation of DmaaP client
153 4. prh-commons: Common code for whole prh modules