On Sat, Dec 31, 2011 at 01:26:54PM +0100, Wido den Hollander wrote:
Hi,
I'm working on a storage backend for libvirt which needs credentials
to access the storage pool. I want to use the build in secret
manager from libvirt, but it seems I do not have access to the
secretDriver in a storage backend?
static int virStorageBackendRBDRefreshPool(virConnectPtr conn
ATTRIBUTE_UNUSED, virStoragePoolObjPtr pool) {
if (pool->def->source.auth.cephx.secret != NULL) {
virSecretPtr secret;
secret = conn->secretDriver->lookupByUUID(conn,
pool->def->source.auth.cephx.secret);
virSecretFree(secret);
}
return 0;
}
It goes wrong at this point:
conn->secretDriver->lookupByUUID(conn,pool->def->source.auth.cephx.secret);
"error: dereferencing pointer to incomplete type"
Is the secretDriver available in a storage backend? In
storage_backend.c I see that it should be available, correct?
Are you missing the '#include "datatypes.h"' header ?
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 :|