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