schema: use a better regex for listen addresses

A domain with '::' as the listen address fails to validate.

Reuse the 'ipAddr' and 'dnsName' regexes from basictypes instead
of reinventing them.

https://bugzilla.redhat.com/show_bug.cgi?id=1285665
This commit is contained in:
Ján Tomko 2015-11-26 10:39:54 +01:00
parent 63fd27cfa3
commit 7ec235ed09
3 changed files with 7 additions and 6 deletions

View File

@ -5221,9 +5221,10 @@
</data> </data>
</define> </define>
<define name="addrIPorName"> <define name="addrIPorName">
<data type="string"> <choice>
<param name="pattern">(([0-2]?[0-9]?[0-9]\.){3}[0-2]?[0-9]?[0-9])|(([0-9a-fA-F]+|:)+[0-9a-fA-F]+)|([a-zA-Z0-9_\.\+\-]*)</param> <ref name="ipAddr"/>
</data> <ref name="dnsName"/>
</choice>
</define> </define>
<define name="usbIdDefault"> <define name="usbIdDefault">
<data type="string"> <data type="string">

View File

@ -19,5 +19,5 @@ QEMU_AUDIO_DRV=none \
-net none \ -net none \
-serial none \ -serial none \
-parallel none \ -parallel none \
-vnc 127.0.0.1:59630,share=allow-exclusive \ -vnc '[::]:59630,share=allow-exclusive' \
-vga cirrus -vga cirrus

View File

@ -25,8 +25,8 @@
<controller type='pci' index='0' model='pci-root'/> <controller type='pci' index='0' model='pci-root'/>
<input type='mouse' bus='ps2'/> <input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/> <input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='65530' autoport='no' listen='127.0.0.1' sharePolicy='allow-exclusive'> <graphics type='vnc' port='65530' autoport='no' listen='::' sharePolicy='allow-exclusive'>
<listen type='address' address='127.0.0.1'/> <listen type='address' address='::'/>
</graphics> </graphics>
<video> <video>
<model type='cirrus' vram='16384' heads='1'/> <model type='cirrus' vram='16384' heads='1'/>