2 Deploy a VNF with a proxy charm, executing an initial-config-primitive
12 class TestCharm(base
.TestN2VC
):
19 short-name: charmproxy-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
58 short-name: charmproxy-vnf
60 description: A VNF consisting of 1 VDUs w/proxy charm
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
113 initial-config-primitive:
118 # @pytest.mark.serial
120 async def test_charm_proxy(self
, event_loop
):
121 """Deploy and execute the initial-config-primitive of a VNF."""
123 if self
.nsd
and self
.vnfd
:
126 for config
in self
.get_config():
127 juju
= config
['juju']
128 charm
= juju
['charm']
137 while await self
.running():
138 print("Waiting for test to finish...")
139 await asyncio
.sleep(15)
140 logging
.debug("test_charm_proxy stopped")