Hi, this may be a perl question more than a zfs question, but anyway: are there any perl modules hanging around to access the zfs administrative commands?! I wish to write some scripts to to some scheduled jobs with our ZFS systems; preferably in perl. But I found no perlmodules for zfs. I would like to avoid "system"-commands in my scripts ... Thanks for your answers, Jan Dreyer
Jan Dreyer wrote:> Hi, > > this may be a perl question more than a zfs question, but anyway: > are there any perl modules hanging around to access the zfs > administrative commands?! > I wish to write some scripts to to some scheduled jobs with our ZFS > systems; preferably in perl. But I found no perlmodules for zfs. I would > like to avoid "system"-commands in my scripts ...At this time the libzfs C interfaces are not stable public documented interfaces so there are no Perl bindings for them either. The commands are the only stable and documented interfaces to ZFS at this time. -- Darren J Moffat
On Mon, 4 Feb 2008, Darren J Moffat wrote:> At this time the libzfs C interfaces are not stable public documented > interfaces so there are no Perl bindings for them either. > > The commands are the only stable and documented interfaces to ZFS at this > time.Perhaps not stable, but it''s hard to consider them not publicly documented when it''s open source ;): http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/zfs/zfs_main.c I''m in a similar boat; our central identity management infrastructure is written in perl, I really don''t want to have to add a bunch of system calls to incorporate zfs if we end up going that way. While perhaps chasing a moving target, I don''t think making a simple PerlXS interface to some basic functionality (creating/deleting filesystems/snapshots for example) would be that difficult... In the worst case it would just need to be updated if something changed. -- Paul B. Henson | (909) 979-6361 | http://www.csupomona.edu/~henson/ Operating Systems and Network Analyst | henson at csupomona.edu California State Polytechnic University | Pomona CA 91768
Paul B. Henson wrote:> On Mon, 4 Feb 2008, Darren J Moffat wrote: > >> At this time the libzfs C interfaces are not stable public documented >> interfaces so there are no Perl bindings for them either. >> >> The commands are the only stable and documented interfaces to ZFS at this >> time. > > Perhaps not stable, but it''s hard to consider them not publicly documented > when it''s open source ;):Yes it is there is a clear distinction in the OpenSolaris interface taxonomy between interfaces that are some form of private (Project/Consolidation Private) versus public (Committed/Uncommited/Volatile). When I say publically documented I mean API use documentation with a non private interface taxonomy. This has NOTHING what so ever to do with wither or not the source is visible. Private != Secret. The distinction is about what commitment level and what type of change in a given type of release is given to an interface. For more info see the attributes(5) man page on a Solaris system and the Interface Taxonomy document in the OpenSolaris ARC community: http://opensolaris.org/os/community/arc/policies/interface-taxonomy/ -- Darren J Moffat