[one-users] Using USER template variable in VM Template

Hyun Woo Kim hyunwoo at fnal.gov
Fri Aug 24 13:37:11 PDT 2012


Dear Developers,

I want to define a variable "username" in CONTEXT
and replace it by a real user name who does
onetemplate instantiate 

The CONTEXT section of my VM Template looks like the following;
CONTEXT = [
username    = "$USER[NAME]"
]

I am following the instruction in
http://opennebula.org/documentation:archives:rel3.2:template 
which says at the bottom ;
...
Using User template variables
$USER[ <user_attribute> ]: Any single value variable in the user template
for example: ssh_key = "$USER[SSH_KEY]"
The user_attribute can be TEMPLATE to include…
…..


So, I thought NAME can be one possible <user_attribute> like TEMPLATE,
but this does not work..
I even tried
username    = "$USER[NAME, USER_ID=$UID]"
username    = "$USER[NAME, ID=$UID]"
username    = "$USER[NAME, USER_ID=2]"
username    = "$USER[NAME, ID=2]"
All fail..

By the way,
username    = "$UID" works and username is assigned my correct user id

What am I doing wrong here?


Thank you.
Hyunwoo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2979 bytes
Desc: not available
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120824/e85d7455/attachment-0002.bin>


More information about the Users mailing list