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 Describe what this test is meant to do.
25 class TestCharm(base
.TestN2VC
):
32 short-name: noparam-ns
33 description: NS with 1 VNFs noparam-vnf connected by datanet and mgmtnet VLs
37 - vnfd-id-ref: noparam-vnf
45 vim-network-name: mgmt
46 vnfd-connection-point-ref:
47 - vnfd-id-ref: noparam-vnf
48 member-vnf-index-ref: '1'
49 vnfd-connection-point-ref: vnf-mgmt
50 - vnfd-id-ref: noparam-vnf
51 member-vnf-index-ref: '2'
52 vnfd-connection-point-ref: vnf-mgmt
57 vnfd-connection-point-ref:
58 - vnfd-id-ref: noparam-vnf
59 member-vnf-index-ref: '1'
60 vnfd-connection-point-ref: vnf-data
61 - vnfd-id-ref: noparam-vnf
62 member-vnf-index-ref: '2'
63 vnfd-connection-point-ref: vnf-data
71 short-name: noparam-vnf
73 description: A VNF consisting of 2 VDUs w/charms connected to an internal VL, and one VDU with cloud-init
91 internal-connection-point:
92 - id-ref: mgmtVM-internal
93 - id-ref: dataVM-internal
109 external-connection-point-ref: vnf-mgmt
115 internal-connection-point-ref: mgmtVM-internal
116 internal-connection-point:
117 - id: mgmtVM-internal
118 name: mgmtVM-internal
119 short-name: mgmtVM-internal
121 cloud-init-file: cloud-config.txt
126 initial-config-primitive:
131 # @pytest.mark.serial
133 async def test_charm_no_parameter(self
, event_loop
):
134 """Deploy and execute the initial-config-primitive of a VNF."""
135 logging
.warning("event_loop: {}".format(event_loop
))
136 if self
.nsd
and self
.vnfd
:
139 for config
in self
.get_config():
140 juju
= config
['juju']
141 charm
= juju
['charm']
150 while await self
.running():
151 print("Waiting for test to finish...")
152 await asyncio
.sleep(15)