Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

AttributeQualifierRequired?CardinalityContentValuesDescription

requestInfo

MY

1

RequestInfo Object


The content of the RequestInfo object.

placementInfo

MY

1

PlacementInfo Object


The Content of the PlacementInfo object.

licenseInfo

MN

1

LicenseInfo Object


The Content of the LicenseInfo object.

serviceInfo

MY

1

ServiceInfo Object


The Content of the ServiceInfo object.

RequestInfo Object

AttributeQualifierRequired?CardinalityContentValuesDescription

transactionId

MY

1

UUID/String


A unique ID to track an ONAP transaction.

requestId

MY

1

UUID/String


A unique ID to track multiple requests associated with a transaction.

callbackUrl

MY

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

MY

1

String


The unique ID of a client making an optimization call.

requestType

MY

1

String

create, update, delete

The type of a request

numSolutions

ON

1

Integer


Expected number of solutions.

optimizers

M

1..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

MN

1

Integer


A tolerance window (in minsecs) for expecting solutions. Default is 600 secs.

PlacementInfo Object

Attribute
Qualifier
Required?CardinalityContentValuesDescription

requestParameters

M

C

1

JSON BLOB


A

service ordering information.

placementDemands

M

1..N

List of

JSON object conaining service and customer-specific data. A client or service designer is required to specify the parameters of interest for a given service and their location in the JSON blob through optimization query policies. This attribute is only required if a request contains service or customer-specific information.

placementDemands

Y

1..N

List of PlacementDemand Object


The resource information for a placement service.

subscriberInfoN1SubscriberInfo Object
The information of a service subscriber.

PlacementDemand Object

AttributeQualifierRequired?CardinalityContentValuesDescription

resourceModuleName

MY

1

String


A resource name as defined in a service model.

serviceResourceId

MY

1

String


A unique resource Id with a local scope between client and OOF.

tenantId

ON

1

String


A tenant Id as defined in the ordering system.

resourceModelInfo

MY

1

ModelMetaData Object


Resource model information as defined in SDC.

existingCandidates

ON

1..N

List of Candidates ObjectObjects


The existing placement information of a resource.

excludedCandidates

ON

1..N

List of Candidates ObjectObjects


Candidates that need to be excluded from solutions.

requiredCandidates

ON

1..N

List of Candidates ObjectObjects


Candidates that must be included in solutions.

...

SubscriberInfo Object

Attribute
Qualifier
Required?CardinalityContentValuesDescription
modelInvariantId

globalSubscriberId

M

Y

1

String

A model invariant Id as defined in a service model.

modelVersionId

M

1

String

A unique model Id as defined in a service model.

modelName

O

modelType

O

An ID of a subscriber.

subscriberName

Y

1.

String


The name of a subscriber. If the name is not known, the value must be 'unknown'.

subscriberCommonSiteIdN1String

A model name as defined in a service model.


Id representing a subscriber location.

ModelMetaData Object

AttributeRequired?CardinalityContentValuesDescription

modelInvariantId

Y

1

String


A model type invariant Id as defined in a service model.

modelVersionmodelVersionId

OY

1

String


A unique model version Id as defined in a service model.

modelCustomizationNamemodelName

ON

1

String


A model customization name as defined in a service model.

modelType

N

1

String


A model type as defined in a service model.

modelVersion

N

1

String


A model version as defined in a service model.

modelCustomizationName

N

1

String


A model customization name as defined in a service model.

Candidates Object

AttributeQualifierRequired?CardinalityContentValuesDescription

identifierType

MY

1

String

service_instance_id, vnf_name, cloud_region_idserviceInstanceId, vnfName, cloudRegionId, vimId

The type of a candidate.

identifiers

MY

1..N

List of Strings


A list of identifiers.

cloudOwnerC1String
The name of a cloud owner. Only required if identifierType is cloud_region_id.

ServiceInfo Object

AttributeQualifierRequired?CardinalityContentValuesDescription

serviceInstanceId

MY

1

String


A service instance id associated with a request.

serviceModelInfomodelInfo

MY

1

ModelMetaData Object


A list of identifiers.

serviceNameY1String
The name of a service.

LicenseInfo Object

AttributeQualifierRequired?CardinalityContentValuesDescription

licenseDemands

MY

1..N

List of LicenseDemands Object


A list of resources for license selection.

LicenseDemands Object

AttributeQualifierRequired?CardinalityContentValuesDescription

resourceModuleName

MY

1

String


A resource name as defined in a service model.

serviceResourceId

MY

1

String


A unique resource Id with a local scope between client and OOF.

resourceModelInfo

MY

1

ModelMetaData Object


Resource model information as defined in a service model.

existingLicenses

ON

1

LicenseModel Object


Existing license information assigned to a resource.

LicenseModel Object

AttributeQualifierRequired?CardinalityContentValuesDescription

entitlementPoolUUID

MY

1..N

List of Strings


Entitlement pool UUIDs associated with a resource.

licenseKeyGroupUUID

MY

1..N

List of Strings


License key groups associated with a resource.

Synchronous Response Body

AttributeQualifierRequired?CardinalityContentValuesDescription

requestId

MY

1

UUID/String


A unique Id for an ONAP transaction.

transactionId

MY

1

UUID/String


A unique ID to track multiple requests associated with a transaction.

statusMessage

ON

1

String


Reasoning if a requestStatus is failurefailed.

requestStatus

MY

1

String

successaccepted, failurefailed

The status of a request.

Asynchronous Response

...

Header

AttributeQualifierCardinalityContentValues
Header NameRequired?Description
requestIdAttributeQualifier

Accept

M

1

UUID/String

A unique Id for an ONAP transaction.

transactionId

M

1

UUID/String

A unique ID to track multiple requests associated with a transaction.

statusMessage

O

1

String

Reasoning if requestStatus is failure.

requestStatus

M

1

String

success, failure, pending

The status of a request.

solutions

M

1

Solution Object

Solutions related to a request.

Solution Object

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
placementSolutions

requestId

M

Y

1

..N

List of ComprehensiveSolution Object

A list of placement solutions.

licenseSolutions

M

1

List of LicenseSolution Object

A list of license solutions

ComprehensiveSolution Object

...

M

...

1..N

...

List of PlacementSolution Object

...

A list of placement solutions.

PlacementSolution Object

AttributeQualifier

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 failed.

requestStatus

Y

1

String

completed, failed, pending

The status of a request.

solutions

Y

1

Solution Object


Solutions related to a request.

Solution Object

AttributeRequired?CardinalityContentValuesDescription
resourceModuleName

placementSolutions

M

Y

1

String

The name of a resource as defined in the service model.

serviceResourceId

M

1

String

A resource Id as defined in a service model.

identifierType

M

1

String

service_instance_id, cloud_region_id

The type of a candidate.

identifier

M

1

String

The id of a candidate.

assignmentInfo

O

..N

List of ComprehensiveSolution Object


A list of placement solutions.

licenseSolutions

Y

1..N

List of LicenseSolution Object


A list of license solutions

ComprehensiveSolution Object

AttributeRequired?CardinalityContentValuesDescription
-

Y

1..N

List of

AssignmentInfo object

Additional information related to a candidate.

...

PlacementSolution Object


A list of placement solutions.

PlacementSolution Object

Attribute
Qualifier
Required?CardinalityContentValuesDescription
key

resourceModuleName

M

Y

1

String

An attribute name.

value

M

1

String

An attribute value.

LicenseSolutions Object


AttributeQualifierCardinalityContentValuesDescription

resourceModuleName

M

1

String

A resource name The name of a resource as defined in a the service model.

serviceResourceId

MY

1

String


A resource Id as defined in a service model.

entitlementPoolUUIDsolution

MY

1..N

List of String

A list of entitlementPoolUUIDs.

licenseKeyGroupUUID

M

Candidates Object


The placement solution

assignmentInfo

N

1..N

List of String

A list of licenseKeyGroupUUID.

entitlementPoolInvariantUUID

M

1..N

List of String

A list of entitlementPoolInvariantUUID .

licenseKeyGroupInvariantUUID

M

1..N

List of String

A list of licenseKeyGroupInvariantUUID .

HTTP Response Code

...

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.

Request Example

...

languagejs
themeEclipse
titleSO-OOF/HAS Request Example
linenumberstrue
collapsetrue

...

AssignmentInfo object


Additional information related to a candidate.

AssignmentInfo Object

AttributeRequired?CardinalityContentValuesDescription

key

Y

1

String


An attribute name.

value

Y

1

String


An attribute value.

LicenseSolutions Object

AttributeRequired?CardinalityContentValuesDescription

resourceModuleName

Y

1

String


A resource name as defined in a service.

serviceResourceId

Y

1

String


A resource Id as defined in a service.

entitlementPoolUUID

Y

1..N

List of String


A list of entitlementPoolUUIDs.

licenseKeyGroupUUID

Y

1..N

List of String


A list of licenseKeyGroupUUID.

entitlementPoolInvariantUUID

Y

1..N

List of String


A list of entitlementPoolInvariantUUID .

licenseKeyGroupInvariantUUID

Y

1..N

List of String


A list of licenseKeyGroupInvariantUUID .

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


Code Block
languagejs
themeEclipse
titleSO-OOF/HAS Request Example
linenumberstrue
collapsetrue
{
  "requestInfo": {
    "transactionId": "xxx-xxx-xxxx",
    "requestId": "yyy-yyy-yyyy",
    "callbackUrl": "https://wiki.onap.org:5000/callbackUrl/",
    "sourceId": "SO",
    "requestType": "create",
    "numSolutions": 1,
    "optimizers": ["placement"],
    "timeout": 600
  },
  "placementInfo": {
  	"requestParameters": { "customerLatitude": 32.89748, "customerLongitude": -97.040443, "customerName": "xyz" },
    "subscriberInfo": {"globalSubscriberId": "xxx-xx-xxx", "subscriberName": "subscriber_x"},
  	"placementDemands": [
    	{
      		"resourceModuleName": "vGMuxInfra",
        		"modelTypeserviceResourceId": "resourcevGMuxInfra-xx",
        		"modelVersiontenantId": "1.0vGMuxInfra-tenant",
        		"modelCustomizationNameresourceModelInfo": "vGMuxInfra-customeModelName"{
         }		"modelInvariantId": "vGMuxInfra-modelInvariantId",
      "existingCandidates": { 		"identifierTypemodelVersionId": "service_instance_idvGMuxInfra-versionId",
        		"identifiersmodelName": ["87257b49-9602-4ca1-9817-094e52bc873b"] }vGMuxInfra-model",
      "excludedCandidates": { 		"identifierTypemodelType": "service_instance_idresource", "identifiers":
["1ac71fb8-ad43-4e16-9459-c3f372b8236d"] },       		"requiredCandidatesmodelVersion": { "identifierType": "service_instance_id", "identifiers1.0",
        		"modelCustomizationName": ["7e6c3e57-62cd-44f6-aa88-d0896998f7ec"] vGMuxInfra-customeModelName"
      		}
    	},
    	{
      		"resourceModuleName": "vG",
      		"serviceResourceId": "71d563e8-e714-4393-8f99-cc480144a05e",
      		"tenantId": "vG-tenant",
      		"resourceModelInfo": {
        		"modelInvariantId": "vG-modelInvariantId",
        		"modelVersionId": "vG-versionId",
        		"modelName": "vG-model",
        		"modelType": "resource",
        		"modelVersion": "1.0",
        		"modelCustomizationName": "vG-customeModelName"
      		},
			"existingCandidates": [ 
  				{
					"identifierType": "existingCandidatesserviceInstanceId":, {
					"identifierTypecloudOwner": "service_instance_id", 
					"identifiers": ["21d5f3e8gjhd-e714098-4383fhd-8f99-cc480144505a987"]
				},
      		],
			"excludedCandidates": [ 
				{
					"identifierType": "service_instance_id"serviceInstanceId", 
					"cloudOwner": "", 
					"identifiers": ["1ac71fb8gjhd-ad43098-4e16fhd-9459-c3f372b8236d987"]
				},
      "requiredCandidates": { "identifierType				{
					"identifierType": "vimId", 
					"cloudOwner": "cloud_region_idvmware", 
					"identifiers": ["TXAUS219NYMDT67"]
				}
    }
  		],
  "serviceInfo			"requiredCandidates": {[ 
   "serviceInstanceId				{
					"identifierType": "d61b2543-5914-4b8f-8e81-81e38575b8ec",
    "serviceModelInfo": {
      "modelInvariantId": "vCPE-invariantId","vimId", 
					"cloudOwner": "amazon", 
					"identifiers": ["TXAUS219"]
				}
    		]
 "modelVersionId": "vCPE-versionId",
		}
  	]
  },
  "modelNameserviceInfo": {
    "serviceInstanceId": "vCPE-modeld61b2543-5914-4b8f-8e81-81e38575b8ec",
	"serviceName": "vCPE",
    "modelTypemodelInfo": "service",{
      "modelVersionmodelInvariantId": "1.0vCPE-invariantId",
      "modelCustomizationNamemodelVersionId": "vCPE-customeModelNameversionId"
,
   }   },
  "licenseDemandsmodelName": ["vCPE-model",
    {       "resourceModuleNamemodelType": "vGMuxInfraservice",
      "serviceResourceIdmodelVersion": "vGMuxInfra-xx1.0",
      "tenantIdmodelCustomizationName": "vGMuxInfravCPE-tenant",
customeModelName"
    }
  },
  "resourceModelInfolicenseInfo": {

       "modelInvariantIdlicenseDemands": "vGMuxInfra-modelInvariantId",[
        {
"modelVersionId": "vGMuxInfra-versionId",         "modelNameresourceModuleName": "vGMuxInfra-model",
          "modelTypeserviceResourceId": "resourcevGMuxInfra-xx",
          "modelVersionresourceModelInfo": "1.0",{
            "modelCustomizationNamemodelInvariantId": "vGMuxInfra-customeModelNamemodelInvariantId",
      },      "modelVersionId": "existingLicenses": {vGMuxInfra-versionId",
            "entitlementPoolUUIDmodelName": ["87257b49-9602-4ca1-9817-094e52bc873bvGMuxInfra-model", "43257b49-9602-4fe5-9337-094e52bc9435"],
            "licenseKeyGroupUUIDmodelType": ["87257b49-9602-4ca1-9817-094e52bc873b"resource",
  "43257b49-9602-4fe5-9337-094e52bc9435"]          "modelVersion": "1.0",
            "modelCustomizationName": "vGMuxInfra-customeModelName"
          },
     }   ]
}

Synchronous Response Example

Code Block
languagejs
themeEclipse
titleSO-OOF/HAS Response Example
linenumberstrue
collapsetrue
  "existingLicenses": {
  "transactionId": "xxx-xxx-xxxx",      "requestId": "yyy-yyy-yyyy",   "requestStatusentitlementPoolUUID": "completed["87257b49-9602-4ca1-9817-094e52bc873b", "43257b49-9602-4fe5-9337-094e52bc9435"],
 "statusMessage           "licenseKeyGroupUUID": "Success!"
}

Asynchronous Response Example

SO-
Code Block
languagejs
themeEclipse
title
["87257b49-9602-4ca1-9817-094e52bc873b", "43257b49-9602-4fe5-9337-094e52bc9435"]
          }
        }
      ]
  }
}

Synchronous Response Example


Code Block
languagejs
themeEclipse
titleSO-OOF/HAS Response Example
linenumberstrue
collapsetrue
{
  "transactionId": "xxx-xxx-xxxx",
  "requestId": "yyy-yyy-yyyy",
  "requestStatus": "completedaccepted",
  "statusMessage": "Success!",
  "solutions": {
 
}

Asynchronous Response Example


Code Block
languagejs
themeEclipse
titleSO-OOF/HAS Response Example
linenumberstrue
collapsetrue
{
  "transactionId": "xxx-xxx-xxxx",
  "placementSolutionsrequestId": ["yyy-yyy-yyyy",
  "requestStatus": "completed",
  {"statusMessage": "",
  "solutions": {
    "resourceModuleNameplacementSolutions": "vGMuxInfra", [
     [
    "serviceResourceId": "some_resource_id",  {
        "identifierTyperesourceModuleName": "service_instance_idvGMuxInfra",
        "identifierserviceResourceId": "1ac71fb8-ad43-4e16-9459-c3f372b8236dsomeResourceId",
		"solution": {
        	"assignmentInfoidentifierType": "serviceInstanceId", 
			"identifiers": ["gjhd-098-fhd-987"]
		},
        "assignmentInfo": [
          { "key": "cloudOwner", "value": "amazon" },
          { "key": "vnfHostName", "value": "ahr344gh" },
          { "key": "isRehome", "value": "False" },
          { "key": "cloud_region_id", "value": "1ac71fb8-ad43-4e16-9459-c3f372b8236d" }
        ]
      },
      {
        "resourceModuleName": "vG",
        "serviceResourceId": "some_resource_id",
        "identifierType": "cloud_region_id",
        "identifier": "2ac71fb8-ad43-4e16-9459-c3f372b8236d",
        "assignmentInfo": [
          { "key": "cloudOwner", "value": "amazon" },
    "key": "isRehome", "value": "False" },
          { "key": "cloudRegionId", "value": "1ac71fb8-ad43-4e16-9459-c3f372b8236d" }
        ]
      },
      {
        "resourceModuleName": "vG",
        "serviceResourceId": "someResourceId",
        "solution": {
        	"identifierType": "cloudRegionId", 
			"cloudOwner": "amazon", 
			"identifiers": ["gjhd-098-fhd-987"]
		},
        "assignmentInfo": [
          { "key": "cloudOwner", "value": "amazon" },
          { "key": "cloudRegionId", "value": "1ac71fb8-ad43-4e16-9459-c3f372b8236d" }
        ]
      }
     ]
    ],
    "licenseSolutions": [
      {
        "resourceModuleName": "vGMuxInfra",
        "serviceResourceId": "someResourceId",
        "entitlementPoolUUID": ["1ac71fb8-ad43-4e16-9459-c3f372b8236d", "834fc71fb8-ad43-4fh7-9459-c3f372b8236f"],
        "licenseKeyGroupUUID": ["1ac71fb8-ad43-4e16-9459-c3f372b8236d", "834fc71fb8-ad43-4fh7-9459-c3f372b8236f"],
        "entitlementPoolInvariantUUID": ["1ac71fb8-ad43-4e16-9459-c3f372b8236d", "834fc71fb8-ad43-4fh7-9459-c3f372b8236f"],
        "licenseKeyGroupInvariantUUID": ["1ac71fb8-ad43-4e16-9459-c3f372b8236d", "834fc71fb8-ad43-4fh7-9459-c3f372b8236f"]
      }
    ]
  }
}

Optimization Query Policies

To enable service-agnostic API for the OOF/HAS application, the requestParameters object is modeled as JSON blob. An OOF/HAS client is expected to send service-specific and customer-specific information in a JSON format. The API allows a client to define any object structure in a JSON blob; however, the naming conventions used in the JSON blob must be the same as defined in a service model or customer order. Which information of a JSON blob is relevant for a service and where the information is located in the JSON blob should be captured through query policies. The location of an object in a JSON blob can be specified using an xpath with dot notations as shown in the following example. These optimization query policies can be configured by either a service provider or a client.

Code Block
languagejs
themeEclipse
titleOptimization Query Policy Example
linenumberstrue
collapsetrue
{
  "service": "optimizationQueryPolicy",
  "policyName": "oofBeijing.queryPolicy_vCPE",
  "description": "Optimization query policy for vCPE",
  "templateVersion": "0.0.1",
  "version": "oofBeijing",
  "priority": "3",
  "riskType": "test",
  "riskLevel": "2",
  "guard": "False",
  "content": {
    "queryProperties": [
      { "keyattribute": "cloud_region_idlocationId", "value": "1ac71fb8-ad43-4e16-9459-c3f372b8236d" }
        ]
      }orderInfo.customerLocation"},
      ]{"attribute":"id",     "licenseSolutionsvalue": ["orderInfo.vpnInfo"},
      {"attribute":"upstreamBW", "value": "orderInfo,vpnInfo"}
    ],
    "resourceModuleNamepolicyScope": ["vGMuxInfravCPE", "US",        "serviceResourceId": "some_resource_id""INTERNATIONAL", "ip", "vGMuxInfra", "vG"],
        "entitlementPoolUUIDtype": ["1ac71fb8-ad43-4e16-9459-c3f372b8236d", "834fc71fb8-ad43-4fh7-9459-c3f372b8236f"],
        "licenseKeyGroupUUID": ["1ac71fb8-ad43-4e16-9459-c3f372b8236d", "834fc71fb8-ad43-4fh7-9459-c3f372b8236f"],
        "entitlementPoolInvariantUUID": ["1ac71fb8-ad43-4e16-9459-c3f372b8236d", "834fc71fb8-ad43-4fh7-9459-c3f372b8236f"],
        "licenseKeyGroupInvariantUUID": ["1ac71fb8-ad43-4e16-9459-c3f372b8236d", "834fc71fb8-ad43-4fh7-9459-c3f372b8236f"]
      }
    ]
  "optimizationQueryPolicy"
  }
}
Code Block
languagejs
themeEclipse
titlerequestParameter JSON blob Example
linenumberstrue
collapsetrue
{
  	"orderInfo": {
		"customerLocation": {
			"latitude": "30.98",
			"longitude": "34.23",
			"locationId": "NJBD34"
  		},
		"vpnInfo": {
			[
				"id": 200,
				"upsteamBW": "10Gbps",
				"downstreamBW": "100Gbps"
			],
			[
				"id": 200,
				"upsteamBW": "10Gbps",
				"downstreamBW": "100Gbps"
			]
		}
  	}
}


OOF/HAS API document (pdf format)

...