Feature #513

Username variable in CONTEXT

Added by Tino Vázquez over 10 years ago. Updated about 10 years ago.

Status:ClosedStart date:03/04/2011
Priority:NormalDue date:
Assignee:Ruben S. Montero% Done:

0%

Category:Core & System
Target version:Release 3.0
Resolution:fixed Pull request:

Description

Reported by Olivier Sallou <> on the users mailing list

--

Hi,
is there a variable or a way to get the username (open nebula user id) of the person creating a new VM ?

I'd like to know the username to automatically add his public key, so using a generic xml file.

Associated revisions

Revision 5bfec3ab
Added by Ruben S. Montero about 10 years ago

feature #513: Moved SSL utils to a common Helper Class

Revision 2a508a11
Added by Ruben S. Montero about 10 years ago

feature #513: More robust XML generation for empty attributes. This may only happen after parsing context attributes

Revision fc9278f1
Added by Ruben S. Montero about 10 years ago

feature #513: UID, TEMPLATE can be used in context. Also IMAGE template attributes can be referred

Revision a7e9bd08
Added by Ruben S. Montero about 10 years ago

feature #513: Imrpved parser for attributes, double qoutes are not needed for simple values

Revision c9d0df87
Added by Ruben S. Montero about 10 years ago

feature #513: Hooks can now use the ID or full template as arguments

Revision 4f4b8ab4
Added by Ruben S. Montero about 10 years ago

feature #513: Updated oned.conf file

History

#1 Updated by Ruben S. Montero over 10 years ago

  • Target version changed from 23 to Release 3.0

#2 Updated by Ruben S. Montero over 10 years ago

  • Tracker changed from Request to Feature

#3 Updated by jordan pittier about 10 years ago

Here is a small patch that will provide context.sh with the UserID of the person who created the VM :

Edit opennebula-2.2/src/vm/VirtualMachine.cc line 441 add :

ostringstream       oss;
oss << uid;
context_parsed->replace("USERID", oss.str());

Now context.sh will contain a line like this (assuming UserID = 12, this is an example :p) :
USERID="12"

#4 Updated by Ruben S. Montero about 10 years ago

  • Status changed from New to Closed
  • Resolution set to fixed
Changes are now in master. Other changes in this issue were:
  • $UID in context
  • $IMAGE attributes (equivalent to $NETWORK)
  • $TEMPLATE to get the full VM info in xml and base64 encoded

Also available in: Atom PDF