Updates branch master with sol006 branch, introducing new SOL006 model classes
[osm/IM.git] / tests / examples / hackfest_charmed_vnfd_im.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:vnfd-catalog:
17   vnfd:
18     - connection-point:
19         - id: vnf-mgmt
20           name: vnf-mgmt
21           short-name: vnf-mgmt
22           type: VPORT
23         - id: vnf-data
24           name: vnf-data
25           short-name: vnf-data
26           type: VPORT
27       description: >-
28         A VNF consisting of 2 VDUs connected to an internal VL, and one VDU with
29         cloud-init
30       id: hackfest3charmed-vnf
31       internal-vld:
32         - id: internal
33           internal-connection-point:
34             - id-ref: mgmtVM-internal
35             - id-ref: dataVM-internal
36           name: internal
37           short-name: internal
38           type: ELAN
39       logo: osm.png
40       mgmt-interface:
41         cp: vnf-mgmt
42       monitoring-param:
43         - aggregation-type: AVERAGE
44           id: monitor1
45           name: monitor1
46           vdu-monitoring-param:
47             vdu-monitoring-param-ref: dataVM_cpu_util
48             vdu-ref: dataVM
49       name: hackfest3charmed-vnf
50       scaling-group-descriptor:
51         - max-instance-count: 10
52           name: scale_dataVM
53           scaling-config-action:
54             - trigger: post-scale-out
55               vnf-config-primitive-name-ref: touch
56             - trigger: pre-scale-in
57               vnf-config-primitive-name-ref: touch
58           scaling-policy:
59             - cooldown-time: 60
60               name: auto_cpu_util_above_threshold
61               scaling-criteria:
62                 - name: cpu_util_above_threshold
63                   scale-in-relational-operation: LE
64                   scale-in-threshold: '15.0000000000'
65                   scale-out-relational-operation: GE
66                   scale-out-threshold: '60.0000000000'
67                   vnf-monitoring-param-ref: monitor1
68               scaling-type: automatic
69               threshold-time: 0
70           vdu:
71             - count: 1
72               vdu-id-ref: dataVM
73       short-name: hackfest3charmed-vnf
74       vdu:
75         - count: '1'
76           cloud-init-file: cloud-config.txt
77           id: mgmtVM
78           image: hackfest3-mgmt
79           interface:
80             - external-connection-point-ref: vnf-mgmt
81               name: mgmtVM-eth0
82               position: 1
83               type: EXTERNAL
84               virtual-interface:
85                 type: VIRTIO
86             - internal-connection-point-ref: mgmtVM-internal
87               name: mgmtVM-eth1
88               position: 2
89               type: INTERNAL
90               virtual-interface:
91                 type: VIRTIO
92           internal-connection-point:
93             - id: mgmtVM-internal
94               name: mgmtVM-internal
95               short-name: mgmtVM-internal
96               type: VPORT
97           name: mgmtVM
98           vm-flavor:
99             memory-mb: '1024'
100             storage-gb: '10'
101             vcpu-count: 1
102         - count: '1'
103           id: dataVM
104           image: hackfest3-mgmt
105           interface:
106             - internal-connection-point-ref: dataVM-internal
107               name: dataVM-eth0
108               position: 1
109               type: INTERNAL
110               virtual-interface:
111                 type: VIRTIO
112             - external-connection-point-ref: vnf-data
113               name: dataVM-xe0
114               position: 2
115               type: EXTERNAL
116               virtual-interface:
117                 type: VIRTIO
118           internal-connection-point:
119             - id: dataVM-internal
120               name: dataVM-internal
121               short-name: dataVM-internal
122               type: VPORT
123           monitoring-param:
124             - id: dataVM_cpu_util
125               nfvi-metric: cpu_utilization
126           name: dataVM
127           vm-flavor:
128             memory-mb: '1024'
129             storage-gb: '10'
130             vcpu-count: 1
131       version: '1.0'
132       vnf-configuration:
133         config-primitive:
134           - name: touch
135             parameter:
136               - data-type: STRING
137                 default-value: <touch_filename2>
138                 name: filename
139         initial-config-primitive:
140           - name: config
141             parameter:
142               - name: ssh-hostname
143                 value: <rw_mgmt_ip>
144               - name: ssh-username
145                 value: ubuntu
146               - name: ssh-password
147                 value: osm4u
148             seq: '1'
149           - name: touch
150             parameter:
151               - name: filename
152                 value: <touch_filename>
153             seq: '2'
154         juju:
155           charm: simple
156
157