Bug #103
Better deal with strings in Templates
Status: | Closed | Start date: | 04/30/2009 | |
---|---|---|---|---|
Priority: | High | Due 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
#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
#103: Better parsing for vm template attributes
git-svn-id: http://svn.opennebula.org/one/trunk@507 3034c82b-c49b-4eb3-8279-a7acafdc01c0
#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
History
#1 Updated by Ruben S. Montero about 12 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 about 12 years ago
- % Done changed from 0 to 80
We need to update the documentation (User guide)
#3 Updated by Tino Vázquez about 12 years ago
- Status changed from New to Closed
- % Done changed from 80 to 100
- Resolution set to fixed
Explained in the doc. Closing.