summaryrefslogtreecommitdiffstats
path: root/docs/sections/apis/PRH.rst
blob: f693ef769abe028cdd419252ff1636aba99a914c (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
==============================
PRH (PNF Registration Handler)
==============================

:Date: 2018-09-13

.. contents::
    :depth: 3
..

Overview
========

Physical Network Function Registration Handler is responsible for registration of PNF (Physical Network Function) to
ONAP (Open Network Automation Platform) in plug and play manner. 

Introduction
============

PRH is delivered as one **Docker container** which hosts application server and can be started by `docker-compose`.

Functionality
=============
.. image:: ../images/prhAlgo.png


Paths
=====

GET /events/unauthenticated.VES_PNFREG_OUTPUT
-----------------------------------------------

Description
~~~~~~~~~~~

Reads PNF registration fromD DMaaP (Data Movement as a Platform)


Responses
~~~~~~~~~

+-----------+-------------------------------------------+
| HTTP Code | Description                               |
+===========+===========================================+
| **200**   | successful response                       |
+-----------+-------------------------------------------+


PATCH /aai/v12/network/pnfs/{pnf-name}
--------------------------------------

Description
~~~~~~~~~~~

Update AAI (Active and Available Inventory) PNF's specific entries:
    - ipv4 to ipaddress-v4-oam
    - ipv6 to ipaddress-v6-oam

Parameters
~~~~~~~~~~

+----------+---------------+---------------------------------+------------------+
| Type     | Name          | Description                     | Schema           |
+==========+===============+=================================+==================+
| **Path** | | **pnf-name**| Name of the PNF.                | string (text)    |
|          | | *required*  |                                 |                  |
+----------+---------------+---------------------------------+------------------+
| **Body** | **patchbody** | Required patch body.            |                  |
+----------+---------------+---------------------------------+------------------+


Responses
~~~~~~~~~

+-----------+-------------------------------------------+
| HTTP Code | Description                               |
+===========+===========================================+
| **200**   | successful response                       |
+-----------+-------------------------------------------+


POST /events/unauthenticated.PNF_READY
--------------------------------------

Description
~~~~~~~~~~~

Publish PNF_READY to DMaaP and set:
    - pnf-id to correlationID
    - ipv4 to ipaddress-v4-oam
    - ipv6 to ipaddress-v6-oam

Parameters
~~~~~~~~~~

+----------+----------------+---------------------------------+------------------+
| Type     | Name           | Description                     | Schema           |
+==========+================+=================================+==================+
| **Body** | | **postbody** | Required patch body.            | `hydratorappput  |
|          | | *required*   |                                 | <#_hydratorapppu |
|          |                |                                 | t>`__            |
+----------+----------------+---------------------------------+------------------+


Responses
~~~~~~~~~

+-----------+-------------------------------------------+
| HTTP Code | Description                               |
+===========+===========================================+
| **200**   | successful response                       |
+-----------+-------------------------------------------+

Compiling PRH
=============

Whole project (top level of PRH directory) and each module (sub module directory) can be compiled using 
`mvn clean install` command.   

Main API Endpoints
==================

Running with dev-mode of PRH
    - Heartbeat: **http://<container_address>:8100/heartbeat** or **https://<container_address>:8443/heartbeat**
    - Start PRH: **http://<container_address>:8100/start** or **https://<container_address>:8433/start**
    - Stop PRH: **http://<container_address>:8100/stopPrh** or **https://<container_address>:8433/stopPrh**

Maven GroupId:
==============

org.onap.dcaegen2.services

Maven Parent ArtifactId:
========================

dcae-services

Maven Children Artifacts:
=========================

1. prh-app-server: Pnf Registration Handler (PRH) server
2. prh-aai-client: Contains implementation of AAI client
3. prh-dmaap-client: Contains implementation of DmaaP client
4. prh-commons: Common code for whole prh modules