self._user = account.juju.user
self._secret = account.juju.secret
self._rift_install_dir = os.environ['RIFT_INSTALL']
- self._rift_artif_dir = os.environ['RIFT_ARTIFACTS']
+ self._rift_var_root_dir = os.environ['RIFT_VAR_ROOT']
############################################################
# This is wrongfully overloaded with 'juju' private data. #
# Find the charm directory
try:
- path = os.path.join(self._rift_artif_dir,
+ path = os.path.join(self._rift_var_root_dir,
'launchpad/libs',
agent_vnfr.vnfr_msg.vnfd.id,
'charms/trusty',
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))
# The script has full path, use as is
script = rpc_ip.user_defined_script
else:
- script = os.path.join(self._rift_artif_dir, 'launchpad/libs', agent_nsr.id, 'scripts',
+ script = os.path.join(self._rift_var_root_dir, 'launchpad/libs', agent_nsr.id, 'scripts',
rpc_ip.user_defined_script)
self.log.debug("jujuCA: Checking for script in %s", script)
if not os.path.exists(script):