...
- For R3, Cloud-Agnostic Workload Deployment Policy (Intent)
- Can be directly mapped to specific realization (e.g. OpenStack Flavor, Azure Instance Type) to simplify implementation.
- This policy is exactly the same as the policies with "deployment-intent" in the Cloud Selection Policy for Homing described in Section 2.
SO ↔ MC Policy API - Json Schema with use case examples as runnable python code (the same is data is sent from OOF to SO. SO transparently echoes this data to MC)
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
#
#Spec Reference: https://wiki.onap.org/display/DW/Edge+Scoping+MVP+for+Casablanca+-+ONAP+Enhancements#EdgeScopingMVPforCasablanca-ONAPEnhancements-Cloud-agnosticPlacement/Networking&HomingPolicies(Phase1-CasablancaMVP,Phase2-StretchGoal)
#
#The same information is opaquely passed from OOF to SO
#
from jsonschema import validate
so_mc_policy_api_request_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"},
"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"},
},
},
"required": ["deployment-intent"]
}
#
#Example 1: vCPE, Burstable QoS
#vCPE: Infrastructure Resource Isolation for VNF with Burstable QoS
#
so_mc_policy_api_instance1 = {
"vnfc": "vgw",
"deployment-intent": {
"Cloud Type (Cloud Provider)": "VMware VIO",
"Infrastructure Resource Isolation for VNF": "Burstable QoS",
"Infrastructure Resource Isolation for VNF - Burstable QoS Oversubscription Percentage": 25,
},
}
#
#Example 2:
#vCPE: Infrastructure Resource Isolation for VNF with Guaranteed QoS
#
so_mc_policy_api_instance2 = {
"vnfc": "vgw",
"deployment-intent": {
"Infrastructure Resource Isolation for VNF": "Guaranteed QoS",
},
}
#
#Example 3:
#vDNS: Infrastructure HA for VNF & Infrastructure Resource Isolation for VNF with Burstable QoS
#
so_mc_policy_api_instance3 = {
"vnfc": "vdns",
"deployment-intent": {
"Cloud Type (Cloud Provider)": "VMware VIO",
"Infrastructure High Availability for VNF": True,
"Infrastructure Resource Isolation for VNF": "Burstable QoS",
"Infrastructure Resource Isolation for VNF - Burstable QoS Oversubscription Percentage": 25,
},
}
#
# Example 4:
# vDNS: Infrastructure HA for VNF & Infrastructure Resource Isolation for VNF
# with Guaranteed QoS
#
so_mc_policy_api_instance4 = {
"vnfc": "vdns",
"deployment-intent": {
"Infrastructure High Availability for VNF": True,
"Infrastructure Resource Isolation for VNF": "Guaranteed QoS",
},
}
validate(so_mc_policy_api_instance1, so_mc_policy_api_request_schema)
validate(so_mc_policy_api_instance2, so_mc_policy_api_request_schema)
validate(so_mc_policy_api_instance3, so_mc_policy_api_request_schema)
validate(so_mc_policy_api_instance4, so_mc_policy_api_request_schema)
|
Follow ups:
- Use Cases for Integration testing
- vCPE
- In the current state, this use case cannot support the intent "Infra HA for VMs in a VNF"
- vDNS
- Can support intent "Infra HA for VMs in a VNF" and "Infrastructure Resource Isolation for VNF"
- Nothing additional needed in OOF or MC
- Changes needed in SO to call OOF API
- Matti to follow up with Shankar
- vCPE
- Policy DB – is there any restriction on the type of json objects that can be stored?
- Matti to follow up with Ankit
...