OOF/HAS Create/Update API
Interface Defintion | Description |
---|---|
URI | https://{host}:{port}/api/oof/v1/placement |
Operation Type | POST |
Content-Type | application/json |
Request Header
Header Name | Required? | 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
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
requestInfo | Y | 1 | RequestInfo Object | The content of the RequestInfo object. | |
placementInfo | Y | 1 | PlacementInfo Object | The Content of the PlacementInfo object. | |
licenseInfo | N | 1 | LicenseInfo Object | The Content of the LicenseInfo object. | |
serviceInfo | Y | 1 | ServiceInfo Object | The Content of the ServiceInfo 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 | Y | 1 | Integer | A tolerance window (in secs) for expecting solutions. |
PlacementInfo Object
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
requestParameters | Y | 1 | JSON BLOB | A JSON object conaining service and customer-specific data. A client or service designer is required to specify the location of information in the JSON blob through optimization query policies. | |
placementDemands | Y | 1..N | List of PlacementDemand Object | The resource information for a placement service. |
PlacementDemand Object
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
resourceModuleName | Y | 1 | String | A resource name as defined in a service model. | |
serviceResourceId | Y | 1 | String | A unique resource Id with a local scope between client and OOF. | |
tenantId | N | 1 | String | A tenant Id as defined in the ordering system. | |
resourceModelInfo | Y | 1 | ModelMetaData Object | Resource model information as defined in SDC. | |
existingCandidates | N | 1 | Candidates Object | The existing placement information of a resource. | |
excludedCandidates | N | 1 | Candidates Object | Candidates that need to be excluded from solutions. | |
requiredCandidates | N | 1 | Candidates Object | Candidates that must be included in solutions. |
ModelMetaData Object
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
modelInvariantId | Y | 1 | String | A model invariant Id as defined in a service model. | |
modelVersionId | Y | 1 | String | A unique model Id as defined in a service model. | |
modelName | N | 1 | String | A model 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
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
identifierType | Y | 1 | String | service_instance_id, vnf_name, cloud_region_id | The type of a candidate. |
identifiers | Y | 1..N | List of Strings | A list of identifiers. |
ServiceInfo Object
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
serviceInstanceId | Y | 1 | String | A service instance id associated with a request. | |
serviceModelInfo | Y | 1 | ModelMetaData Object | A list of identifiers. |
LicenseInfo Object
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
licenseDemands | Y | 1..N | List of LicenseDemands Object | A list of resources for license selection. |
LicenseDemands Object
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
resourceModuleName | Y | 1 | String | A resource name as defined in a service model. | |
serviceResourceId | Y | 1 | String | A unique resource Id with a local scope between client and OOF. | |
resourceModelInfo | Y | 1 | ModelMetaData Object | Resource model information as defined in a service model. | |
existingLicenses | N | 1 | LicenseModel Object | Existing license information assigned to a resource. |
LicenseModel Object
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
entitlementPoolUUID | Y | 1..N | List of Strings | Entitlement pool UUIDs associated with a resource. | |
licenseKeyGroupUUID | Y | 1..N | List of Strings | License key groups associated with a resource. |
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 | success, failure | The status of a request. |
Asynchronous Response Header
Header Name | Required? | 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. |
Attribute | N | Attribute 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
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 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
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
placementSolutions | Y | 1..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
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
- | Y | 1..N | List of PlacementSolution Object | A list of placement solutions. |
PlacementSolution Object
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
resourceModuleName | Y | 1 | String | The name of a resource as defined in the service model. | |
serviceResourceId | Y | 1 | String | A resource Id as defined in a service model. | |
identifierType | Y | 1 | String | service_instance_id, cloud_region_id | The type of a candidate. |
identifier | Y | 1 | String | The id of a candidate. | |
assignmentInfo | N | 1..N | List of AssignmentInfo object | Additional information related to a candidate. |
AssignmentInfo Object
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
key | Y | 1 | String | An attribute name. | |
value | Y | 1 | String | An attribute value. |
LicenseSolutions Object
Attribute | Required? | Cardinality | Content | Values | Description |
---|---|---|---|---|---|
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 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. |
Request Example
Synchronous Response Example
Asynchronous Response Example
OOF/HAS API document (pdf format)