2 Test a charm that breaks post-deployment
12 class TestCharm(base
.TestN2VC
):
19 short-name: brokencharm-ns
20 description: NS with 1 VNF connected by datanet and mgmtnet VLs
24 - vnfd-id-ref: charmproxy-vnf
32 vim-network-name: mgmt
33 vnfd-connection-point-ref:
34 - vnfd-id-ref: charmproxy-vnf
35 member-vnf-index-ref: '1'
36 vnfd-connection-point-ref: vnf-mgmt
37 - vnfd-id-ref: charmproxy-vnf
38 member-vnf-index-ref: '2'
39 vnfd-connection-point-ref: vnf-mgmt
44 vnfd-connection-point-ref:
45 - vnfd-id-ref: charmproxy-vnf
46 member-vnf-index-ref: '1'
47 vnfd-connection-point-ref: vnf-data
48 - vnfd-id-ref: charmproxy-vnf
49 member-vnf-index-ref: '2'
50 vnfd-connection-point-ref: vnf-data
56 - id: hackfest-simplecharm-vnf
57 name: hackfest-simplecharm-vnf
58 short-name: hackfest-simplecharm-vnf
60 description: A VNF consisting of 2 VDUs connected to an internal VL, and one VDU with cloud-init
78 internal-connection-point:
79 - id-ref: mgmtVM-internal
80 - id-ref: dataVM-internal
96 external-connection-point-ref: vnf-mgmt
102 internal-connection-point-ref: mgmtVM-internal
103 internal-connection-point:
104 - id: mgmtVM-internal
105 name: mgmtVM-internal
106 short-name: mgmtVM-internal
108 cloud-init-file: cloud-config.txt
111 image: hackfest3-mgmt
123 internal-connection-point-ref: dataVM-internal
129 external-connection-point-ref: vnf-data
130 internal-connection-point:
131 - id: dataVM-internal
132 name: dataVM-internal
133 short-name: dataVM-internal
139 initial-config-primitive:
144 value: '/home/ubuntu/first-touch'
150 default-value: '/home/ubuntu/touched'
153 # @pytest.mark.serial
155 async def test_charm_proxy(self
, event_loop
):
156 """Deploy and execute the initial-config-primitive of a VNF."""
158 if self
.nsd
and self
.vnfd
:
161 for config
in self
.get_config():
162 juju
= config
['juju']
163 charm
= juju
['charm']
172 while await self
.running():
173 print("Waiting for test to finish...")
174 await asyncio
.sleep(15)
175 logging
.debug("test_charm_proxy stopped")