[one-users] Fwd: CONTEXT variables within each other

Carlos Martín Sánchez cmartin at opennebula.org
Tue Jun 11 02:29:56 PDT 2013


Hi,

No, that can't be done. The way it is coded now, the template is not
"expanded" and then interpreted.
When the syntax finds ATT = VALUE, we look into VALUE to see if it starts
by $, but for $FILE="VALUE", value is interpreted and not expanded, even if
it starts by $.

I guess the feature request here would be to expand the VM template strings
starting by $, no matter if they are inside context or not.

Regards
--
Join us at OpenNebulaConf2013 <http://opennebulaconf.com> in Berlin, 24-26
September, 2013
--
Carlos Martín, MSc
Project Engineer
OpenNebula - The Open-source Solution for Data Center Virtualization
www.OpenNebula.org | cmartin at opennebula.org |
@OpenNebula<http://twitter.com/opennebula><cmartin at opennebula.org>


On Tue, Jun 11, 2013 at 11:02 AM, Steffen Claus <
steffen.claus at scai.fraunhofer.de> wrote:

> Hi,
> let me rephrase my question:
> Is it possible to have a parameter for the image name?
> --> FILES_DS="$FILE[IMAGE=\"testfile\"] $FILE[IMAGE=\"$MY_NAME\"]"
>
> BR,
> Steffen
>
> ------------------------------
>
> Hi,
> thanx for your reply.
>
> I think I am actually referencing an attribute outside the context section.
> My problem rather refers to the reference within the $FILE structure.
> References within the square brackets are not handled correctly during the
> template instantiation.
>
> BR,
> Steffen
>
> ------------------------------
>
> Hi,
>
> I don't see any workaround for your template. You can reference only
> attributes outside the context section, and in that case you would have to
> set a fixed USER_SSH_KEY.
>
> This looks exactly like the use case in this thread:
>
> http://lists.opennebula.org/pipermail/users-opennebula.org/2013-May/023144.html
>
> Please open a feature request at http://dev.opennebula.org and we'll plan
> it for future releases.
>
> Regards
>
> --
> Join us at OpenNebulaConf2013 <http://opennebulaconf.com> in Berlin,
> 24-26 September, 2013
> --
> Carlos Martín, MSc
> Project Engineer
> OpenNebula - The Open-source Solution for Data Center Virtualization
> www.OpenNebula.org | cmartin at opennebula.org | @OpenNebula<http://twitter.com/opennebula><cmartin at opennebula.org>
>
>
> On Thu, Jun 6, 2013 at 11:49 AM, Steffen Claus <
> steffen.claus at scai.fraunhofer.de> wrote:
>
>> Dear all,
>> i am trying to use nested CONTEXT variables, e.g. for defining the ssh
>> key for the user.
>> The key file is stored in the file datastore.
>> I've already tried to define the variable outside of the CONTEXT scope,
>> e.g.:
>>
>> CONTEXT
>> [
>> FILES_DS="$FILE[IMAGE=\"testfile\"] $FILE[IMAGE=\"$USER_SSH_KEY\"]"
>> ]
>> USER_SSH_KEY=$USER[SSH_KEY]
>>
>>
>> Is there any way to accomplish that?
>>
>> BR,
>> Steffen
>>
>> --
>> Steffen Claus
>>
>> Fraunhofer-Institut für Algorithmen und Wissenschaftliches Rechnen (SCAI)
>> Schloss Birlinghoven
>> D-53754 Sankt Augustin
>> Tel: +49 2241 14-2511
>> steffen.claus at scai.fraunhofer.de
>> http://www.scai.fraunhofer.de
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>
>
>
>
>
> --
> Steffen Claus
>
> Fraunhofer-Institut für Algorithmen und Wissenschaftliches Rechnen (SCAI)
> Schloss Birlinghoven
> D-53754 Sankt Augustin
> Tel: +49 2241 14-2511
> steffen.claus at scai.fraunhofer.de
> http://www.scai.fraunhofer.de
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>
>
>
> --
> Steffen Claus
>
> Fraunhofer-Institut für Algorithmen und Wissenschaftliches Rechnen (SCAI)
> Schloss Birlinghoven
> D-53754 Sankt Augustin
> Tel: +49 2241 14-2511
> steffen.claus at scai.fraunhofer.de
> http://www.scai.fraunhofer.de
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20130611/65875b42/attachment-0002.htm>


More information about the Users mailing list