Table of Contents


OOF/HAS Create/Update API

Interface DefintionDescription

URI

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

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.

schedulingInfo

Y

1

SchedulingInfo Object


The Content of the SchedulingInfo 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

scheduling

A list of optimization services.

timeout

Y

1

Integer


A tolerance window (in secs) for expecting solutions.

SchedulingInfo Object

AttributeRequired?CardinalityContentValuesDescription

startTime

Y

1

String


Schedule start time in the ISO format from which upgrades can be started.

endTime

Y

1

String


Schedule end time in the ISO format by which upgrades must be completed.

normalDurationInSecs

Y1Integer

Normal upgrade duration in Sec.

additionalDurationInSecs

Y1Integer

Additional duration in Sec for backout.

concurrencyLimit

Y1Integer

Number of upgrades at the same time.

changeElements

Y1..NList of ChangeElement Object
A list of elements to be upgraded.

ChangeElement Object

AttributeRequired?CardinalityContentValuesDescription

nodeId

Y

1

String


The ID of a node to be upgraded.

groupId

N

1

String


The group ID of a node.


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

success, failure

The status of a request.

Asynchronous Response 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.

AttributeNAttribute and respecrtive value that a client has sent in the callbackHeader field of a requerst.

Content-Length

N

Number of bytes in the body of the request. Note that content length is limited to 1 MB.

Asynchronous 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 requestStatus is failure.

requestStatus

Y

1

String

success, failure, pending

The status of a request.

solutions

Y

1

Solution Object


Solutions related to a request.

Solution Object

AttributeRequired?CardinalityContentValuesDescription

groupId

Y

1

String


The group ID of nodes.

startTime

Y

1

String


The start time of a group to be upgraded in the ISO format.

finishTimeY1String

The end time of a group to be upgraded in the ISO format.

latestInstanceStartTime

Y1String

Latest time when an instance of this group can be started in the ISO format.

nodeId

Y1..NList of Strings

The node Ids associated with a group Id.


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


CMPortal-OOF/CMSO Request Example
{
  "requestInfo": {
    "transactionId": "xxx-xxx-xxxx",
    "requestId": "yyy-yyy-yyyy",
    "callbackUrl": "https://CMSO:5000/callbackUrl",
    "sourceId": "CMSO",
    "requestType": "create",
    "numSolutions": 1,
    "optimizers": ["scheduling"],
    "timeout": 600
  },
  "schedulingInfo": {
	"startTime": "2016-12-15T00:00+01:00",
	"endTime": "2016-12-16T23:59+01:00",
	"normalDurationInSecs": 60,
	"additionalDurationInSecs": 0,
	"concurrencyLimit": 4,
	"changeElements": [
		{
			"nodeId": "node1",
			"groupId": "gp1"
		}
	]
}

Synchronous Response Example


CMPortal-OOF/CMSO Response Example
{
  "transactionId": "xxx-xxx-xxxx",
  "requestId": "yyy-yyy-yyyy",
  "requestStatus": "completed",
  "statusMessage": "Success!"
}

Asynchronous Response Example


CM Portal-OOF/CMSO Response Example
{
  "transactionId": "xxx-xxx-xxxx",
  "requestId": "yyy-yyy-yyyy",
  "requestStatus": "completed",
  "statusMessage": "Success!",
  "solutions": [
	{
		"groupId": "grp06",
		"startTime": "2016-10-01T00:30+01:00",
		"finishTime": "2016-10-01T00:40+01.00",
		"latestInstanceStartTime": "2016-10-01T00:38+01:00",
		"node": [ "up01", "up03", "up09" ]
	}
  ]
}


OOF/CMSO API document (pdf format)

  • No labels