You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by Azhar I Hashmi <ai...@us.ibm.com> on 2015/01/28 22:09:45 UTC
passing brooklyn config variable value in files.install or template.install
map Value
Hello,
I have been trying to pass the config variable (libPathConfig) in the
templates.install or files.install value, but i am keep getting error. I
also tried with `$brooklyn:formatString("%s/%s", config("libPathConfig"),
"myfileName")` or `$brooklyn:formatString("%s/%s", $brooklyn:config
("libPathConfig"), "myfileName")` but none of them worked.
Example:
brooklyn.config:
libPathConfig: $brooklyn:formatString("%s/lib", attributeWhenReady
("expandedinstall.dir"))
templates.install:
"https://config.properties": $brooklyn:config("libPathConfig")
"https://util_config.properties": $brooklyn:config("libPathConfig")
files.install:
"
http://central.maven.org/maven2/org/apache/tomcat/tomcat-dbcp/7.0.30/tomcat-dbcp-7.0.30.jar
": $brooklyn:config("libPathConfig")
"
http://central.maven.org/maven2/mysql/mysql-connector-java/5.1.10/mysql-connector-java-5.1.10.jar
": $brooklyn:config("libPathConfig")
"https://application.properties": $brooklyn:config("libPathConfig")
If someone has any insight or suggestions, i'll really appreciated that.
ERROR
Cannot coerce or set {
http://central.maven.org/maven2/org/apache/tomcat/tomcat-dbcp/7.0.30/tomcat-dbcp-7.0.30.jar=
$brooklyn:component(THIS
, ).config(libPathConfig),
http://central.maven.org/maven2/mysql/mysql-connector-java/5.1.10/mysql-connector-java-5.1.10.jar=
$brooklyn:component(THIS
, ).config(libPathConfig),
http://application.properties=$brooklyn:component(THIS, ).config
(libPathConfig)}
to files.install[ConfigKey:java.util.Map]
ERROR:
Cannot coerce or set {
http://central.maven.org/maven2/org/apache/tomcat/tomcat-dbcp/7.0.30/tomcat-dbcp-7.0.30.jar=
$brooklyn:formatString(%s/%s)
,
http://central.maven.org/maven2/mysql/mysql-connector-java/5.1.10/mysql-connector-java-5.1.10.jar=
$brooklyn:formatString(%s/%s)
,
http://application.properties=$brooklyn:formatString(%s/%s)}
to files.install[ConfigKey:java.util.Map]
ERROR
Cannot coerce or set {
https://artifactory:AP5QT5YLhmBu3ET9Qe8wwkrNs3r@artifactory.mms.ibmcloud.com/artifactory/ext-release-local/amm-bss/provision/config.properties=
$brooklyn:formatString(%s/%s)
, http://util_config.properties=$brooklyn:formatString(%s/%s)} to
templates.install[ConfigKey:java.util.Map]
Thanks a lot!
Azhar