2 Deploy a VNF w/native charm that collects metrics
11 class TestCharm(base
.TestN2VC
):
16 - id: metricsnative-ns
17 name: metricsnative-ns
18 short-name: metricsnative-ns
19 description: NS with 1 VNFs metricsnative-vnf connected by datanet and mgmtnet VLs
23 - vnfd-id-ref: metricsnative-vnf
31 vim-network-name: mgmt
32 vnfd-connection-point-ref:
33 - vnfd-id-ref: metricsnative-vnf
34 member-vnf-index-ref: '1'
35 vnfd-connection-point-ref: vnf-mgmt
36 - vnfd-id-ref: metricsnative-vnf
37 member-vnf-index-ref: '2'
38 vnfd-connection-point-ref: vnf-mgmt
43 vnfd-connection-point-ref:
44 - vnfd-id-ref: metricsnative-vnf
45 member-vnf-index-ref: '1'
46 vnfd-connection-point-ref: vnf-data
47 - vnfd-id-ref: metricsnative-vnf
48 member-vnf-index-ref: '2'
49 vnfd-connection-point-ref: vnf-data
55 - id: metricsnative-vnf
56 name: metricsnative-vnf
57 short-name: metricsnative-vnf
59 description: A VNF consisting of 2 VDUs w/charms connected to an internal VL, and one VDU with cloud-init
77 internal-connection-point:
78 - id-ref: mgmtVM-internal
79 - id-ref: dataVM-internal
95 external-connection-point-ref: vnf-mgmt
101 internal-connection-point-ref: mgmtVM-internal
102 internal-connection-point:
103 - id: mgmtVM-internal
104 name: mgmtVM-internal
105 short-name: mgmtVM-internal
107 cloud-init-file: cloud-config.txt
117 default-value: '/home/ubuntu/touched'
120 # @pytest.mark.serial
122 async def test_metrics_native(self
, event_loop
):
123 """Deploy and execute the initial-config-primitive of a VNF."""
125 if self
.nsd
and self
.vnfd
:
128 for config
in self
.get_config():
129 juju
= config
['juju']
130 charm
= juju
['charm']
139 while self
.running():
140 logging
.debug("Waiting for test to finish...")
141 await asyncio
.sleep(15)
142 logging
.debug("test_metrics_native stopped")