2013-01-23 15:03:17 +00:00
|
|
|
<?xml version="1.0"?>
|
2014-04-12 01:33:45 +00:00
|
|
|
<!-- A Relax NG schema for common libvirt XML storage elements -->
|
2009-08-19 19:50:10 +00:00
|
|
|
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
|
|
|
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
|
|
|
2014-04-12 01:33:45 +00:00
|
|
|
<!-- This schema is not designed for standalone use; another file
|
|
|
|
must include both this file and basictypes.rng -->
|
|
|
|
|
2009-08-19 19:50:10 +00:00
|
|
|
<define name='encryption'>
|
|
|
|
<element name='encryption'>
|
|
|
|
<attribute name='format'>
|
|
|
|
<choice>
|
|
|
|
<value>default</value>
|
|
|
|
<value>qcow</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
<zeroOrMore>
|
|
|
|
<ref name='secret'/>
|
|
|
|
</zeroOrMore>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name='secret'>
|
|
|
|
<element name='secret'>
|
|
|
|
<attribute name='type'>
|
|
|
|
<choice>
|
|
|
|
<value>passphrase</value>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
Fix UUID handling in secrets/storage encryption APIs
Convert all the secret/storage encryption APIs / wire format to
handle UUIDs in raw format instead of non-canonical printable
format. Guarentees data format correctness.
* docs/schemas/storageencryption.rng: Make UUID mandatory for a secret
and validate fully
* docs/schemas/secret.rng: Fully validate UUID
* include/libvirt/libvirt.h, include/libvirt/libvirt.h.in, Add
virSecretLookupByUUID and virSecretGetUUID. Make
virSecretGetUUIDString follow normal API design pattern
* python/generator.py: Skip generation of virSecretGetUUID,
virSecretGetUUIDString and virSecretLookupByUUID
* python/libvir.c, python/libvirt-python-api.xml: Manual impl
of virSecretGetUUID,virSecretGetUUIDString and virSecretLookupByUUID
* qemud/remote.c: s/virSecretLookupByUUIDString/virSecretLookupByUUID/
Fix get_nonnull_secret/make_nonnull_secret to use unsigned char
* qemud/remote_protocol.x: Fix remote_nonnull_secret to use a
remote_uuid instead of remote_nonnull_string for UUID field.
Rename REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING to
REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING and make it take an
remote_uuid value
* qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h,
qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h,
qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate
* src/datatypes.h, src/datatypes.c: Store UUID in raw format instead
of printable. Change virGetSecret to use raw format UUID
* src/driver.h: Rename virDrvSecretLookupByUUIDString to
virDrvSecretLookupByUUID and use raw format UUID
* src/libvirt.c: Add virSecretLookupByUUID and virSecretGetUUID
and re-implement virSecretLookupByUUIDString and
virSecretGetUUIDString in terms of those
* src/libvirt_public.syms: Add virSecretLookupByUUID and
virSecretGetUUID
* src/remote_internal.c: Rename remoteSecretLookupByUUIDString
to remoteSecretLookupByUUID. Fix typo in args for
remoteSecretDefineXML impl. Use raw UUID format for
get_nonnull_secret and make_nonnull_secret
* src/storage_encryption_conf.c, src/storage_encryption_conf.h:
Storage UUID in raw format, and require it to be present in
XML. Use UUID parser to validate.
* secret_conf.h, secret_conf.c: Generate a UUID if none is provided.
Storage UUID in raw format.
* src/secret_driver.c: Adjust to deal with raw UUIDs. Save secrets
in a filed with printable UUID, instead of base64 UUID.
* src/virsh.c: Adjust for changed public API contract of
virSecretGetUUIDString.
* src/storage_Backend.c: DOn't undefine secret we just generated
upon successful volume creation. Fix to handle raw UUIDs. Generate
a non-clashing UUID
* src/qemu_driver.c: Change to use lookupByUUID instead of
lookupByUUIDString
2009-09-10 16:44:12 +00:00
|
|
|
<attribute name='uuid'>
|
2014-04-12 01:33:45 +00:00
|
|
|
<ref name="UUID"/>
|
Fix UUID handling in secrets/storage encryption APIs
Convert all the secret/storage encryption APIs / wire format to
handle UUIDs in raw format instead of non-canonical printable
format. Guarentees data format correctness.
* docs/schemas/storageencryption.rng: Make UUID mandatory for a secret
and validate fully
* docs/schemas/secret.rng: Fully validate UUID
* include/libvirt/libvirt.h, include/libvirt/libvirt.h.in, Add
virSecretLookupByUUID and virSecretGetUUID. Make
virSecretGetUUIDString follow normal API design pattern
* python/generator.py: Skip generation of virSecretGetUUID,
virSecretGetUUIDString and virSecretLookupByUUID
* python/libvir.c, python/libvirt-python-api.xml: Manual impl
of virSecretGetUUID,virSecretGetUUIDString and virSecretLookupByUUID
* qemud/remote.c: s/virSecretLookupByUUIDString/virSecretLookupByUUID/
Fix get_nonnull_secret/make_nonnull_secret to use unsigned char
* qemud/remote_protocol.x: Fix remote_nonnull_secret to use a
remote_uuid instead of remote_nonnull_string for UUID field.
Rename REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING to
REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING and make it take an
remote_uuid value
* qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h,
qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h,
qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate
* src/datatypes.h, src/datatypes.c: Store UUID in raw format instead
of printable. Change virGetSecret to use raw format UUID
* src/driver.h: Rename virDrvSecretLookupByUUIDString to
virDrvSecretLookupByUUID and use raw format UUID
* src/libvirt.c: Add virSecretLookupByUUID and virSecretGetUUID
and re-implement virSecretLookupByUUIDString and
virSecretGetUUIDString in terms of those
* src/libvirt_public.syms: Add virSecretLookupByUUID and
virSecretGetUUID
* src/remote_internal.c: Rename remoteSecretLookupByUUIDString
to remoteSecretLookupByUUID. Fix typo in args for
remoteSecretDefineXML impl. Use raw UUID format for
get_nonnull_secret and make_nonnull_secret
* src/storage_encryption_conf.c, src/storage_encryption_conf.h:
Storage UUID in raw format, and require it to be present in
XML. Use UUID parser to validate.
* secret_conf.h, secret_conf.c: Generate a UUID if none is provided.
Storage UUID in raw format.
* src/secret_driver.c: Adjust to deal with raw UUIDs. Save secrets
in a filed with printable UUID, instead of base64 UUID.
* src/virsh.c: Adjust for changed public API contract of
virSecretGetUUIDString.
* src/storage_Backend.c: DOn't undefine secret we just generated
upon successful volume creation. Fix to handle raw UUIDs. Generate
a non-clashing UUID
* src/qemu_driver.c: Change to use lookupByUUID instead of
lookupByUUIDString
2009-09-10 16:44:12 +00:00
|
|
|
</attribute>
|
2009-08-19 19:50:10 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2014-04-12 01:33:45 +00:00
|
|
|
<define name='compat'>
|
|
|
|
<element name='compat'>
|
|
|
|
<data type='string'>
|
|
|
|
<param name='pattern'>[0-9]+\.[0-9]+</param>
|
|
|
|
</data>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
<define name='fileFormatFeatures'>
|
|
|
|
<element name='features'>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name='lazy_refcounts'>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2014-04-14 22:54:14 +00:00
|
|
|
<!-- split the list of known storage formats into two, those where
|
|
|
|
we know how to follow backing chains, and all others -->
|
|
|
|
<define name='storageFormatBacking'>
|
|
|
|
<choice>
|
|
|
|
<value>cow</value>
|
|
|
|
<value>qcow</value>
|
|
|
|
<value>qcow2</value>
|
|
|
|
<value>qed</value>
|
|
|
|
<value>vmdk</value>
|
|
|
|
</choice>
|
|
|
|
</define>
|
2014-04-14 22:54:13 +00:00
|
|
|
<define name='storageFormat'>
|
|
|
|
<choice>
|
|
|
|
<value>raw</value>
|
|
|
|
<value>dir</value>
|
|
|
|
<value>bochs</value>
|
|
|
|
<value>cloop</value>
|
|
|
|
<value>dmg</value>
|
|
|
|
<value>iso</value>
|
|
|
|
<value>vpc</value>
|
2014-04-14 22:54:14 +00:00
|
|
|
<value>vdi</value>
|
2014-04-14 22:54:13 +00:00
|
|
|
<value>fat</value>
|
|
|
|
<value>vhd</value>
|
2014-04-14 22:54:14 +00:00
|
|
|
<ref name='storageFormatBacking'/>
|
2014-04-14 22:54:13 +00:00
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
|
2014-04-14 22:54:15 +00:00
|
|
|
<define name='storageStartupPolicy'>
|
|
|
|
<!-- Use a combine='choice' override in client files that want to
|
|
|
|
add additional attributes to a <source> sub-element
|
|
|
|
associated with a storage source -->
|
|
|
|
<notAllowed/>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name='storageSourceExtra'>
|
|
|
|
<!-- Use a combine='choice' override in client files that want to
|
|
|
|
add additional elements as siblings of a <source> sub-element
|
|
|
|
associated with a storage source -->
|
|
|
|
<notAllowed/>
|
|
|
|
</define>
|
|
|
|
|
2009-08-19 19:50:10 +00:00
|
|
|
</grammar>
|