Versions Compared

Key

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

...

Code Block
languagetext
titlevCPE Homing Template (YAML)
collapsetrue
---
homing_template_version: '2017-10-10'
parameters:
  service_name: Residential vCPE
  service_id: vcpe_service_id
  customer_lat: 32.89748
  customer_long: -97.040443
  REQUIRED_MEM: 4
  REQUIRED_DISK: 100
  pnf_id: some_pnf_id
locations:
  customer_loc:
    latitude:
      get_param: customer_lat
    longitude:
      get_param: customer_long
  brg_loc:
    pnf_host_name:
      get_param: pnf_id
demands:
  vGMuxInfra:
  - inventory_provider: aai
    inventory_type: service
    attributes:
      equipment_type: vG_Mux
      customer_id: some_company
    excluded_candidates:
    - candidate_id: 1ac71fb8-ad43-4e16-9459-c3f372b8236d
    existing_placement:
    - candidate_id: 21d5f3e8-e714-4383-8f99-cc480144505a
  vG:
  - inventory_provider: aai
    inventory_type: cloud
constraints:
- constraint_vgmux_customer:
    type: distance_to_location
    demands:
    - vGMuxInfra
    properties:
      distance: "< 100 km"
      location: customer_loc
- colocation:
    type: zone
    demands:
    - vGMuxInfra
    - vG
    properties:
      qualifier: same
      category: region
- hpa_constraint:
    type: hpa
    demands:
    - vG
    properties:
      evaluate:
      - label: flavor_label_1
        features:
        - hpa-feature: basicCapabilities
          hpa-version: v1
          architecture: generic
          hpa-feature-attributes:
          - hpa-attribute-key: numVirtualCpu
            hpa-attribute-value: '4'
            operator: "="
          - hpa-attribute-key: virtualMemSize
            hpa-attribute-value: '4'
            operator: "="
            unit: GB
        - hpa-feature: numa
          hpa-version: v1
          architecture: generic
          hpa-feature-attributes:
          - hpa-attribute-key: numaNodes
            hpa-attribute-value: '2'
            operator: "="
          - hpa-attribute-key: numaCpu-0
            hpa-attribute-value: '2'
            operator: "="
          - hpa-attribute-key: numaCpu-1
            hpa-attribute-value: '4'
            operator: "="
          - hpa-attribute-key: numaMem-0
            hpa-attribute-value: '2'
            operator: "="
            unit: GB
          - hpa-attribute-key: numaMem-1
            hpa-attribute-value: '4'
            operator: "="
            unit: GB
        - hpa-feature: cpuPinning
          hpa-version: v1
          architecture: generic
          hpa-feature-attributes:
          - hpa-attribute-key: logicalCpuThreadPinningPolicy
            hpa-attribute-value: prefer
            operator: "="
          - hpa-attribute-key: logicalCpuPinningPolicy
            hpa-attribute-value: dedicated
            operator: "="
      - label: flavor_label_2
        features:
        - hpa-feature: basicCapabilities
          hpa-version: v1
          architecture: generic
          hpa-feature-attributes:
          - hpa-attribute-key: numVirtualCpu
            hpa-attribute-value: '8'
            operator: "="
          - hpa-attribute-key: virtualMemSize
            hpa-attribute-value: '16'
            operator: "="
            unit: GB
        - hpa-feature: numa
          hpa-version: v1
          architecture: generic
          hpa-feature-attributes:
          - hpa-attribute-key: numaNodes
            hpa-attribute-value: '2'
            operator: "="
          - hpa-attribute-key: numaCpu-0
            hpa-attribute-value: '2'
            operator: "="
          - hpa-attribute-key: numaCpu-1
            hpa-attribute-value: '4'
            operator: "="
          - hpa-attribute-key: numaMem-0
            hpa-attribute-value: '2'
            operator: "="
            unit: GB
          - hpa-attribute-key: numaMem-1
            hpa-attribute-value: '4'
            operator: "="
            unit: GB
        - hpa-feature: memoryPageSize
          hpa-version: v1
          architecture: generic
          hpa-feature-attributes:
          - hpa-attribute-key: memoryPageSize
            hpa-attribute-value: '2'
            operator: "="
            unit: GB
- cloud_min_guarantee:
    type: attribute
    demands:
    - vG
    properties:
      evaluate:
        cpu_min_guarantee: true
        mem_min_guarantee: true
- check_cloud_capacity: 
    type: vim_fit
    demands:
    - vG
    properties:
      controller: multicloud
      request:
        vCPU: 10
        Memory:
          quantity:
            get_param: REQUIRED_MEM
          unit: GB
        Storage:
          quantity:
            get_param: REQUIRED_DISK
          unit: GB
optimization:
  minimize:
    sum:
    - distance_between:
      - customer_loc
      - vGMuxInfra
    - distance_between:
      - customer_loc
      - vG

HAS Homing Response

...

State - Done

Code Block
languagejs
titlevCPE homing response (JSON)
collapsetrue
{
  "plans": [
    {
      "status": "solved",
      "id": "plan_id",
      "name": "Plan Name 1",
      "links": [
        [
          {
            "href": "http://conductor:8091/v1/plans/plan_id",
            "rel": "self"
          }
        ]
      ],
      "recommendations": [
        {
          "vG": {
            "inventory_provider": "aai",
            "candidate": {
              "candidate_id": "DLLSTX1A",
              "cloud_owner": "CloudOwner1",
              "inventory_type": "cloud",
              "location_id": "DLLSTX1A",
              "location_type": "openstack-cloud"
            },
            "attributes": {
              "flavors": {
                "flavor_label_1": "vim_flavor_X",
                "flavor_label_2": "vim_flavor_Y"
              },
              "cloud_owner": "CloudOwner1",
              "physical-location-id": "DLLSTX1A",
              "cloud_version": "3.0"
            }
          }
        },
        {
          "vGMuxInfra": {
            "attributes": {
              "host_id": "vgmux_host_name",
              "cloud_owner": "CloudOwner1",
              "physical-location-id": "DLLSTX1A",
              "service_instance_id": "21d5f3e8-e714-4383-8f99-cc480144505a",
              "cloud_version": "3.0"
            },
            "inventory_provider": "aai",
            "service_resource_id": "12345",
            "candidate": {
              "is_rehome": "false",
              "location_id": "DLLSTX1A",
              "inventory_type": "service",
              "candidate_id": "21d5f3e8-e714-4383-8f99-cc480144505a",
              "host_id": "vgmux_host_name",
              "cloud_owner": "CloudOwner1",
              "location_type": "openstack-cloud"
            }
          }
        }
      ]
    }
  ]
}


State - Error: 

Code Block
languagejs
titleHAS Error Response
collapsetrue
{
  "plans": [
    {
      "status": "error",
      "message": "Some error message",
      "name": "Plan Name 1",
      "links": [
        [
          {
            "href": "http://conductor:8091/v1/plans/plan_id",
            "rel": "self"
          }
        ]
      ],
      "id": "plan_id"
    }
  ]
}


State - Template: 

Code Block
languagejs
titleHAS Plan in Template State
{
  "status": "template",
  "name": "Plan Name 1",
  "links": [
    [
      {
        "href": "http://conductor:8091/v1/plans/plan_id",
        "rel": "self"
      }
    ]
  ],
  "id": "plan_id"
}