before you re-invent the wheel, check out:

http://will.incorrige.us/pyzfs/

note - on 128, you need to edit zfs.h and zpool.h and comment out:

uint64_t zfs_prop_random_value(zfs_prop_t, uint64_t seed);
uint64_t zpool_prop_random_value(zpool_prop_t, uint64_t seed);

Also, you need to rework the zfs_send attributes in code.cxx as these have been 
moved into a single struct, to something like:

int zfs::zfs_do_send(const char *fromname, const char *toname, int outfd)
{
        sendflags_t flags;
        bzero(&flags, sizeof (sendflags_t));
        flags.verbose    = (boolean_t)true;
        flags.replicate  = (boolean_t)false;
        flags.doall      = (boolean_t)true;
        flags.fromorigin = (boolean_t)false;
        flags.dedup      = (boolean_t)true;
        flags.props      = (boolean_t)false;

        int err = zfs_send(m_openfs, fromname, toname, flags, outfd, NULL, 
NULL);

        return err;
}

- I have taken a shortcut here, as I don't need to apply snapshot filters (the 
NULLs).

You need to build pyzfs against python 2.6.

Any issues, let me know.

Cheers

Darren
-- 
This message posted from opensolaris.org

Reply via email to