...
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
//flexibility of having cloud type in the new API provides fine grained control, addresses capacity/cost differences across different cloud owners/regions and ensures backward compatibility
JSON Schema with Examples: https://gerrit.onap.org/r/#/c/58531/1/usage-examples/oof-mc-r3-interface-examples.py
// OOF -> MC API REQUEST JSON SCHEMA
{
"type" : "object",
"properties" : {
# vnfc is not used in the OOF->MC path for R3, this is kept to be consistent
# with the SO-> MC path
"vnfc": {"type": "string"},
# evaluate cloud cost if set
# cost is fixed per cloud type for all workloads -- simplifying assumption for R3
# cost specified in the respective plugin through a configuration file
"cost-intent" : {"type" : "boolean"},
"deployment-intent": {"type": "object"},
"properties" : {
# Azure, K8S, OpenStack, VMware VIO, Wind River Titanium
"Cloud Type (Cloud Provider)": {"type", "string"},
"Infrastructure High Availability for VNF": {"type", "boolean"},
"Infrastructure Resource Isolation for VNF": {"type", "string"},
# Infrastructure Resource Isolation for VNF
# Only certain pre-defined over-subscription values are allowed to
# reflect practical deployment and simplify implementation for R3
"Infrastructure Resource Isolation for VNF - Burstable QoS Oversubscription Percentage": {"type": "int"},
},
# vCPU, Memory, Storage, VIMs - part of R2 capacity check
"vCPU": {"type": "number"}, # number of cores
"Memory": {"type": "number"}, # size of memory, GB
"Storage": {"type": "number"}, # size of storage, GB
"VIMs": {"type": "array"}, # VIMs OOF wish to check with
},
"required": ["cost-intent", "deployment-intent", "vCPU", "Memory", "Storage", "VIMs"]
}
// OOF -> MC API RESPONSE JSON SCHEMA
{
"cloudRegionNetValue": {
"type": "array",
"items": { "$ref": "#/definitions/xxx" }
},
"definitions": {
"xxx": {
"type": "object",
"required": [ "VIM", "netValue" ],
"properties": {
# VIM id
"VIM": {
"type": "string",
},
# For R3, netValue signifies cost per VIM id
# Referring to cost-intent in the API from OOF -> MC
# cost is fixed per cloud type for all workloads
# cost specified in the respective plugin through a configuration file
"netValue": {
"type": "number",
}
}
}
}
} |
...