projects
/
osm
/
SO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move 'launchpad' directory to 'RIFT_VAR_ROOT' from 'RIFT_ARTIFACTS'
[osm/SO.git]
/
rwcm
/
plugins
/
rwconman
/
rift
/
tasklets
/
rwconmantasklet
/
jujuconf.py
diff --git
a/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/jujuconf.py
b/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/jujuconf.py
index
dce31c3
..
65b5ece
100644
(file)
--- a/
rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/jujuconf.py
+++ b/
rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/jujuconf.py
@@
-51,7
+51,7
@@
class JujuConfigPlugin(riftcm_config_plugin.RiftCMConfigPluginBase):
self._user = account.juju.user
self._secret = account.juju.secret
self._rift_install_dir = os.environ['RIFT_INSTALL']
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. #
############################################################
# This is wrongfully overloaded with 'juju' private data. #
@@
-180,9
+180,9
@@
class JujuConfigPlugin(riftcm_config_plugin.RiftCMConfigPluginBase):
# Find the charm directory
try:
# Find the charm directory
try:
- path = os.path.join(self._rift_
artif
_dir,
+ path = os.path.join(self._rift_
var_root
_dir,
'launchpad/libs',
'launchpad/libs',
- agent_vnfr.vnfr_msg.vnfd
_ref
,
+ agent_vnfr.vnfr_msg.vnfd
.id
,
'charms/trusty',
charm)
self._log.debug("jujuCA: Charm dir is {}".format(path))
'charms/trusty',
charm)
self._log.debug("jujuCA: Charm dir is {}".format(path))
@@
-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
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
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))
if not found:
self._log.warn("jujuCA: Did not find parameter {} for {}".
format(parameter, config.name))
@@
-472,7
+477,7
@@
class JujuConfigPlugin(riftcm_config_plugin.RiftCMConfigPluginBase):
# The script has full path, use as is
script = rpc_ip.user_defined_script
else:
# 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):
rpc_ip.user_defined_script)
self.log.debug("jujuCA: Checking for script in %s", script)
if not os.path.exists(script):