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: multivdumulticharm-ns
32 name: multivdumulticharm-ns
33 short-name: multivdumulticharm-ns
34 description: NS with 1 VNF connected by datanet and mgmtnet VLs
38 - vnfd-id-ref: multivdumulticharm-vnf
46 vim-network-name: mgmt
47 vnfd-connection-point-ref:
48 - vnfd-id-ref: multivdumulticharm-vnf
49 member-vnf-index-ref: '1'
50 vnfd-connection-point-ref: vnf-mgmt
51 - vnfd-id-ref: multivdumulticharm-vnf
52 member-vnf-index-ref: '2'
53 vnfd-connection-point-ref: vnf-mgmt
58 vnfd-connection-point-ref:
59 - vnfd-id-ref: multivdumulticharm-vnf
60 member-vnf-index-ref: '1'
61 vnfd-connection-point-ref: vnf-data
62 - vnfd-id-ref: multivdumulticharm-vnf
63 member-vnf-index-ref: '2'
64 vnfd-connection-point-ref: vnf-data
70 - id: multivdumulticharm-vnf
71 name: multivdumulticharm-vnf
72 short-name: multivdumulticharm-vnf
74 description: A VNF consisting of 1 VDUs w/proxy charm
92 internal-connection-point:
93 - id-ref: mgmtVM-internal
94 - id-ref: dataVM-internal
110 external-connection-point-ref: vnf-mgmt
116 internal-connection-point-ref: mgmtVM-internal
117 internal-connection-point:
118 - id: mgmtVM-internal
119 name: mgmtVM-internal
120 short-name: mgmtVM-internal
122 cloud-init-file: cloud-config.txt
127 initial-config-primitive:
144 external-connection-point-ref: vnf-mgmt
150 internal-connection-point-ref: dataVM-internal
151 internal-connection-point:
152 - id: dataVM-internal
153 name: dataVM-internal
154 short-name: dataVM-internal
156 cloud-init-file: cloud-config.txt
161 # Relation needs to map to the vdu providing or
162 # requiring, so that we can map to the deployed app.
164 - provides: dataVM:db
166 initial-config-primitive:
172 # @pytest.mark.serial
174 async def test_multivdu_multicharm(self
, event_loop
):
175 """Deploy and execute the initial-config-primitive of a VNF."""
177 if self
.nsd
and self
.vnfd
:
180 for config
in self
.get_config():
181 juju
= config
['juju']
182 charm
= juju
['charm']
192 while await self
.running():
193 logging
.debug("Waiting for test to finish...")
194 await asyncio
.sleep(15)
196 logging
.debug("test_multivdu_multicharm stopped")