Commit 8241d584 authored by Alfonso Tierno's avatar Alfonso Tierno Committed by lavado
Browse files

new a package with several vdu replicas



One vdu contains count=2 (two instnaces), the same for the scaling
It includes forcing IP address and mac address
It includes cloud init parsing OSM variable jinja2 example
Signed-off-by: Alfonso Tierno's avatartierno <alfonso.tiernosepulveda@telefonica.com>
parent c5d2d31b
nsd-catalog:
nsd:
- id: vdu-replicas-ns
name: vdu-replicas-ns
short-name: vdu-replicas-ns
description: NS with 2 VNFs connected by datanet and mgmtnet VLs
version: '1.0'
logo: osm.png
constituent-vnfd:
- vnfd-id-ref: vdu-replicas-vnf
member-vnf-index: 'vnf1'
- vnfd-id-ref: vdu-replicas-vnf
member-vnf-index: 'vnf2'
vld:
- id: mgmtnet
name: mgmtnet
short-name: mgmtnet
type: ELAN
mgmt-network: true
vnfd-connection-point-ref:
- vnfd-id-ref: vdu-replicas-vnf
member-vnf-index-ref: 'vnf1'
vnfd-connection-point-ref: vnf-mgmt
- vnfd-id-ref: vdu-replicas-vnf
member-vnf-index-ref: 'vnf2'
vnfd-connection-point-ref: vnf-mgmt
- id: datanet
name: datanet
short-name: datanet
type: ELAN
vnfd-connection-point-ref:
- vnfd-id-ref: vdu-replicas-vnf
member-vnf-index-ref: 'vnf1'
vnfd-connection-point-ref: vnf-data
- vnfd-id-ref: vdu-replicas-vnf
member-vnf-index-ref: 'vnf2'
vnfd-connection-point-ref: vnf-data
#cloud-config
password: osm4u
chpasswd: { expire: False }
ssh_pwauth: True
write_files:
- content: |
# Example of jinja2 template for parsing OSM variables
I am vdu_id='{{ OSM.vdu_id }}' count_index='{{ OSM.count_index }}' ip_address='{{ OSM.ip_address|default('not set') }}'
Parameters:
ns_id: {{ OSM.ns_id }}
vnf_id: {{ OSM.vnf_id }}
member_vnf_index: {{ OSM.member_vnf_index }}
list of vdus:{% for vdu_id_index,vdu in OSM.vdu.items() %}
vdu {{ vdu_id_index }}:
vdu_id: {{ vdu.vdu_id }}
count_index: {{ vdu.count_index }}
ip_address: {{ vdu.ip_address|default('not set') }}
interfaces:{% for iface_id,iface in vdu.interfaces.items() %}
iface='{{ iface_id }}' ip_address='{{ iface.ip_address|default('no ip') }} mac_adress={{ iface.mac_address|default('no mac') }}'{% endfor %}
{% endfor %}
global variable OSM:
"""{{ OSM|default('OSM variable is not defined') }}"""
owner: ubuntu:ubuntu
permissions: '0644'
path: /home/ubuntu/helloworld.txt
vnfd-catalog:
vnfd:
- id: vdu-replicas-vnf
name: vdu-replicas-vnf
short-name: vdu-replicas-vnf
version: '1.0'
description: A VNF with 2 replicas of vdu, internal vld and scaling
logo: osm.png
connection-point:
- name: vnf-mgmt
- name: vnf-data
mgmt-interface:
cp: vnf-mgmt
internal-vld:
- id: internal
name: internal
type: ELAN
internal-connection-point:
- id-ref: mgmtVM-internal
- id-ref: dataVM-internal
- id: interdata
name: interdata
type: ELAN
ip-profile-ref: interdataip
internal-connection-point:
- id-ref: dataVM-interdata
ip-address: 192.168.101.20
ip-profiles:
- name: interdataip
description: internal data
ip-profile-params:
ip-version: ipv4
subnet-address: 192.168.101.0/24
dhcp-params:
enabled: false
vdu:
- id: mgmtVM
name: mgmtVM
image: ubuntu18.04
count: 1
vm-flavor:
vcpu-count: 1
memory-mb: 2048
storage-gb: 10
interface:
- name: mgmtVM-eth0
position: 1
type: EXTERNAL
virtual-interface:
type: PARAVIRT
external-connection-point-ref: vnf-mgmt
- name: mgmtVM-eth1
position: 2
type: INTERNAL
virtual-interface:
type: PARAVIRT
internal-connection-point-ref: mgmtVM-internal
internal-connection-point:
- id: mgmtVM-internal
cloud-init-file: cloud-config.txt
- id: dataVM
name: dataVM
image: ubuntu18.04
count: 2
vm-flavor:
vcpu-count: 1
memory-mb: 2048
storage-gb: 10
interface:
- name: dataVM-eth0
position: 1
type: INTERNAL
virtual-interface:
type: PARAVIRT
internal-connection-point-ref: dataVM-internal
mgmt-interface: True
- name: dataVM-eth1
position: 2
type: INTERNAL
virtual-interface:
type: PARAVIRT
internal-connection-point-ref: dataVM-interdata
mac-address: "00:11:22:33:aa:20"
- name: dataVM-xe0
position: 3
type: EXTERNAL
virtual-interface:
type: PARAVIRT
external-connection-point-ref: vnf-data
internal-connection-point:
- id: dataVM-internal
- id: dataVM-interdata
cloud-init-file: cloud-config.txt
scaling-group-descriptor:
- max-instance-count: 10
name: scale_dataVM
vdu:
- count: 2
vdu-id-ref: dataVM
vnf-configuration:
config-access:
ssh-access:
default-user: ubuntu
required: true
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment