New translation commands for SOL006: recursive package-translate, descriptor-translate
[osm/osmclient.git] / osmclient / templates / vnfd.yaml.j2
1 # Copyright 2019 ETSI OSM
2 #
3 # All Rights Reserved.
4 #
5 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
6 #    not use this file except in compliance with the License. You may obtain
7 #    a copy of the License at
8 #
9 #         http://www.apache.org/licenses/LICENSE-2.0
10 #
11 #    Unless required by applicable law or agreed to in writing, software
12 #    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 #    License for the specific language governing permissions and limitations
15 #    under the License.
16
17 vnfd-catalog:
18     schema-version: "v3.0"
19     vnfd:
20     -   id: {{ name }}_vnfd
21         name: {{ name }}_vnfd
22         short-name: {{ name }}_vnfd
23         description: Generated by OSM package generator
24         vendor: OSM
25         version: '1.0'
26
27         {%- if detailed is sameas true %}
28         #Place the logo as png in icons directory and provide the name here
29         #logo: <update, optional>
30
31         {%- endif %}
32
33         # Management interface
34         mgmt-interface:
35             cp: vnf-cp0
36
37         # At least one VDU need to be specified
38         vdu:
39         # Additional VDUs can be created by copying the
40         # VDU descriptor below
41         -   id: {{ name }}_vnfd-VM
42             name: {{ name }}_vnfd-VM
43             description: {{ name }}_vnfd-VM
44             count: 1
45             {%- if detailed is sameas true %}
46             #pdu-type: <update, optional>
47             #mgmt-vpci: <update, optional>
48             {%- endif %}
49
50             # Flavour of the VM to be instantiated for the VDU
51             vm-flavor:
52                 vcpu-count: {{ vcpu }}
53                 memory-mb: {{ memory }}
54                 storage-gb: {{ storage }}
55
56             # Image including the full path
57             image: "{{ image }}"
58             {%- if detailed is sameas true %}
59             #image-checksum: <update, optional>
60             {%- endif %}
61
62             interface:
63             # Specify the external interfaces
64             # There can be multiple interfaces defined
65             -   name: eth0
66                 type: EXTERNAL
67                 virtual-interface:
68                     type: PARAVIRT
69                     {%- if detailed is sameas true %}
70                     #vpci: <update, optional>
71                     #bandwidth: <update, optional>
72                     {%- endif %}
73                 external-connection-point-ref: vnf-cp0
74                 {%- if detailed is sameas true %}
75                 #internal-connection-point-ref: <update, optional>
76                 #mac-address <update, optional>
77                 #mgmt-interface: <update, optional>
78                 {%- endif %}
79
80             {%- for x in range(1, interfaces + 1 ) %}
81             -   name: eth{{ x }}
82                 type: EXTERNAL
83                 virtual-interface:
84                     type: PARAVIRT
85                     {%- if detailed is sameas true %}
86                     #vpci: <update, optional>
87                     #bandwidth: <update, optional>
88                     {%- endif %}
89                 external-connection-point-ref: vnf-cp{{ x }}
90                 {%- if detailed is sameas true %}
91                 #internal-connection-point-ref: <update, optional>
92                 #mac-address <update, optional>
93                 #mgmt-interface: <update, optional>
94                 {%- endif %}
95             {%- endfor %}
96
97             {%- if detailed is sameas true %}
98             #guest-epa:
99             #    mempage-size: <update, optional>
100             #    # Choice cpu-pinning / cpu-quota
101             #    cpu-pinning-policy: <update, optional> [DEDICATED, SHARED, ANY]
102             #    cpu-thread-pinning-policy: <update, optional> [AVOID, SEPARATED, ISOLATE, PREFER]
103             #    cpu-quota:
104             #       limit: <update, optional>
105             #       reserve: <update, optional>
106             #       shares: <update, optional>
107             #    mem-quota:
108             #       limit: <update, optional>
109             #       reserve: <update, optional>
110             #       shares: <update, optional>
111             #    disk-io-quota:
112             #       limit: <update, optional>
113             #       reserve: <update, optional>
114             #       shares: <update, optional>
115             #    vif-quota:
116             #       limit: <update, optional>
117             #       reserve: <update, optional>
118             #       shares: <update, optional>
119
120             #alarm:
121             #-   alarm-id: <update>
122             #    vnf-monitoring-param-ref: <update, optional>
123             #    operation: <update, optional>
124             #    value: <update, optional>
125             #    actions:
126             #        ok:
127             #        -   url: <update>
128             #        insufficient-data:
129             #        -   url: <update>
130             #        alarm:
131             #        -   url: <update>
132             #
133             #alternative-images:
134             #-   vim-type: <update>
135             #    image: <update, optional>
136             #    image-checksum: <update, optional>
137             #
138             #vdu-configuration:
139             #    # Configure the VNF or VDU through Juju.
140             #    juju:
141             #        charm: <update, optional>
142             #        proxy: <update, optional>
143             #        vca-relationships:
144             #            relation:
145             #            -   requires: <update>
146             #                provides: <update>
147             #    config-primitive:
148             #    -   name: <update>
149             #        parameter:
150             #        -   name: <update>
151             #            data-type: <update, optional>
152             #            mandatory: <update, optional>
153             #            default-value: <update, optional>
154             #            parameter-pool: <update, optional>
155             #            read-only: <update, optional>
156             #            hidden: <update, optional>
157             #    initial-config-primitive:
158             #    -   seq: <update>
159             #        name: <update, optional>
160             #        parameter:
161             #        -   name: <update>
162             #            data-type: <update, optional>
163             #            value: <update, optional>
164             #    terminate-config-primitive:
165             #    -   seq: <update>
166             #        name: <update, optional>
167             #        parameter:
168             #        -   name: <update>
169             #            data-type: <update, optional>
170             #            value: <update, optional>
171             #    metrics:
172             #    -   name: <update>
173             #    config-access:
174             #        ssh-access:
175             #            required: <update, optional>
176             #            default-user: <update, optional>
177             #
178             #monitoring-param:
179             #-   id: <update>
180             #    nfvi-metric: <update, optional>
181             #    interface-name-ref: <update, optional>
182             #
183             ## Choice cloud-init / cloud-init-file
184             #cloud-init: <update, optional>
185             #cloud-init-file: <update, optional>
186             #supplemental-boot-data:
187             #    boot-data-drive: <update, optional>
188             #
189             #internal-connection-point:
190             #-   id: <update>
191             #    name: <update, optional>
192             #    short-name: <update, optional>
193             #    type: <update, optional>
194             #    port-security-enabled: <update, optional>
195             #    internal-vld-ref: <update, optional>
196             #
197             #interface:
198             #-   name: <update>
199             #    position: <update, optional>
200             #    mgmt-interface: <update, optional>
201             #    type: <update, optional>
202             #    mac-address: <update, optional>
203             #    # Choice: connection-point-type | internal-connection-point-ref / external-connection-point-ref
204             #    internal-connection-point-ref: <update, optional>
205             #    external-connection-point-ref: <update, optional>
206             #    virtual-interface:
207             #        type: <update, optional> # PARAVIRT,OM-MGMT,PCI-PASSTHROUGH,SR-IOV,VIRTIO,E1000,RTL8139,PCNET
208             #        vpci: <update, optional>
209             #        bandwidth: <update, optional>
210             #
211             #volumes:
212             #-   name: <update>
213             #    description: <update, optional>
214             #    size: <update, optional>
215             #    device-bus: <update, optional> # ide, usb, virtio, iscsi
216             #    device-type: <update, optional> # disk, cdrom, floopy, lun
217             #    # Choice volume-source | ephemeral / image
218             #    ephemeral: <update, optional>
219             #    image: <update, optional>
220             #    image-checksum: <update, optional>
221
222         #scaling-group-descriptor:
223         #-   name: <update>
224         #    min-instance-count: <update, optional>
225         #    max-instance-count: <update, optional>
226         #    scaling-policy:
227         #    -   name: <update>
228         #        scaling-type: <update, optional>
229         #        enabled: <update, optional>
230         #        scale-in-operator-type: <update, optional>
231         #        scale-out-operator-type: <update, optional>
232         #        threshold-time: <update, optional>
233         #        cooldown-time: <update, optional>
234         #        scaling-criteria: <update, optional>
235         #        -   name: <update>
236         #            scale-in-threshold: <update, optional>
237         #            scale-in-relational-operation: <update, optional>
238         #            scale-out-threshold: <update, optional>
239         #            scale-out-relational-operation: <update, optional>
240         #            vnf-monitoring-param-ref: <update, optional>
241         #    vdu:
242         #    -   vdu-id-ref: <update>
243         #        count: <update, optional>
244         #    scaling-config-action:
245         #    -   trigger: <update>
246         #        vnf-config-primitive-name-ref: <update, optional>
247
248         # List of monitoring params at NS level
249         #monitoring-param:
250         #-   id: <update>
251         #    name: <update, optional>
252         #    aggregation-type: <update, optional>
253         #    # Choice monitoring-type | vdu-monitoring-param / vnf-metric / vdu-metric
254         #    vdu-monitoring-param:
255         #        vdu-ref: <update, optional>
256         #        vdu-monitoring-param-ref: <update, optional>
257         #    vnf-metric:
258         #        vnfm-metric-name-ref: <update, optional>
259         #    vdu-metric:
260         #        vdu-ref: <update, optional>
261         #        vdu-metric-name-ref: <update, optional>
262         #
263         # Placement groups at VNF Level
264         #placement-groups:
265         #-   name: <update>
266         #    requirement: <update, optional>
267         #    strategy: <update, optional> # COLOCATION, ISOLATION
268         #    member-vdus:
269         #    -   member-vdu-ref: <update>
270         {%- endif %}
271         {%- if vdus > 1 %}
272         {% for y in range(1, vdus ) %}
273         -   id: {{ name }}_vnfd{{y}}-VM
274             name: {{ name }}_vnfd{{y}}-VM
275             description: {{ name }}_vnfd{{y}}-VM
276             count: 1
277             {%- if detailed is sameas true %}
278             #pdu-type: <update, optional>
279             #mgmt-vpci: <update, optional>
280             {%- endif %}
281
282             # Flavour of the VM to be instantiated for the VDU
283             vm-flavor:
284                 vcpu-count: {{ vcpu }}
285                 memory-mb: {{ memory }}
286                 storage-gb: {{ storage }}
287
288             # Image including the full path
289             image: "{{ image }}"
290             {%- if detailed is sameas true %}
291             #image-checksum: <update, optional>
292             {%- endif %}
293
294             interface:
295             # Specify the external interfaces
296             # There can be multiple interfaces defined
297             -   name: eth0
298                 type: EXTERNAL
299                 virtual-interface:
300                     type: PARAVIRT
301                     {%- if detailed is sameas true %}
302                     #vpci: <update, optional>
303                     #bandwidth: <update, optional>
304                     {%- endif %}
305                 external-connection-point-ref: vnf-cp0
306                 {%- if detailed is sameas true %}
307                 #internal-connection-point-ref: <update, optional>
308                 #mac-address <update, optional>
309                 #mgmt-interface: <update, optional>
310                 {%- endif %}
311
312             {%- for z in range(1, interfaces + 1 ) %}
313             -   name: eth{{ z }}
314                 type: EXTERNAL
315                 virtual-interface:
316                     type: PARAVIRT
317                     {%- if detailed is sameas true %}
318                     #vpci: <update, optional>
319                     #bandwidth: <update, optional>
320                     {%- endif %}
321                 external-connection-point-ref: vnf-cp{{ z }}
322                 {%- if detailed is sameas true %}
323                 #internal-connection-point-ref: <update, optional>
324                 #mac-address <update, optional>
325                 #mgmt-interface: <update, optional>
326                 {%- endif %}
327             {%- endfor %}
328         {%- endfor %}
329         {%- endif %}
330         connection-point:
331         -   name: vnf-cp0
332         {%- for x in range(1, interfaces + 1 ) %}
333         -   name: vnf-cp{{ x }}
334         {%- endfor %}