Commit ee34f83a authored by rodriguezgar's avatar rodriguezgar Committed by Mark Beierl
Browse files

Affinity groups

parent 2451cd8f
Loading
Loading
Loading
Loading
+40 −0
Original line number Diff line number Diff line
@@ -302,6 +302,46 @@ And they can be provided with:
--config '{additionalParamsForVnf: [{member-vnf-index: "1", additionalParams: {touch_filename: your-value,  touch_filename2: your-value2}}]}'
```

### Specifying an affinity-or-anti affinity group

Affinity-or-anti-affinity groups may be defined in the VNF descriptor, in the `df` section, under `affinity-or-anti-affinity-group`.
The type may be `affinity` or `anti-affinity`, and the scope must be `nfvi-node`. VDU profiles may reference one of the defined affinity-or-anti-affinity-group. Notice that, in Openstack, only one group is allowed. The following example shows a VNF with two VDU, both assigned to the same affinity-group `affinity-group-1`. Both virtual machines will be then instantiated in the same host.

```yaml
vnfd:
  description: A basic VNF descriptor w/ two VDUs and an affinity group
  df:
  - id: default-df
    instantiation-level:
    - id: default-instantiation-level
      vdu-level:
      - number-of-instances: 1
        vdu-id: affinity_basic-VM-1
      - number-of-instances: 1
        vdu-id: affinity_basic-VM-2
    vdu-profile:
    - id: affinity_basic-VM-1
      min-number-of-instances: 1
      affinity-or-anti-affinity-group:
      - id: affinity-group-1
    - id: affinity_basic-VM-2
      min-number-of-instances: 1
      affinity-or-anti-affinity-group:
      - id: affinity-group-1
    affinity-or-anti-affinity-group:
    - id: affinity-group-1
      type: affinity
      scope: nfvi-node
```

An existing server-group may be passed as an instantiation parameter to be used as affinity-or-anti-affinity-group. In this case, the server-group will not be created, but reused, and will not be deleted when the Network Service instance is deleted. The following example shows the syntax

```yaml
 --config '{additionalParamsForVnf: [{member-vnf-index: affinity-basic-1, affinity-or-anti-affinity-group: [{ id: affinity-group-1, "vim-affinity-group-id": "81b82372-bbd4-48d6-b368-4d0b9d04d592"}]}]}'
```

Where the `id` of the `affinity-or-anti-affinity-group` is the one in the descriptor, and the `vim-affinity-group-id` is the guid of the existing server-group in Openstack to be used (instead of being created).

## Understanding Day-1 and Day-2 Operations

VNF configuration is done in three "days":