Product SiteDocumentation Site

7.4.3. changeRollback

This method rolls back all defined interface definitions since the last call to the changeCommit method was called.
Note: An error will be thrown if no interface definitions are pending.

Example 7.14. Using changeRollback

# Example-30.py
#!/usr/bin/env python3
import sys
import libvirt

conn = None
try:
    conn = libvirt.open("qemu:///system")
except libvirt.libvirtError as e:
    print(repr(e), file=sys.stderr)
    exit(1)

iface = conn.changeRollback()

conn.close()
exit(0)