openmano first code upload
[osm/RO.git] / vnfs / vnf-template-2vm.yaml
1 ---\r
2 vnf:\r
3     name: TEMPLATE-2VM\r
4     description: This is a template to help in the creation of multi-VM VNFs\r
5     # class: parent      # Optional. Used to organize VNFs\r
6     internal-connections:\r
7     -   name:        datanet\r
8         description: datanet\r
9         type:        data\r
10         elements:\r
11         -   VNFC:             VirtualMachine-1\r
12             local_iface_name: xe0\r
13         -   VNFC:             VirtualMachine-2\r
14             local_iface_name: xe0\r
15     -   name:        controlnet\r
16         description: controlnet\r
17         type:        bridge\r
18         elements:\r
19         -   VNFC:             VirtualMachine-1\r
20             local_iface_name: ge0\r
21         -   VNFC:             VirtualMachine-2\r
22             local_iface_name: ge0\r
23     external-connections:\r
24     -   name:              mgmt0\r
25         type:              mgmt              # "mgmt" (autoconnect to management net), "bridge", "data"\r
26         VNFC:              VirtualMachine-1  # Virtual Machine this interface belongs to\r
27         local_iface_name:  mgmt0             # interface name inside this Virtual Machine (must be defined in the VNFC section)\r
28         description:       Management interface 1\r
29     -   name:              mgmt1\r
30         type:              mgmt              # "mgmt" (autoconnect to management net), "bridge", "data"\r
31         VNFC:              VirtualMachine-2  # Virtual Machine this interface belongs to\r
32         local_iface_name:  mgmt0             # interface name inside this Virtual Machine (must be defined in the VNFC section)\r
33         description:       Management interface 2\r
34     -   name:              data0\r
35         type:              data              # "mgmt" (autoconnect to management net), "bridge", "data"\r
36         VNFC:              VirtualMachine-1  # Virtual Machine this interface belongs to\r
37         local_iface_name:  xe1               # interface name inside this Virtual Machine (must be defined in the VNFC section)\r
38         description:       Data interface 1\r
39     -   name:              data1\r
40         type:              data              # "mgmt" (autoconnect to management net), "bridge", "data"\r
41         VNFC:              VirtualMachine-2  # Virtual Machine this interface belongs to\r
42         local_iface_name:  xe1               # interface name inside this Virtual Machine (must be defined in the VNFC section)\r
43         description:       Data interface 2\r
44     VNFC:                              # Virtual machine array \r
45     # First Virtual Machine\r
46     -   name:        VirtualMachine-1       # name of Virtual Machine\r
47         description: VM 1 in the MultiVM template\r
48         VNFC image: /path/to/imagefolder/TEMPLATE-2VM-VM1.qcow2\r
49         # image metadata: {"bus":"ide", "os_type":"windows", "use_incremental": "no" } #Optional\r
50         # processor:                     #Optional\r
51         #     model: Intel(R) Xeon(R) CPU E5-4620 0 @ 2.20GHz\r
52         #     features: ["64b", "iommu", "lps", "tlbps", "hwsv", "dioc", "ht"]\r
53         # hypervisor:                    #Optional\r
54         #     type: QEMU-kvm\r
55         #     version: "10002|12001|2.6.32-358.el6.x86_64"\r
56         # vcpus: 1          # Only for traditional cloud VMs. Number of virtual CPUs (oversubscription is allowed).\r
57         # ram: 1024         # Only for traditional cloud VMs. Memory in MBytes (not from hugepages, oversubscription is allowed)\r
58         # disk: 10          # disk size in GiB, by default 1\r
59         numas: \r
60         -   paired-threads: 5          # "cores", "paired-threads", "threads"\r
61             paired-threads-id: [ [0,1], [2,3], [4,5], [6,7], [8,9] ] # By default follows incremental order\r
62             memory: 14                 # GBytes\r
63             interfaces:\r
64             -   name:      xe0\r
65                 vpci:      "0000:00:11.0"     \r
66                 dedicated: "yes"         # "yes"(passthrough), "no"(sriov with vlan tags), "yes:sriov"(sriovi, but exclusive and without vlan tag)\r
67                 bandwidth: 10 Gbps\r
68                 #mac_address: '20:33:45:56:77:44' #avoid this option if possible\r
69             -   name:      xe1\r
70                 vpci:      "0000:00:12.0"\r
71                 dedicated: "yes"\r
72                 bandwidth: 10 Gbps\r
73                 #mac_address: '20:33:45:56:77:45' #avoid this option if possible\r
74         bridge-ifaces:\r
75         -   name:      mgmt0\r
76             vpci:      "0000:00:09.0"  # Optional. Virtual PCI address \r
77             bandwidth: 1 Mbps          # Optional. Informative only\r
78             # mac_address: '20:33:45:56:77:46' #avoid this option if possible\r
79             # model:       'virtio'      # ("virtio","e1000","ne2k_pci","pcnet","rtl8139") By default, it is automatically filled by libvirt\r
80         -   name:      ge0\r
81             vpci:      "0000:00:10.0"\r
82             bandwidth: 1 Mbps\r
83             # mac_address: '20:33:45:56:77:47' # avoid this option if possible\r
84             # model:       'virtio'            # ("virtio","e1000","ne2k_pci","pcnet","rtl8139") By default, it is automatically filled by libvirt\r
85         devices:                       # Optional, order determines device letter asignation (hda, hdb, ...)\r
86         -   type:      disk            # "disk","cdrom","xml"\r
87             image:     /path/to/imagefolder/SECOND-DISK.qcow2\r
88             # image metadata: {"bus":"ide", "os_type":"windows", "use_incremental": "no" }\r
89             # vpci:      "0000:00:03.0"   # Optional, not for disk or cdrom\r
90         -   type:      cdrom\r
91             image:     /path/to/imagefolder/CDROM-IMAGE.qcow2\r
92             # image metadata: {"bus":"ide", "os_type":"windows", "use_incremental": "no" }\r
93         -   type:      xml\r
94             image:     /path/to/imagefolder/ADDITIONAL-DISK.qcow2   # Optional, depending on the device type\r
95             image metadata: {"bus":"ide", "os_type":"windows", "use_incremental": "no" }  # Optional, depending on the device type\r
96             vpci:      "0000:00:03.0"                          # Optional, depending on the device type (not needed for disk or cdrom)\r
97             xml:   '   xml text for XML described devices. Do not use single quotes inside\r
98                        The following words, if found, will be replaced:\r
99                        __file__    by image path, (image must be provided)\r
100                        __format__  by qcow2 or raw (image must be provided)\r
101                        __dev__     by device letter (b, c, d ...) \r
102                        __vpci__    by vpci (vpci must be provided)\r
103                    '\r
104     # Second Virtual Machine\r
105     -   name:        VirtualMachine-2       # name of Virtual Machine\r
106         description: VM 2 in the MultiVM template\r
107         VNFC image: /path/to/imagefolder/TEMPLATE-2VM-VM1.qcow2   # In this case, it is the same as VirtualMachine-1, but it could have been different\r
108         # image metadata: {"bus":"ide", "os_type":"windows", "use_incremental": "no" } #Optional\r
109         # processor:                     #Optional\r
110         #     model: Intel(R) Xeon(R) CPU E5-4620 0 @ 2.20GHz\r
111         #     features: ["64b", "iommu", "lps", "tlbps", "hwsv", "dioc", "ht"]\r
112         # hypervisor:                    #Optional\r
113         #     type: QEMU-kvm\r
114         #     version: "10002|12001|2.6.32-358.el6.x86_64"\r
115         # vcpus: 1          # Only for traditional cloud VMs. Number of virtual CPUs (oversubscription is allowed).\r
116         # ram: 1024         # Only for traditional cloud VMs. Memory in MBytes (not from hugepages, oversubscription is allowed)\r
117         # disk: 10          # disk size in GiB, by default 1\r
118         numas:\r
119         -   paired-threads: 5          # "cores", "paired-threads", "threads"\r
120             paired-threads-id: [ [0,1], [2,3], [4,5], [6,7], [8,9] ] # By default follows incremental order\r
121             memory: 14                 # GBytes\r
122             interfaces:\r
123             -   name:      xe0\r
124                 vpci:      "0000:00:11.0"\r
125                 dedicated: "yes"         # "yes"(passthrough), "no"(sriov with vlan tags), "yes:sriov"(sriovi, but exclusive and without vlan tag)\r
126                 bandwidth: 10 Gbps\r
127                 #mac_address: '20:33:45:56:77:44' #avoid this option if possible\r
128             -   name:      xe1\r
129                 vpci:      "0000:00:12.0"\r
130                 dedicated: "yes"\r
131                 bandwidth: 10 Gbps\r
132                 #mac_address: '20:33:45:56:77:45' #avoid this option if possible\r
133         bridge-ifaces:\r
134         -   name:      mgmt0\r
135             vpci:      "0000:00:09.0"    # Optional\r
136             bandwidth: 1 Mbps          # Optional, informative only\r
137             # mac_address: '20:33:45:56:77:46' #avoid this option if possible\r
138             # model:       'virtio'      # ("virtio","e1000","ne2k_pci","pcnet","rtl8139") By default, it is automatically filled by libvirt\r
139         -   name:      ge0\r
140             vpci:      "0000:00:10.0"\r
141             bandwidth: 1 Mbps\r
142             # mac_address: '20:33:45:56:77:47' #avoid this option if possible\r
143             # model:       'virtio'      # ("virtio","e1000","ne2k_pci","pcnet","rtl8139") By default, it is automatically filled by libvirt\r
144         devices:                       # Optional, order determines device letter asignation (hda, hdb, ...)\r
145         -   type:      disk            # "disk","cdrom","xml"\r
146             image:     /path/to/imagefolder/SECOND-DISK.qcow2\r
147             # image metadata: {"bus":"ide", "os_type":"windows", "use_incremental": "no" }\r
148             # vpci:      "0000:00:03.0"   # Optional, not for disk or cdrom\r
149         -   type:      cdrom\r
150             image:     /path/to/imagefolder/CDROM-IMAGE.qcow2\r
151             #image metadata: {"bus":"ide", "os_type":"windows", "use_incremental": "no" }\r
152         -   type:      xml\r
153             image:     /path/to/imagefolder/ADDITIONAL-DISK.qcow2   # Optional, depending on the device type\r
154             image metadata: {"bus":"ide", "os_type":"windows", "use_incremental": "no" }  # Optional, depending on the device type\r
155             vpci:      "0000:00:03.0"                          # Optional, depending on the device type (not needed for disk or cdrom)\r
156             xml:   '   xml text for XML described devices. Do not use single quotes inside\r
157                        The following words, if found, will be replaced:\r
158                        __file__    by image path, (image must be provided)\r
159                        __format__  by qcow2 or raw (image must be provided)\r
160                        __dev__     by device letter (b, c, d ...)\r
161                        __vpci__    by vpci (vpci must be provided)\r
162                    '\r
163     # Additional Virtual Machines can be included here\r
164 \r