esx: Map the .vmx annotation to the domain XML description

Take care of escaping '"' and '|' (the escape character).

Add tests for this.
This commit is contained in:
Matthias Bolte
2010-08-27 17:23:49 +02:00
parent 1fe2927a34
commit 4aad5fbb96
7 changed files with 145 additions and 22 deletions

View File

@@ -0,0 +1,10 @@
config.version = "8"
virtualHW.version = "4"
guestOS = "other"
uuid.bios = "56 4d 9b ef ac d9 b4 e0-c8 f0 ae a8 b9 10 35 15"
displayName = "annotation"
annotation = "Some |7Ctext|7C to test the |22escaping|22: |7C|7C|22|22|7C|7C|22|7C Unescaped!"
memsize = "4"
numvcpus = "1"
floppy0.present = "false"
floppy1.present = "false"

View File

@@ -0,0 +1,9 @@
<domain type='vmware'>
<name>annotation</name>
<uuid>564d9bef-acd9-b4e0-c8f0-aea8b9103515</uuid>
<description>Some |text| to test the &quot;escaping&quot;: ||&quot;&quot;||&quot;| Unescaped!</description>
<memory>4096</memory>
<os>
<type>hvm</type>
</os>
</domain>