From 2047076c4704c759b4c840c48627b8a5691e72fa Mon Sep 17 00:00:00 2001 From: Philip Joseph Date: Wed, 25 Jan 2017 21:27:12 +0000 Subject: [PATCH] Bug 172 Fix service primitive exec failure Signed-off-by: Philip Joseph --- .../rift/tasklets/rwconmantasklet/jujuconf.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/jujuconf.py b/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/jujuconf.py index 7779479d..add6a29d 100644 --- a/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/jujuconf.py +++ b/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/jujuconf.py @@ -326,15 +326,20 @@ class JujuConfigPlugin(riftcm_config_plugin.RiftCMConfigPluginBase): if parameter.value: val = self.xlate(parameter.value, vnfr['tags']) # TBD do validation of the parameters - data_type = 'string' + data_type = 'STRING' found = False for ca_param in config.parameter: if ca_param.name == parameter.name: data_type = ca_param.data_type found = True break - if data_type == 'integer': - val = int(parameter.value) + try: + if data_type == 'INTEGER': + tmp = int(val) + val = tmp + except Exception as e: + pass + if not found: self._log.warn("jujuCA: Did not find parameter {} for {}". format(parameter, config.name)) -- 2.25.1