jceel / py-libzfs

Python libzfs bindings
16 stars 8 forks source link

Add minimal snapshot handling support #3

Closed mexicarne closed 9 years ago

mexicarne commented 9 years ago

Create snapshot example:

>>> import libzfs
>>> import nvpair
>>> zfs = libzfs.ZFS()
>>> ds = zfs.get_dataset('zroot/ROOT/default')
>>> nv = nvpair.NVList()
>>> ds.snapshot('zroot/ROOT/default@jojo', nv)

Destroy snapshot example:

>>> import libzfs
>>> zfs = libzfs.ZFS()
>>> ds = zfs.get_dataset('zroot/ROOT/default')
>>> ds.destroy_snapshot('jojo')
jceel commented 9 years ago

Thank you :) However, shouldn't "destroy_snaps" be "destroy_snapshot"?

mexicarne commented 9 years ago

Yes, it would be better for sure :). How can I fix this now (in github terms)?

jceel commented 9 years ago

Don't worry about it, I'll fix it once it will be merged.

bapt commented 9 years ago

Any schedule for merging this feature? I really need it :)

jceel commented 9 years ago

Done. Sorry that you needed to wait so long, I was struggling with git repos synchronization (that repo is backed by internal iXsystems git server and github synchronization needs to work either way to allow people contributing ;)