Integration test for metrics + bug fix
This commit:
- adds the beginnings of an integration testing framework
- adds an integration test to exercise metric collection
- adds a test charm with metrics collection
- fixes a potential bug that can cause N2VC to fail if no
initial-config-primitive is specified in the VNF descriptor
Signed-off-by: Adam Israel <adam.israel@canonical.com>
diff --git a/n2vc/vnf.py b/n2vc/vnf.py
index 7c39fa1..d3ad90c 100644
--- a/n2vc/vnf.py
+++ b/n2vc/vnf.py
@@ -332,6 +332,10 @@
if 'rw_mgmt_ip' in params:
rw_mgmt_ip = params['rw_mgmt_ip']
+ # initial_config = {}
+ if 'initial-config-primitive' not in params:
+ params['initial-config-primitive'] = {}
+
initial_config = self._get_config_from_dict(
params['initial-config-primitive'],
{'<rw_mgmt_ip>': rw_mgmt_ip}