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-30 22:22:03 +02:00
parent 1fe2927a34
commit 4aad5fbb96
7 changed files with 145 additions and 22 deletions
+3
View File
@@ -0,0 +1,3 @@
config.version = "8"
virtualHW.version = "4"
annotation = "Some |7Ctext|7C to test the |22escaping|22: |7C|7C|22|22|7C|7C|22|7C |45|73|63|61|70|65|64|21"
+16
View File
@@ -0,0 +1,16 @@
<domain type='vmware'>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<description>Some |text| to test the &quot;escaping&quot;: ||&quot;&quot;||&quot;| Escaped!</description>
<memory>32768</memory>
<currentMemory>32768</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686'>hvm</type>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
</devices>
</domain>