[libvirt] [PATCH] schema: Allow space character in disk vendor/product

The hex range already tried to allow for it, but it doesn't work for reasons I can't figure out. Use a plain character range instead, and test it --- docs/schemas/domaincommon.rng | 2 ++ tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 4ad2236..6c80b66 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1165,6 +1165,7 @@ <optional> <element name="vendor"> <data type="string"> + <!-- All printable characters --> <param name="pattern">[ -~]{0,8}</param> </data> </element> @@ -1172,6 +1173,7 @@ <optional> <element name="product"> <data type="string"> + <!-- All printable characters --> <param name="pattern">[ -~]{0,16}</param> </data> </element> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml index 42c7bcd..9e1e7af 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml @@ -26,8 +26,8 @@ <source dev='/dev/HostVG/QEMUGuest2'/> <target dev='sdb' bus='scsi'/> <readonly/> - <vendor>SEAGATE</vendor> - <product>ST3567807GD</product> + <vendor>SEA GATE</vendor> + <product>ST67 807GD</product> <address type='drive' controller='1' bus='0' target='0' unit='0'/> </disk> <controller type='usb' index='0'> -- 2.7.4

On Tue, Apr 26, 2016 at 10:01:17AM -0400, Cole Robinson wrote:
The hex range already tried to allow for it, but it doesn't work for reasons I can't figure out. Use a plain character range instead, and test it --- docs/schemas/domaincommon.rng | 2 ++ tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)
This patch does not apply and only tries to add comments. Jan

On 04/26/2016 10:09 AM, Ján Tomko wrote:
On Tue, Apr 26, 2016 at 10:01:17AM -0400, Cole Robinson wrote:
The hex range already tried to allow for it, but it doesn't work for reasons I can't figure out. Use a plain character range instead, and test it --- docs/schemas/domaincommon.rng | 2 ++ tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)
This patch does not apply and only tries to add comments.
Sigh, sorry, forgot to squash - Cole

On Tue, Apr 26, 2016 at 10:01:17AM -0400, Cole Robinson wrote:
The hex range already tried to allow for it, but it doesn't work for reasons I can't figure out. Use a plain character range instead, and test it --- docs/schemas/domaincommon.rng | 2 ++ tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 4ad2236..6c80b66 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1165,6 +1165,7 @@ <optional> <element name="vendor"> <data type="string"> + <!-- All printable characters --> <param name="pattern">[ -~]{0,8}</param> </data> </element> @@ -1172,6 +1173,7 @@ <optional> <element name="product"> <data type="string"> + <!-- All printable characters --> <param name="pattern">[ -~]{0,16}</param> </data> </element>
Maybe I'm missing something but you don't appear to have changed the schema at all, merely added a comment ??? Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On 04/26/2016 10:13 AM, Daniel P. Berrange wrote:
On Tue, Apr 26, 2016 at 10:01:17AM -0400, Cole Robinson wrote:
The hex range already tried to allow for it, but it doesn't work for reasons I can't figure out. Use a plain character range instead, and test it --- docs/schemas/domaincommon.rng | 2 ++ tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-disk-vpd.xml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 4ad2236..6c80b66 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1165,6 +1165,7 @@ <optional> <element name="vendor"> <data type="string"> + <!-- All printable characters --> <param name="pattern">[ -~]{0,8}</param> </data> </element> @@ -1172,6 +1173,7 @@ <optional> <element name="product"> <data type="string"> + <!-- All printable characters --> <param name="pattern">[ -~]{0,16}</param> </data> </element>
Maybe I'm missing something but you don't appear to have changed the schema at all, merely added a comment ???
Jan pointed that out a minute ago :) Forgot to finish squashing my patches, check v2 - Cole
participants (3)
-
Cole Robinson
-
Daniel P. Berrange
-
Ján Tomko