"virNWFilterGetConnect",
"virStoragePoolGetConnect",
"virStorageVolGetConnect",
+ "virDomainSnapshotGetConnect",
+ "virDomainSnapshotGetDomain",
# only useful in C code, python code uses dict for typed parameters
"virTypedParamsAddBoolean",
class_skip_connect_impl = {
"virConnect" : True,
- "virDomainSnapshot": True,
}
class_domain_impl = {
" self._conn = conn._conn\n")
elif classname in [ "virDomainSnapshot" ]:
classes.write(" self._dom = dom\n")
+ classes.write(" self._conn = dom.connect()\n")
classes.write(" if _obj != None:self._o = _obj;return\n")
classes.write(" self._o = None\n\n");
destruct=None
+ def getConnect(self):
+ """Get the connection that owns the domain that a snapshot was created for"""
+ return self.connect()
+
+ def getDomain(self):
+ """Get the domain that a snapshot was created for"""
+ return self.domain()
+
def listAllChildren(self, flags):
"""List all child snapshots and returns a list of snapshot objects"""
ret = libvirtmod.virDomainSnapshotListAllChildren(self._o, flags)
* virDomainSnapshotGetDomain:
* @snapshot: a snapshot object
*
- * Get the domain that a snapshot was created for
+ * Provides the domain pointer associated with a snapshot. The
+ * reference counter on the domain is not increased by this
+ * call.
+ *
+ * WARNING: When writing libvirt bindings in other languages, do not use this
+ * function. Instead, store the domain and the snapshot object together.
*
* Returns the domain or NULL.
*/
* virDomainSnapshotGetConnect:
* @snapshot: a snapshot object
*
- * Get the connection that owns the domain that a snapshot was created for
+ * Provides the connection pointer associated with a snapshot. The
+ * reference counter on the connection is not increased by this
+ * call.
+ *
+ * WARNING: When writing libvirt bindings in other languages, do not use this
+ * function. Instead, store the connection and the snapshot object together.
*
* Returns the connection or NULL.
*/