Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Incoming APIs

Policy Instance

...

#

#Example: vFW, AZ level Anti-affinity 

#two VDUs that intend to be placed in two different AZs (Anti-affinity).

#

...

Elite soft json viewer
{
  "service": “fgpsPolicy"fgpsPolicy",

  "policyName": "oofDublin.fgpsPolicy_vFW",

  "description": “FGPS"FGPS policy for vFW",

  "templateVersion": "0.0.1",

  "version": "1.0",

  "priority": "3",

  "riskType": "test",

  "riskLevel": "2",

  "guard": "False",
   "content": {
     "resources": "vFW",
     "identity": “fgpsPolicy"fgpsPolicy_vFW",

    "policyScope": [
      "vFW",
      "US",
      "INTERNATIONAL",
      "ip",
      "vFW"
    ],
     "policyType": “fgpsPolicy"fgpsPolicy",
     “groupFeatures"groupFeatures": [
       {
         "id" : "<vdu.Name>",

        "type": "tocsa.nodes.nfv.Vdu.Compute",
         "directives": [ 


          {
            "type":   "type”:”groupgroup_directives",


            "attributes": [
                  {
                    "attribute_name”:”vFWname": "vFW-Anti-affinity1”affinity1",

 
                "attribute_value": "<Blank>"

 
              }


              ]
            }
           ],
         “groupProperties"groupProperties": [

          {
             “group-name”"group-name": “vFW"vFW-Anti-affinity1”affinity1",
             “group-type”"group-type": “Anti"Anti-affinity”affinity",
             "mandatory": "True",
             “level”"level”=": “AZ”"AZ",
             “fgps"fgps-version": "v1",

            "directives": []

          }

        ]

      },

      {

        "id" : "<vdu.Name>",

        "type": "tocsa.nodes.nfv.Vdu.Compute",

        "directives": [ 


          {
            "type":   "type”:”groupgroup_directives",
              "attributes": [ 

 
              {
                    "attribute_name”:”vFWname": "vFW-Anti-affinity1”,

affinity1",
                 "attribute_value": "<Blank>"
                 }
                ]
            }

 
        ],
         “groupProperties"groupProperties": [

          {
             “group-name”"group-name": “vFW"vFW-Anti-affinity1”affinity1",
             “group-type”"group-type": “Anti"Anti-affinity”affinity",

            "mandatory": "True",
             “level”"level": “AZ”"AZ",
             “fgps"fgps-version": "v1",

            "directives": []

          }

        ]

      }

    ]

  }

}


Policy Model

Code Block
titlePolicy Model
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

...