2 Exercise the simplecharm hackfest example:
3 https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/packages/hackfest_simplecharm_vnf.tar.gz
13 class TestCharm(base
.TestN2VC
):
20 short-name: charmproxy-ns
21 description: NS with 1 VNF connected by datanet and mgmtnet VLs
25 - vnfd-id-ref: charmproxy-vnf
33 vim-network-name: mgmt
34 vnfd-connection-point-ref:
35 - vnfd-id-ref: charmproxy-vnf
36 member-vnf-index-ref: '1'
37 vnfd-connection-point-ref: vnf-mgmt
38 - vnfd-id-ref: charmproxy-vnf
39 member-vnf-index-ref: '2'
40 vnfd-connection-point-ref: vnf-mgmt
45 vnfd-connection-point-ref:
46 - vnfd-id-ref: charmproxy-vnf
47 member-vnf-index-ref: '1'
48 vnfd-connection-point-ref: vnf-data
49 - vnfd-id-ref: charmproxy-vnf
50 member-vnf-index-ref: '2'
51 vnfd-connection-point-ref: vnf-data
57 - id: hackfest-simplecharm-vnf
58 name: hackfest-simplecharm-vnf
59 short-name: hackfest-simplecharm-vnf
61 description: A VNF consisting of 2 VDUs connected to an internal VL, and one VDU with cloud-init
79 internal-connection-point:
80 - id-ref: mgmtVM-internal
81 - id-ref: dataVM-internal
97 external-connection-point-ref: vnf-mgmt
103 internal-connection-point-ref: mgmtVM-internal
104 internal-connection-point:
105 - id: mgmtVM-internal
106 name: mgmtVM-internal
107 short-name: mgmtVM-internal
109 cloud-init-file: cloud-config.txt
112 image: hackfest3-mgmt
124 internal-connection-point-ref: dataVM-internal
130 external-connection-point-ref: vnf-data
131 internal-connection-point:
132 - id: dataVM-internal
133 name: dataVM-internal
134 short-name: dataVM-internal
140 initial-config-primitive:
145 value: '/home/ubuntu/first-touch'
151 default-value: '/home/ubuntu/touched'
154 # @pytest.mark.serial
156 async def test_charm_proxy(self
, event_loop
):
157 """Deploy and execute the initial-config-primitive of a VNF."""
159 if self
.nsd
and self
.vnfd
:
162 for config
in self
.get_config():
163 juju
= config
['juju']
164 charm
= juju
['charm']
173 while await self
.running():
174 print("Waiting for test to finish...")
175 await asyncio
.sleep(15)
176 logging
.debug("test_charm_proxy stopped")