Bug #103

Better deal with strings in Templates

Added by Ruben S. Montero almost 10 years ago. Updated over 9 years ago.

Status:ClosedStart date:04/30/2009
Priority:HighDue date:
Assignee:Ruben S. Montero% Done:

100%

Category:Core & System
Target version:Release 1.4
Resolution:fixed Pull request:
Affected Versions:

Description

Right now quote are escaped in an awkward way, by using single quotes if you need doubles and vice versa. This also cause problems when inserting data in the sqlite, as single quotes are also used to delimit fields.

A better quote escape mechanism or semantics is needed.

Associated revisions

Revision 5f14d264
Added by Ruben S. Montero almost 10 years ago

#103: Now strings are defined with ", you can escape them as usual with \"

git-svn-id: http://svn.opennebula.org/one/trunk@506 3034c82b-c49b-4eb3-8279-a7acafdc01c0

Revision 9e334f72
Added by Ruben S. Montero almost 10 years ago

#103: Better parsing for vm template attributes

git-svn-id: http://svn.opennebula.org/one/trunk@507 3034c82b-c49b-4eb3-8279-a7acafdc01c0

Revision 644d909c
Added by Ruben S. Montero almost 10 years ago

#103: Now single qoutes can be saeftly used in template variables

git-svn-id: http://svn.opennebula.org/one/trunk@508 3034c82b-c49b-4eb3-8279-a7acafdc01c0

Revision a87b4db4
Added by Laurent Grawet over 2 years ago

Backlog #3953: "ceph df" XML output parsing for the monitor script (#103)

Thanks. MUCH more cleaner and safer now :+1:

History

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

An example of this behavior (submitted by Shyng-Yi Shu), when thw following is included in the template:

RAW     = [type="xen",data="builder = 'hvm'"]

The vector value in data: "builder = 'hvm'", the hvm must has single
quotation marks like 'hvm', but OpneNebula complain in log and failed
to deploy:

"SQL command was: INSERT OR REPLACE INTO vm_attributes
(id,name,type,value) VALUES (7,'RAW',1,'DATA=builder =
'hvm'@^_^@TYPE=xen'), error: near "hvm": syntax error" 

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

  • % Done changed from 0 to 80

We need to update the documentation (User guide)

#3 Updated by Tino Vázquez over 9 years ago

  • Status changed from New to Closed
  • % Done changed from 80 to 100
  • Resolution set to fixed

Explained in the doc. Closing.

Also available in: Atom PDF