1 # Copyright 2019 Canonical Ltd.
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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 implied.
12 # See the License for the specific language governing permissions and
16 Deploy a multi-vdu, multi-charm VNF
26 class TestCharm(base
.TestN2VC
):
31 - id: hackfest-simplecharm-ns
32 name: hackfest-simplecharm-ns
33 short-name: hackfest-simplecharm-ns
34 description: NS with 2 VNFs hackfest-simplecharm-vnf connected by datanet and mgmtnet VLs
38 - vnfd-id-ref: hackfest-simplecharm-vnf
40 - vnfd-id-ref: hackfest-simplecharm-vnf
48 vim-network-name: mgmt
49 vnfd-connection-point-ref:
50 - vnfd-id-ref: hackfest-simplecharm-vnf
51 member-vnf-index-ref: '1'
52 vnfd-connection-point-ref: vnf-mgmt
53 - vnfd-id-ref: hackfest-simplecharm-vnf
54 member-vnf-index-ref: '2'
55 vnfd-connection-point-ref: vnf-mgmt
60 vnfd-connection-point-ref:
61 - vnfd-id-ref: hackfest-simplecharm-vnf
62 member-vnf-index-ref: '1'
63 vnfd-connection-point-ref: vnf-data
64 - vnfd-id-ref: hackfest-simplecharm-vnf
65 member-vnf-index-ref: '2'
66 vnfd-connection-point-ref: vnf-data
72 - id: hackfest-simplecharm-vnf
73 name: hackfest-simplecharm-vnf
74 short-name: hackfest-simplecharm-vnf
76 description: A VNF consisting of 2 VDUs connected to an internal VL, and one VDU with cloud-init
94 internal-connection-point:
95 - id-ref: mgmtVM-internal
96 - id-ref: dataVM-internal
100 image: hackfest3-mgmt
112 external-connection-point-ref: vnf-mgmt
118 internal-connection-point-ref: mgmtVM-internal
119 internal-connection-point:
120 - id: mgmtVM-internal
121 name: mgmtVM-internal
122 short-name: mgmtVM-internal
124 cloud-init-file: cloud-config.txt
127 image: hackfest3-mgmt
139 internal-connection-point-ref: dataVM-internal
145 external-connection-point-ref: vnf-data
146 internal-connection-point:
147 - id: dataVM-internal
148 name: dataVM-internal
149 short-name: dataVM-internal
154 initial-config-primitive:
168 value: '/home/ubuntu/first-touch'
174 default-value: '/home/ubuntu/touched'
177 # @pytest.mark.serial
179 async def test_multivdu_multicharm(self
, event_loop
):
180 """Deploy and execute the initial-config-primitive of a VNF."""
182 if self
.nsd
and self
.vnfd
:
185 for config
in self
.get_config():
186 juju
= config
['juju']
187 charm
= juju
['charm']
197 while await self
.running():
198 logging
.debug("Waiting for test to finish...")
199 await asyncio
.sleep(15)
201 logging
.debug("test_multivdu_multicharm stopped")