From: Philip Joseph Date: Wed, 25 Jan 2017 21:27:12 +0000 (+0000) Subject: Bug 172 Fix service primitive exec failure X-Git-Tag: v1.1.0~15 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=2047076c4704c759b4c840c48627b8a5691e72fa;p=osm%2FSO.git Bug 172 Fix service primitive exec failure Signed-off-by: Philip Joseph --- 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))