Overview
Network Discovery Context Builder (NDCTX Builder) is a MicroService (MS) responsible to aggregate information for network resources which is gathered from primary sources (e,g, openStack , A&AI, ...). The NorthBound for the MS is POMBA Context Aggregaotr and in the southbound it works with 2 MSs:
- Service Decomposition (SD) MS
- Network Discovery (ND) MS
Service Decomposition (SD) MS
A query (GetContext) is sent to NDCTX builder from Context Aggregator with a serviceInstanceId. Then SD MS acts to discover different resources of that service. Because a service could be tied to several resources, SD MS runs one query against each resources type. Supported list of the resource types are defined in configuration files for NDCTX MS and SD MS.
SD MS does a lookup to A&AI with serviceInstanceId to discover resources and finds number of relationships for the supported resource types. Consequently, for each relationship, SD MS send a query to A&AI to find more details. The results are then passed to NDCTX builder.
Network Discovery (ND) MS
Next step is to send APIs to ND MS. The GET APIs from NDCTX builder to ND MS includes combination of "resource type" and its "resource Id(s)".
a) If the API received by ND MS meets the requirements (includes mandatory headers and a valid resource type), it first responses with 200 OK and ackFinalIndicator=false. This means there will be second response upon completion of query from southbound. The second response is asynchronous. As it may take a while to get results from OpenStack.
b) If the API received by ND MS does not meets the requirements (e.g. missing mandatory header, unsupported resource type), it will be rejected with ackFinalIndicator=true with a proper response code (see Interface/API section below for more details on response codes). This will be the end of it and there will not be any query to southbound.
Configuration
Each of 3 MSs has a configuration file (application.properties), which is loaded during MS startup.
Note |
---|
Post any changes on application.properties , the corresponding MS need to be restarted. |
MS | Config file | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
NDCTX Builder |
| |||||||||||
SD |
| |||||||||||
ND | #The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads server.tomcat.max-idle-time=60000 |
Interfaces/API
GET request at url = httphttps://<NDCTX-Builder>:<port>/network-discovery/service/context/<serviceInstanceId>
include headers: a) X-ONAP-PartnerName , b) X-ONAP-RequestId
Microservice | response code | details |
---|---|---|
ND | 200 | Request has completed and no more information is forthcoming |
202 | Request has been accepted and more information will be posted to notificationURL | |
400 | Missing mandatory field in the request or HTTP header | |
404 | Requested resource was not found | |
500 | Request failed due to internal error | |
SD | 200 | OK |
400 | Bad Request | |
404 | Service not available | |
500 | Unexpected Runtime error | |
NDCTX builder | 200 | OK |
404 | Service not available | |
500 | Unexpected Runtime error |