HPA - Telemetry OOF and A&AI
A&AI Schema
ComputeNode, HPACapacity schema
Modified AAI Schema
<java-type name="ComputeNodes">
<xml-properties>
<xml-property name="description" value="List of ComputeNodes in a CloudRegion"/>
</xml-properties>
<xml-root-element name="compute-nodes"/>
<java-attributes>
<xml-element container-type="java.util.ArrayList" java-attribute="computeNode" name="compute-node" type="inventory.aai.onap.org.v14.ComputeNode"/>
</java-attributes>
</java-type>
<java-type name="ComputeNode">
<xml-root-element name="compute-node"/>
<java-attributes>
<xml-element java-attribute="nodeName" name="node-name" required="true" type="java.lang.String" xml-key="true">
<xml-properties>
<xml-property name="description" value="UUID to uniquely identify a HPA capability"/>
</xml-properties>
</xml-element>
<xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String">
<xml-properties>
<xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/>
</xml-properties>
</xml-element>
<xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v14.RelationshipList"/>
<xml-element container-type="java.util.ArrayList" java-attribute="hpaCapacity" name="hpa-capacity" type="inventory.aai.onap.org.v14.HpaCapacity"/>
</java-attributes>
<xml-properties>
<xml-property name="description" value="Represents a Compute Node with HPA capacity information"/>
<xml-property name="indexedProps" value="node-name"/>
<xml-property name="dependentOn" value="cloud-region"/>
<xml-property name="container" value="compute-nodes"/>
</xml-properties>
</java-type>
<java-type name="HpaCapacity">
<xml-root-element name="hpa-capacity"/>
<java-attributes>
<xml-element java-attribute="hpaCapacityKey" name="hpa-capacity-key" required="true" type="java.lang.String" xml-key="true">
<xml-properties>
<xml-property name="description" value="Composite key formed with hpaFeature and append list of hpaFeatureAttributes needed for capacity check"/>
</xml-properties>
</xml-element>
<xml-element java-attribute="hpaCapacityValue" name="hpa-capacity-value" type="java.lang.String">
<xml-properties>
<xml-property name="description" value="JSON string specifying the capacity (total,free), unit and metadata of the specific HPA attribute"/>
</xml-properties>
</xml-element>
<xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String">
<xml-properties>
<xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/>
</xml-properties>
</xml-element>
<xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v14.RelationshipList"/>
</java-attributes>
<xml-properties>
<xml-property name="description" value="HPA Capability Feature attributes"/>
<xml-property name="indexedProps" value="hpa-attribute-key"/>
<xml-property name="dependentOn" value="hpa-capability"/>
</xml-properties>
</java-type>
Edge Relations
{
"from": "compute-node",
"to": "cloud-region",
"label": "org.onap.relationships.inventory.BelongsTo",
"direction": "OUT",
"multiplicity": "MANY2ONE",
"contains-other-v": "!${direction}",
"delete-other-v": "NONE",
"SVC-INFRA": "NONE",
"prevent-delete": "!${direction}",
"default": "true",
"description":""
},
{
"from": "compute-node",
"to": "flavor",
"label": "org.onap.relationships.inventory.AssociatedWith",
"direction": "OUT",
"multiplicity": "MANY2MANY",
"contains-other-v": "!${direction}",
"delete-other-v": "NONE",
"SVC-INFRA": "NONE",
"prevent-delete": "!${direction}",
"default": "true",
"description":""
}
Changes Required in OOF HPA constraint
Match Flavor Function (per vnfc)
For each flavor in cloud-region-flavor-list
For each hpaCapability in HPACapabilities requirement
Match hpaCapability in flavor
If matching hpaCapability found,
Check-Capacity(hpaCapacityKey, flavor, threshold).
Check-Capacity Function(input: hpaCapacityKey, flavor, threshold)
Get the compute Nodes associated with the input flavor.
getHPACapacityValue(hpaCapacityKey)
if( (free/total) < threshold): //Not enough capacity
return False and add to discard set
else:
return True and add to candidate list
getHPACapacityValue(hpaCapacityKey)
return from List of HPACapacity.get(hpaCapacityKey)
Maintain HPA JSON Metadata file in Multicloud and OOF (Most of it is static information)
"HPA_feature_qualifications"
: {
"HPA_features"
[
{
"HPA feature name": <"HPA feature name AKA HPA capability Name">
"HPA capacity matching attributes"
[
"<Attribute Name>"
}
],
"HPA capacity check attribute": <"Attribute Name">
]
}
Example configuration file:
"HPA feature qualifications"
:{
"HPA features"
: [
{"PCIePassthrough", ["pciVendorid", "pciDeviceID"], "pciCount"},
{"basicCapabilites", ["numVirtualCPU"], "numVirtualCPU"},
{"basicCapabilities", ["virtualMemSize"], "virtalMemSize:}
]
}
OOF - Generate the composite hpaCapacityKey
Examples of forming the composite key from the metadata file during capacity check.
HPAFeature | HPACapabilityAttribute | Composite hpaCapacityKey |
---|---|---|
basicCapabilities | numVirtualCpu | basicCapabilities_numVirtualCpu |
basicCapabilities | virtualMemSize | basicCapabilities_virtualMemSize |
pciePassthrough | pciVendorId pciDeviceId | pciePassthrough_${pciVendorId}_${pciDeviceId} ${VAR} - replace with the hpa-capability-attribute-value |
hugePages | memoryPageSize | hugePages_memoryPageSize_4KB hugePages_memoryPageSize_2MB hugePages_memoryPageSize_1GB |