...
Code Block | ||||
---|---|---|---|---|
| ||||
parameters: availability_zone_1: type: string description: First AZ name VDU_name_1: type: string description: First VDU id or name flavor_1: type:string description: Flavor for VDU_1 group_1: type: string description: Affinity or Anti-affinity name for VDU_1 availability_zone_2: type: string description: Second AZ name VDU_name_2: type: string description: Second VDU id or name flavor_2: type:string description: Flavor for VDU_2 group_2: type: string description: Affinity or Anti-affinity name for VDU_2 resources: VDU_1: type: ONAP::FGPS::VDU properties: name: { get_param: VDU_name_1 } flavor: { get_param: flavor_1} availability_zone: { availability_zone_1 } // initially, empty and FGPS will set up value metadata: valet_groups: { get_param: group_1 } // this is the Affinity or Anti-affinity name to be used for VDU VDU_2: type: ONAP::FGPS::VDU properties: name: { get_param: VDU_name_2 } flavor: { get_param: flavor_2} availability_zone: { availability_zone_2 } metadata: valet_groups: { get_param: group_2 } |
Incoming APIs
Policy Instance
Elite soft json viewer |
---|
#
#Example: vFW, AZ level Anti-affinity
#two VDUs that intend to be placed in two different AZs (Anti-affinity).
#
{
"service": “fgpsPolicy",
"policyName": "oofDublin.fgpsPolicy_vFW",
"description": “FGPS policy for vFW",
"templateVersion": "0.0.1",
"version": "1.0",
"priority": "3",
"riskType": "test",
"riskLevel": "2",
"guard": "False",
"content": {
"resources": "vFW",
"identity": “fgpsPolicy_vFW",
"policyScope": ["vFW", "US", "INTERNATIONAL", "ip", "vFW"],
"policyType": “fgpsPolicy",
“groupFeatures": [
{
"id" : "<vdu.Name>",
"type":"tocsa.nodes.nfv.Vdu.Compute",
"directives":[
{
"type”:”group_directives",
"attributes":[
{
"attribute_name”:”vFW-Anti-affinity1”,
"attribute_value": "<Blank>"
}
]
}
],
“groupProperties": [
{
“group-name”: “vFW-Anti-affinity1”,
“group-type”: “Anti-affinity”,
"mandatory": "True",
“level”: “AZ”,
“fgps-version": "v1",
"directives": []
}
]
},
{
"id" : "<vdu.Name>",
"type":"tocsa.nodes.nfv.Vdu.Compute",
"directives":[
{
"type”:”group_directives",
"attributes":[
{
"attribute_name”:”vFW-Anti-affinity1”,
"attribute_value": "<Blank>"
}
]
}
],
“groupProperties": [
{
“group-name”: “vFW-Anti-affinity1”,
“group-type”: “Anti-affinity”,
"mandatory": "True",
“level”: “AZ”,
“fgps-version": "v1",
"directives": []
}
]
}
]
}
} |
Policy Model
Code Block | ||
---|---|---|
| ||
tosca_definitions_version: tosca_simple_yaml_1_0_0
node_types:
policy.nodes.fgpsPolicy:
derived_from: policy.nodes.Root
properties:
policyScope:
type: list
description: scope where the policy is applicable
required: true
matchable: true
entry_schema:
type: string
policyType:
type: list
description: type of a policy
required: true
matchable: true
entry_schema:
type: string
consraints:
- valid_values:
- fgps
resources:
type: list
required: true
entry_schema:
type: string
identity:
type: string
required: true
groupFeatures:
type: list
required: true
entry_schema:
type:policy.data.groupFeatures_properties
data_types:
policy.data.groupFeatures_properties:
derived_from: tosca.nodes.Root
properties:
group-name:
type: string
required: true
type:
type: string
required: true
directives:
type: list
required: true
entry_schema:
type: policy.data.directives_properties
groupProperties:
type: list
required: true
entry_schema:
type: policy.data.groupProperties_properties
policy.data.directives_properties:
derived_from: tosca.nodes.Root
properties:
type:
type: string
attributes:
type: list
entry_schema:
type: policy.data.directives_attributes_properties
policy.data.directives_attributes_properties:
derived_from: tosca.nodes.Root
properties:
attribute_name:
type: string
attribute_value:
type: string
policy.data.groupProperties_properties:
derived_from: tosca.nodes.Root
properties:
group-name:
type: string
required: true
group-type:
type: string
required: true
mandatory:
type: string
required: true
level:
type: string
required: false
fgps-version:
type: string
required: true
directives:
type: list
required: true
entry_schema:
type: policy.data.directives_properties |
MultiCloud
Elite soft json viewer |
---|
{
"cloud-owner": string, //cloud owner name/ID
"cloud-region-id": string, //cloud region ID
“available-zones”: [
{
"availability-zone-name": string, //name of available zone
"vCPU": int, // number of cores for this AZ
"Memory": float, // size of memory, GB for this AZ
"Storage": int, //GB for this AZ
},
{
"availability-zone-name": string, //name of available zone
"vCPU": int, // number of cores for this AZ
"Memory": float, // size of memory, GB for this AZ
"Storage": int, //GB for this AZ
}
]
} |