OOF Functional Impacts/Interaction Flow/APIs
- A new API needs to be developed, which takes the source and destination nodeId or TP's of a OTN network as input and finds the optimistic route between them.
- SDNC invokes this REST API to get the path for the given TP’s.
- The API performs the following operation:
- Reads the discover network information from AAI.
URL: /aai/v16/network/logical-links
Response:
[{
"link-name": "cross-link-2",
"in-maint": false,
"link-type": "cross-link",
"operational-status": "up",
"relationship-list": {
"relationship": [ {
"related-link": "/aai/v13/network/pnfs/pnf/10.10.10.10/p-interfaces/p-interface/nodeId-10.10.10.10-ltpId-58"
},{
"related-link": "/aai/v13/network/pnfs/pnf/11.11.11.11/p-interfaces/p-interface/nodeId-11.11.11.11-ltpId-159"
} ]
}
}]URL: "/aai/v13/network/pnfs/pnf/10.10.10.10/p-interfaces/p-interface/nodeId-10.10.10.10-ltpId-58
- prepare the discovery information according to the OOF model structure which is compatible for mini zinc framework.
- push the model information to the mini zinc framework.
- get the optimistic route list from the framework.
- respond back to sdnc.
API internal process:
- Parse the request payload, and get the source and destination (node/LtpId) from the request.
- From AAI query all the logical links (preconfigured) by URL /aai/v16/network/logical-links.
- From the response of the API call to AAI, the following information can be obtained.
- Logical link.
- the pnfs this logical link is associated with.
- the LtpId's that are available with the pnf's.
- From the response of step 3, we would be having data as mentioned below (Considering the below example):
[{
"link-name": "cross-link-2",
"in-maint": false,
"link-type": "cross-link",
"operational-status": "up",
"relationship-list": {
"relationship": [ {
"related-link": "/aai/v13/network/pnfs/pnf/10.10.10.10/p-interfaces/p-interface/nodeId-10.10.10.10-ltpId-58"
},{
"related-link": "/aai/v13/network/pnfs/pnf/11.11.11.11/p-interfaces/p-interface/nodeId-11.11.11.11-ltpId-159"
} ]
}
},{
"link-name": "cross-link-3",
"in-maint": false,
"link-type": "cross-link",
"operational-status": "up",
"relationship-list": {
"relationship": [ {
"related-link": "/aai/v13/network/pnfs/pnf/11.11.11.11/p-interfaces/p-interface/nodeId-11.11.11.11-ltpId-59"
},{
"related-link": "/aai/v13/network/pnfs/pnf/12.12.12.12/p-interfaces/p-interface/nodeId-12.12.12.12-ltpId-160"
} ]
}
},{
"link-name": "cross-link-1",
"in-maint": false,
"link-type": "cross-link",
"operational-status": "up",
"relationship-list": {
"relationship": [ {
"related-link": "/aai/v13/network/pnfs/pnf/10.10.10.10/p-interfaces/p-interface/nodeId-10.10.10.10-ltpId-72"
},{
"related-link": "/aai/v13/network/pnfs/pnf/12.12.12.12/p-interfaces/p-interface/nodeId-12.12.12.12-ltpId-112"
} ]
}
}]Link Name 1st Node Id 1st LtpId 2nd Node Id 2nd LtpId cross-link-2 10.10.10.10 58 11.11.11.11 159 cross-link-3 11.11.11.11 59 12.12.12.12 160 cross-link-1 10.10.10.10 72 12.12.12.12 112 - Get the source and destination entity from request and find the optimistic route between them. For example, if the request contains "accessNodeId" as 10.10.10.10 in RoutePortInfo object of "srcPort", "accessNodeId" as 12.12.12.12 in RoutePortInfo object of "destPort" and then the link between 10.10.10.10 and 12.12.12.12 should be returned as a response.
Input Output Additional Information srcPort : 10.10.10.10
destPort: 12.12.12.12
Cross-link-1 Since Cross-link-1 is the shortest path
between node 10.10.10.10 and 12.12.12.12
- Response would be send back to the caller.
Interface definition:
Interface Definition | Description |
---|---|
Content-Type | application/json |
Operation Type | POST |
URI | https://{host}:{port}/api/oof/v1/route |
Request Header
Header Name | Required? | Description |
---|---|---|
Accept | N | Determines the format of the body of the response. Valid value is “application/json” |
Content-Type | Y | Determines the format of the request content. Only application/json is supported. |
Content-Length | N | Number of bytes in the body of the request. Note that content length is limited to 1 MB. |
Authorization | Y | Supplies Basic Authentication credentials for the request. If the Authorization header is missing, then an HTTP 400 Invalid Request response is returned. If the string supplied is invalid, then an HTTP 401 Unauthorized response is returned. |
Request Body
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
requestInfo | Y | 1 | RequestInfo Object | The content of the RequestInfo object. | |
routeInfo | Y | 1 | RouteInfo | The content of Router request object |
RequestInfo Object
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
transactionId | Y | 1 | UUID/String | A unique ID to track an ONAP transaction. | |
requestId | Y | 1 | UUID/String | A unique ID to track multiple requests associated with a transaction. | |
callbackUrl | Y | 1 | URL | The end point of a callback service where recommendations are posted. | |
callbackHeader | N | 1 | JSON blob | The header information a client expecting in a async callback. | |
sourceId | Y | 1 | String | The unique ID of a client making an optimization call. | |
requestType | Y | 1 | String | create, update, delete | The type of a request |
numSolutions | N | 1 | Integer | Expected number of solutions. numSolution can also be specified using an optimization query policies, where the default configured value is 1. The value from a request gets higher precedence over the value defined in a policy. | |
optimizers | Y | 1..N | List of Strings | placement | A list of optimization services. |
timeout | N | 1 | Integer | A tolerance window (in secs) for expecting solutions. Default is 600 secs. |
RouteInfo Object
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
routeRequest | Y | 1 | RouteRequestInfo | The content of Router request object |
RouteRequestInfo Object
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
srcPort | Y | 1 | RoutePortInfo | Source port info | |
destPort | Y | 1 | RoutePortInfo | Destination Port info |
RoutePortInfo Object
Attribute | Required? | Cardinality | Content | Values | Description | Additional Info |
---|---|---|---|---|---|---|
accessTopologyId | N | 1 | String | Access Topology Id | Any one of the attribute MUST be provided. Also source and destination must be provided with the same attribute. For this usecase, access node Id will alone be provided for both source and destination RoutePortInfo | |
accessClientId | N | 1 | String | Access Client Id | ||
accessProviderId | N | 1 | String | unique Id of the service provider. | ||
accessNodeId | Y | 1 | String | source or destinatin node Id. | ||
accessLtpId | N | 1 | Integer | source or destinatin Ltp Id. |
Synchronous Response Body
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
requestId | Y | 1 | UUID/String | A unique Id for an ONAP transaction. | |
transactionId | Y | 1 | UUID/String | A unique ID to track multiple requests associated with a transaction. | |
statusMessage | N | 1 | String | Reasoning if a requestStatus is failure. | |
requestStatus | Y | 1 | String | accepted, failed | The status of a request. |
solutions | Y | 1..N | List of RouteSolutionInfo | Solutions related to a request. |
Route Solution Info
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
startTime | Y | 1 | Timestamp | ||
finishTime | Y | 1 | Timestamp | ||
Links | N | 0..N | List of LinkInfo | List of Link's |
Link Info
Attribute | Required | cordinality | Content | Values | Description | Additional Information |
---|---|---|---|---|---|---|
LinkId | Y | 1 | String | The Id of the link which provides connectivity between 2 domains | A logical entity which can provide connectivity between 2 domains. |
HTTP Response Code
HTTP Code | Response Phrase | Description |
---|---|---|
201 | Created | An optimization solution is found. |
202 | Accepted | An optimization request is accepted. |
400 | Bad request | Bad request. |
401 | Unauthorized | Request body is not compliant with the API definition. |
404 | Not found | The server cannot find the requested URI. |
405 | Method not found | The requested method is not supported by a server. |
500 | Internal server error | The server encountered an internal server error or timed out. |
520 | Solver error | Requested number of solutions cannot be found. |