Fix bug 1721: charms can include reference to .charm files
[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:
18   id: {{ name }}_vnfd
19   product-name: {{ name }}_vnfd
20   description: Generated by OSM package generator
21   provider: OSM
22   version: '1.0'
23   mgmt-cp: vnf-cp0-ext
24   virtual-storage-desc:
25   - id: {{ name }}_vnfd-VM-storage
26     size-of-storage: {{ storage }}
27     {%- if detailed is sameas true %}
28     #disk-io-quota:
29     #  limit: <update, optional>
30     #  reserve: <update, optional>
31     #  shares: <update, optional>
32     {%- endif %}
33   virtual-compute-desc:
34   - id: {{ name }}_vnfd-VM-compute
35     virtual-cpu:
36       num-virtual-cpu: {{ vcpu }}
37       {%- if detailed is sameas true %}
38       #pinning:
39       #  # Choice cpu-pinning / cpu-quota
40       #  policy: <update, optional> [dynamic, static]
41       #  thread-policy: <update, optional> [AVOID, SEPARATED, ISOLATE, PREFER]
42       #  cpu-quota:
43       #    limit: <update, optional>
44       #    reserve: <update, optional>
45       #    shares: <update, optional>
46       {%- endif %}
47     virtual-memory:
48       size: {{ memory }}
49       {%- if detailed is sameas true %}
50       #guest-epa:
51       #  mempage-size: <update, optional>
52       #  mem-quota:
53       #    limit: <update, optional>
54       #    reserve: <update, optional>
55       #    shares: <update, optional>
56       {%- endif %}
57   sw-image-desc:
58   - id: "{{ image }}"
59     name: "{{ image }}"
60     image: "{{ image }}"
61   {%- if detailed is sameas true %}
62   #-  id: <update>
63   #   name: <update, optional>
64   #   image: <update, optional>
65   #   vim-type: <update>
66   {%- endif %}
67   df:
68   - id: default-df
69     instantiation-level:
70     - id: default-instantiation-level
71       vdu-level:
72       - vdu-id: {{ name }}_vnfd-VM
73         number-of-instances: 1
74     vdu-profile:
75     - id: {{ name }}_vnfd-VM
76       min-number-of-instances: 1
77       max-number-of-instances: 1
78     {%- if detailed is sameas true %}
79     #lcm-operations-configuration:
80     #  operate-vnf-op-config:
81     #    day1-2:
82     #    - id: {{ name }}_vnfd-VM
83     #      # Configure the VNF or VDU through Juju.
84     #      juju:
85     #        charm: <update, optional>
86     #        proxy: <update, optional>
87     #        vca-relationships:
88     #          relation:
89     #          - requires: <update>
90     #            provides: <update>
91     #      config-primitive:
92     #      - name: <update>
93     #        parameter:
94     #        - name: <update>
95     #          data-type: <update, optional>
96     #          mandatory: <update, optional>
97     #          default-value: <update, optional>
98     #          parameter-pool: <update, optional>
99     #          read-only: <update, optional>
100     #          hidden: <update, optional>
101     #      initial-config-primitive:
102     #      - seq: <update>
103     #        name: <update, optional>
104     #        parameter:
105     #        - name: <update>
106     #          data-type: <update, optional>
107     #          value: <update, optional>
108     #      terminate-config-primitive:
109     #      - seq: <update>
110     #        name: <update, optional>
111     #        parameter:
112     #        - name: <update>
113     #          data-type: <update, optional>
114     #          value: <update, optional>
115     #      metrics:
116     #      - name: <update>
117     #      config-access:
118     #        ssh-access:
119     #          required: <update, optional>
120     #          default-user: <update, optional>
121     #scaling-aspect:
122     #- id: <update>
123     #  name: <update>
124     #  max-scale-level: <update, optional>
125     #  scaling-policy:
126     #  - name: <update>
127     #    scaling-type: <update, optional>
128     #    enabled: <update, optional>
129     #    scale-in-operator-type: <update, optional>
130     #    scale-out-operator-type: <update, optional>
131     #    threshold-time: <update, optional>
132     #    cooldown-time: <update, optional>
133     #    scaling-criteria: <update, optional>
134     #    - name: <update>
135     #      scale-in-threshold: <update, optional>
136     #      scale-in-relational-operation: <update, optional>
137     #      scale-out-threshold: <update, optional>
138     #      scale-out-relational-operation: <update, optional>
139     #      vnf-monitoring-param-ref: <update, optional>
140     #  scaling-config-action:
141     #  - trigger: <update>
142     #    vnf-config-primitive-name-ref: <update, optional>
143     #  aspect-delta-details:
144     #    id: <update>-delta
145     #    vdu-delta:
146     #    - number-of-instances: 1
147     #      id: {{ name }}_vnfd-VM
148     {%- endif %}
149     {%- if detailed is sameas true %}
150     ## Placement groups at VNF Level
151     #placement-groups:
152     #- name: <update>
153     #  requirement: <update, optional>
154     #  strategy: <update, optional> # COLOCATION, ISOLATION
155     #  member-vdus:
156     #  - member-vdu-ref: <update>
157     {%- endif %}
158     # At least one VDU need to be specified
159     # Additional VDUs can be created by copying the
160     # VDU descriptor below
161   vdu:
162   - id: {{ name }}_vnfd-VM
163     name: {{ name }}_vnfd-VM
164     description: {{ name }}_vnfd-VM
165     sw-image-desc: "{{ image }}"
166     {%- if detailed is sameas true %}
167     ## Choice cloud-init / cloud-init-file
168     #cloud-init: <update, optional>
169     #cloud-init-file: <update, optional>
170     #supplemental-boot-data:
171     #    boot-data-drive: <update, optional>
172     #alarm:
173     #- alarm-id: <update>
174     #  vnf-monitoring-param-ref: <update, optional>
175     #  operation: <update, optional>
176     #  value: <update, optional>
177     #  actions:
178     #    ok:
179     #    - url: <update>
180     #    insufficient-data:
181     #    - url: <update>
182     #    alarm:
183     #    - url: <update>
184     #pdu-type: <update, optional>
185     #alternative-sw-image-desc:
186     #- id: <update>
187     #  name: <update, optional>
188     #  image: <update, optional>
189     #  vim-type: <update>
190     {%- endif %}
191     virtual-storage-desc:
192     - {{ name }}_vnfd-VM-storage
193     virtual-compute-desc: {{ name }}_vnfd-VM-compute
194     {%- if detailed is sameas true %}
195     #monitoring-parameter:
196     #- id: <update>
197     #  name: <update, optional>
198     #  performance-metric: <update>
199     {%- endif %}
200     int-cpd:
201     - id: eth0-int
202       virtual-network-interface-requirement:
203       - name: eth0
204         virtual-interface:
205           type: PARAVIRT
206           {%- if detailed is sameas true %}
207           #vpci: <update, optional>
208           #bandwidth: <update, optional>
209           {%- endif %}
210   ext-cpd:
211   - id: vnf-cp0-ext
212     int-cpd:
213       vdu-id: {{ name }}_vnfd-VM
214       cpd: eth0-int
215       {%- if detailed is sameas true %}
216       #port-security-enabled: <update, optional>
217       #port-security-disable-strategy: <update, optional>
218       {%- endif %}