diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2009-09-10 17:44:12 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2009-09-14 17:48:29 +0100 |
commit | 059a43f02ac8e84280d405a413198bc2ab5b5273 (patch) | |
tree | e319f34aa2dd35f68472444ce829baf56f953e22 /libvirt-python-api.xml | |
parent | 68e1394d4363414400cf815227fcd678cd86cca3 (diff) | |
download | libvirt-python-v6-059a43f02ac8e84280d405a413198bc2ab5b5273.tar.gz libvirt-python-v6-059a43f02ac8e84280d405a413198bc2ab5b5273.tar.xz libvirt-python-v6-059a43f02ac8e84280d405a413198bc2ab5b5273.zip |
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
Diffstat (limited to 'libvirt-python-api.xml')
-rw-r--r-- | libvirt-python-api.xml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libvirt-python-api.xml b/libvirt-python-api.xml index e5c1fb9..148b89b 100644 --- a/libvirt-python-api.xml +++ b/libvirt-python-api.xml @@ -190,5 +190,21 @@ <arg name='value' type='const char *' info='The secret value'/> <arg name='flags' type='unsigned int' info='flags (unused; pass 0)'/> </function> + <function name='virSecretLookupByUUID' file='python'> + <info>Try to lookup a secret on the given hypervisor based on its UUID.</info> + <return type='virSecretPtr' info='a new secret object or NULL in case of failure'/> + <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> + <arg name='uuid' type='const unsigned char *' info='the UUID string for the secret, must be 16 bytes'/> + </function> + <function name='virSecretGetUUID' file='python'> + <info>Extract the UUID unique Identifier of a secret.</info> + <return type='char *' info='the 16 bytes string or None in case of error'/> + <arg name='secret' type='virSecretPtr' info='a secret object'/> + </function> + <function name='virSecretGetUUIDString' file='python'> + <info>Fetch globally unique ID of the secret as a string.</info> + <return type='char *' info='the UUID string or None in case of error'/> + <arg name='secret' type='virSecretPtr' info='a secret object'/> + </function> </symbols> </api> |