f73264f1a6eaadc09dd35bc6650e7b88faa1dc86
[osm/IM.git] / tests / examples / hackfest_charmed_vnfd_sol006.yaml
1 #  Copyright 2020 Whitestack LLC
2 #
3 #  Licensed under the Apache License, Version 2.0 (the "License");
4 #  you may not use this file except in compliance with the License.
5 #  You may obtain a copy of the License at
6 #
7 #    http://www.apache.org/licenses/LICENSE-2.0
8 #
9 #  Unless required by applicable law or agreed to in writing, software
10 #  distributed under the License is distributed on an "AS IS" BASIS,
11 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12 #  implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15
16 vnfd:
17   id: hackfest3charmed-vnf
18   description: >-
19     A VNF consisting of 2 VDUs connected to an internal VL, and one VDU with
20     cloud-init
21   product-name: hackfest3charmed-vnf
22   version: '1.0'
23   mgmt-cp: vnf-mgmt-ext
24
25   virtual-compute-desc:
26     - id: mgmt-compute
27       virtual-cpu:
28         num-virtual-cpu: 1
29       virtual-memory:
30         size: 1
31     - id: data-compute
32       virtual-cpu:
33         num-virtual-cpu: 1
34       virtual-memory:
35         size: 1
36
37   virtual-storage-desc:
38     - id: mgmt-storage
39       size-of-storage: 10
40     - id: data-storage
41       size-of-storage: 10
42
43   sw-image-desc:
44     - id: hackfest3-mgmt
45       name: hackfest3-mgmt
46
47   vdu:
48     - id: mgmtVM
49       name: mgmtVM
50       cloud-init-file: cloud-config.txt
51       sw-image-desc: hackfest3-mgmt
52       virtual-compute-desc: mgmt-compute
53       virtual-storage-desc:
54         - mgmt-storage
55       int-cpd:
56         - id: vnf-mgmt
57           virtual-network-interface-requirement:
58             - name: mgmtVM-eth0
59               position: 1
60               virtual-interface:
61                 type: VIRTIO
62         - id: mgmtVM-internal
63           int-virtual-link-desc: internal
64           virtual-network-interface-requirement:
65             - name: mgmtVM-eth1
66               position: 2
67               virtual-interface:
68                 type: VIRTIO
69     - id: dataVM
70       name: dataVM
71       sw-image-desc: hackfest3-mgmt
72       virtual-compute-desc: data-compute
73       virtual-storage-desc:
74         - data-storage
75       int-cpd:
76         - id: dataVM-internal
77           int-virtual-link-desc: internal
78           virtual-network-interface-requirement:
79             - name: dataVM-eth1
80               position: 1
81               virtual-interface:
82                 type: VIRTIO
83         - id: vnf-data
84           virtual-network-interface-requirement:
85             - name: dataVM-eth0
86               position: 2
87               virtual-interface:
88                 type: VIRTIO
89       monitoring-parameter:
90         - id: dataVM_cpu_util
91           name: dataVM_cpu_util
92           performance-metric: cpu_utilization
93
94   int-virtual-link-desc:
95     - id: internal
96
97   ext-cpd:
98     - id: vnf-mgmt-ext
99       int-cpd: # Connection to int-cpd
100         vdu-id: mgmtVM
101         cpd: vnf-mgmt
102     - id: vnf-data-ext
103       int-cpd: # Connection to int-cpd
104         vdu-id: dataVM
105         cpd: vnf-data
106
107   df:
108     - id: hackfest_default
109       vnf-configuration-id: vnf-configuration-example
110       vdu-profile:
111         - id: mgmtVM
112           min-number-of-instances: 1
113         - id: dataVM
114           min-number-of-instances: 1
115           max-number-of-instances: 10
116           vdu-configuration-id: vdu-configuration-example
117       instantiation-level:
118         - id: default
119           vdu-level:
120             - vdu-id: mgmtVM
121               number-of-instances: 1
122             - vdu-id: dataVM
123               number-of-instances: 1
124       scaling-aspect:
125         - id: scale_dataVM
126           name: scale_dataVM
127           max-scale-level: 10
128           aspect-delta-details:
129             deltas:
130               - id: delta1
131                 vdu-delta:
132                   - id: vdudelta1
133                     number-of-instances: 1
134           scaling-policy:
135             - name: auto_cpu_util_above_threshold
136               scaling-type: automatic
137               enabled: true
138               threshold-time: 0
139               cooldown-time: 60
140               scaling-criteria:
141                 - name: cpu_util_above_threshold
142                   scale-in-relational-operation: LE
143                   scale-in-threshold: '15.0000000000'
144                   scale-out-relational-operation: GE
145                   scale-out-threshold: '60.0000000000'
146                   vnf-monitoring-param-ref: dataVM_cpu_util
147           scaling-config-action:
148             - trigger: post-scale-out
149               vnf-config-primitive-name-ref: touch
150             - trigger: pre-scale-in
151               vnf-config-primitive-name-ref: touch
152
153   vnf-configuration:
154     - id: vnf-configuration-example
155       initial-config-primitive:
156         - seq: "1"
157           name: config
158           parameter:
159             - name: ssh-hostname
160               value: <rw_mgmt_ip>
161             - name: ssh-username
162               value: ubuntu
163             - name: ssh-password
164               value: osm4u
165         - seq: "2"
166           name: touch
167           parameter:
168             - name: filename
169               value: <touch_filename>
170       config-primitive:
171         - name: touch
172           parameter:
173             - data-type: STRING
174               default-value: <touch_filename2>
175               name: filename
176       juju:
177         charm: simple