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