diff options
author | Miloslav Trmač <mitr@redhat.com> | 2009-08-04 20:38:21 +0200 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2009-09-01 18:27:06 +0100 |
commit | 11bca8e4d912f360926c29981b6faf9dba45bf86 (patch) | |
tree | 23ece52527088a0c09b8ee8e02d1e339b0c26402 /libvirt-python-api.xml | |
parent | a5d4455ba21721b4739aab09b2c8116d138b29f3 (diff) | |
download | libvirt-python-v6-11bca8e4d912f360926c29981b6faf9dba45bf86.tar.gz libvirt-python-v6-11bca8e4d912f360926c29981b6faf9dba45bf86.tar.xz libvirt-python-v6-11bca8e4d912f360926c29981b6faf9dba45bf86.zip |
Secret manipulation API docs refresh & wire up python generator
Sample session:
>>> import libvirt
>>> c = libvirt.open('qemu:///session')
>>> c.listSecrets()
['12247729-47d2-a783-88ce-b329d4781cd3', 'reee', 'abc']
>>> s = c.secretDefineXML("<secret ephemeral='no' private='no'>\n<description>Something for use</description>\n<volume>/foo/bar</volume>\n</secret>\n")
>>> s.UUIDString()
'340c2dfb-811b-eda8-da9e-25ccd7bfd650'
>>> s.XMLDesc()
"<secret ephemeral='no' private='no'>\n <uuid>340c2dfb-811b-eda8-da9e-25ccd7bfd650</uuid>\n <description>Something for use</description>\n <volume>/foo/bar</volume>\n</secret>\n"
>>> s.setValue('abc\0xx\xffx')
0
>>> s.value()
'abc\x00xx\xffx'
>>> s.undefine()
0
* python/generator.py: Add rules for virSecret APIs
* python/libvir.c, python/libvirt-python-api.xml: Manual impl of
virSecretSetValue, virSecretGetValue$ and virConnectListSecrets APIs
* python/libvirt_wrap.h, python/types.c: Wrapper for virSecret objects
* docs/libvirt-api.xml, docs/libvirt-refs.xml,
docs/html/libvirt-virterror.html, docs/html/libvirt-libvirt.html,
docs/devhelp/libvirt-virterror.html, docs/devhelp/libvirt-libvirt.html:
Re-generate with 'make api'
Diffstat (limited to 'libvirt-python-api.xml')
-rw-r--r-- | libvirt-python-api.xml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libvirt-python-api.xml b/libvirt-python-api.xml index 43a5b4e..e5c1fb9 100644 --- a/libvirt-python-api.xml +++ b/libvirt-python-api.xml @@ -172,5 +172,23 @@ <arg name='dev' type='virNodeDevicePtr' info='pointer to the node device'/> <return type='str *' info='the list of Names or None in case of error'/> </function> + <function name='virSecretGetValue' file='libvirt' module='libvirt'> + <info>Fetches the value associated with a secret.</info> + <return type='char *' info='the secret value or None in case of error'/> + <arg name='secret' type='virSecretPtr' info='virSecret secret'/> + <arg name='flags' type='unsigned int' info='flags (unused; pass 0)'/> + </function> + <function name='virConnectListSecrets' file='libvirt' module='libvirt'> + <info>List the defined secret IDs</info> + <arg name='conn' type='virConnectPtr' info='virConnect connection'/> + <return type='str *' info='the list of secret IDs or None in case of error'/> + </function> + <function name='virSecretSetValue' file='libvirt' module='libvirt'> + <info>Associates a value with a secret.</info> + <return type='int' info='0 on success, -1 on failure.'/> + <arg name='secret' type='virSecretPtr' info='virSecret secret'/> + <arg name='value' type='const char *' info='The secret value'/> + <arg name='flags' type='unsigned int' info='flags (unused; pass 0)'/> + </function> </symbols> </api> |