Bug 172 Fix service primitive exec failure 21/1021/1
authorPhilip Joseph <philip.joseph@riftio.com>
Wed, 25 Jan 2017 21:27:12 +0000 (21:27 +0000)
committerPhilip Joseph <philip.joseph@riftio.com>
Wed, 25 Jan 2017 21:27:54 +0000 (21:27 +0000)
Signed-off-by: Philip Joseph <philip.joseph@riftio.com>
rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/jujuconf.py

index 7779479..add6a29 100644 (file)
@@ -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))