Table of Contents


OOF/PCI Create/Update API

Interface DefintionDescription

URI

https://{host}:{port}/api/oof/v1/route

Operation Type

POST

Content-Type

application/json

Request Header

Header NameRequired?Description

Accept

N

Determines the format of the body of the response. Valid value is “application/json”

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.

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.

Request Body

AttributeRequired?CardinalityContentValuesDescription

requestInfo

Y

1

RequestInfo Object


The content of the RequestInfo object.

routeInfo

Y1RouteInfo
The content of Router request object


RequestInfo Object

AttributeRequired?CardinalityContentValuesDescription

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.

callbackHeaderN1JSON 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

AttributeRequired?CardinalityContentValuesDescription

routeRequest

Y1RouteRequestInfo
The content of Router request object


RouteRequestInfo Object

AttributeRequired?CardinalityContentValuesDescription
srcPortY1RoutePortInfo
Source port info
destPortY1RoutePortInfo
Destination Port info

RoutePortInfo Object

AttributeRequired?CardinalityContentValuesDescriptionAdditional dependency Information
accessTopologyId
N1String
Access Topology IdAny one of this attribute MUST be provided in both source and destination RoutePortInfo object.
accessClientId
N1String
Client Id
accessProviderId
N1String

accessNodeId
N1String

accessLtpId
N1Integer

Synchronous Response Body

AttributeRequired?CardinalityContentValuesDescription

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

AttributeRequired?CardinalityContentValuesDescription
startTime
Y1Timestamp

finishTime
Y1Timestamp

VPNs
N0..NList of VPNInfo
List of VPN's

VPN Info

AttributeRequired?CardinalityContentValuesDescription
accessTopologyId
Y1String
Access Topology Id
accessClientId
Y1String

accessProviderId
Y1String

accessNodeId
Y1String

srcAccessLtpId
Y1Integer

dstAccessLtpId
Y1Integer

HTTP Response Code

HTTP CodeResponse PhraseDescription

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.

520Solver errorRequested number of solutions cannot be found.

Request Example


Route Optimization Request Example
{
  "requestInfo": {
    "transactionId": "xxx-xxx-xxxx",
    "requestId": "yyy-yyy-yyyy",
    "callbackUrl": "https://wiki.onap.org:5000/callbackUrl",
    "sourceId": "",
    "requestType": "create",
    "numSolutions": 1,
    "optimizers": [
      "route"
    ],
    "timeout": 600
  },
  "routeInfo": {
    "routeRequest": {
      "srcPort": {
        "accessTopologyId": "Topo113",
        "accessClientId": "clientU12",
        "accessProviderId": "VDF1234",
        "accessNodeId": "Node123",
        "accessLtpId": "1345"
      },
      "dstPort": {
        "accessTopologyId": "Topo3421",
        "accessClientId": "clientD123",
        "accessProviderId": "VDF3214",
        "accessNodeId": "node323",
        "accessLtpId": "3452"
      }
    }
  }
}

Synchronous Response Example


Route Optimization Response Example
{
  "transactionId": "xxx-xxx-xxxx",
  "requestId": "yyy-yyy-yyyy",
  "requestStatus": "accepted",
  "statusMessage": "",
  "solutions": [
    {
      "startTime": "2016-10-01T00:30+01:00",
      "finishTime": "2016-10-01T00:40+01.00",
      "VPNs": [
        {
          "accessTopologyId": "Topo123",
          "accessClientId": "client-123",
          "accessProviderId": "provider-123",
          "accessNodeId": "node-123",
          "srcAccessLtpId": "ltp-src-123",
          "dstAccessLtpId": "ltp-dst-123"
        }
      ]
    }
  ]
}







  • No labels

4 Comments

  1. To keep it align with the existing API (placement) for OSDF, I would suggest the following structure for the new routeRequest API as shown below:

    {
      "requestInfo": {
        "transactionId": "xxx-xxx-xxxx",
        "requestId": "yyy-yyy-yyyy",
        "callbackUrl": "https://wiki.onap.org:5000/callbackUrl",
        "sourceId": "",
        "requestType": "create",
        "numSolutions": 1,
        "optimizers": [
          "route"
        ],
        "timeout": 600
      },
      "routeInfo": {
        "routeRequests": [
          {
            "srcPort": {
              "accessTopologyId": "Topo113",
              "accessClientId": "clientU12",
              "accessProviderId": "VDF1234",
              "accessNodeId": "Node123",
              "accessLtpId": "1345"
            },
            "dstPort": {
              "accessTopologyId": "Topo3421",
              "accessClientId": "clientD123",
              "accessProviderId": "VDF3214",
              "accessNodeId": "node323",
              "accessLtpId": "3452"
            }
          }
        ]
      }
    }

  2. Keeping the existing APIs response structure, I would like to share the below suggestions to synchronous response:


    1. requestStatus should be "completed" (since the final response is synchronous)

    2. "startTime": and "finishTime" is not part of the existing response structure but could be added if necessary.

    3. routeSolutions can be a separate block. It would enable extensibilty for the APIs in future.

    4. List of list would help if there are multiple routeRequests and each can have multiple "routeSolutions".

    {

    "transactionId": "xxx-xxx-xxxx",

    "requestId": "yyy-yyy-yyyy",

    "requestStatus": "completed",

    "statusMessage": "",

    "solutions": {

    "routeSolutions": [

    [

    {

    "VPNs": [

    {

    "accessTopologyId": "Topo123",

    "accessClientId": "client-123",

    "accessProviderId": "provider-123",

    "accessNodeId": "node-123",

    "srcAccessLtpId": "ltp-src-123",

    "dstAccessLtpId": "ltp-dst-123"

    }

    ]

    }

    ]

    ]

    }

    }


  3. Hi Isaac Manuel Raj,

    This is Thiriloshini from Fujitsu working on MDONS use case with ATT and Orange for ONAP. We are currently working on interdomain link selection and trying to see if we could re-use the route optimization that you have implemented or follow your footsteps of your implementation based on our requirement if we could not re-use as is.

    I’m trying to understand how the route calculation logic has been implemented and I have some questions regarding the same. Since you were the one who worked on route optimization, thought of checking with you. Please find my questions below.

    1. In the build_dzn_data method of the file simple_route_opt.py, in the step “Prepare map table” (createMapTable method), the method addition is called for which the input is the set of all “logical-links” whose operational-status is up. I’m assuming there will be more than one link whose operational status is up. Thus for the addition method, the input “data” should have a list of type “logical-link”.
    2. The confusing thing is that, the relationship object doesn’t have an attribute called “accessNodeId”. But it is being accessed. Since the mapping table is being used in minizinc, I’m trying to understand the same. Can you please help me understand a little on this. I’ve attached a sample of our logical-links data for your reference.
    3. Trying to decode the below lines in the method build_dzn_data . Can you please provide an example of a related-link value with respect to ccvpn .  In this what does an accessNodeId represent ? The nodeId or a controllerId or the InterfaceId ?

    relationshipStartNodeID = relationshipStartNode["related-link"].split("/")[-1]

                        start_accessNodeId = relationshipStartNodeID.split("-")[-3]

                        Edge_Start.append(start_accessNodeId)

    If you could provide a sample of the logical-link data itself that CCVPN uses, that would be very useful for us to understand.

    Any pointer is much appreciated.


    Thanks,

    Thiriloshini


  4. Hi, I see a misalignment between this page (modified on Jan 14, 2020) and OOF Functional Impacts/Interaction Flow/APIs  (modified on Jan 20, 2020) about Route Solution Info object. In fact in this page it contains the "VPNs" attribute while in the latter case it contains the "Links" attribute.

    In addition, what is the semantic of "accessNodeId" attribute in the "VPN Info" object?

    thanks

    Alessandro