ó ɼjWc@s½dZddlZddlZddlZejjZdefd„ƒYZe ƒZ x3ej j ƒj ƒD]\ZZeeƒe et|ƒ}y|j|jdSWntk r9|jSXdS(séReturn the value of the given property for this dataset. Currently only works for native properties (those with a Property object.) Raises KeyError if propname does not specify a native property. Does not raise ZFSError. tvalueN(RR+RRR(R tpropnameR((s../../common/dataset.pyR,‡s  cCst|j|jjdƒ ƒS(s5Return a Dataset representing the parent of this one.t/(R Rtrindex(R ((s../../common/dataset.pytparent—sccskd}x^trftjj|jt|ƒ\}}}t||ƒ}|Vx|jƒD] }|VqTWq WdS(s\A generator function which iterates over all descendent Datasets (not including snapshots.iN(tTrueRR)t next_datasetRtFalseR t descendents(R tcookieRR-tdstchild((s../../common/dataset.pyR9›s $ccsMtjj|j|ƒ}x.|jƒD] \\}}}|||fVq%WdS(sėA generator function which iterates over a userspace-type property. prop specifies which property ("userused@", "userquota@", "groupused@", or "groupquota@"). returns 3-tuple of domain (string), rid (int), and space (int). N(RR)tuserspace_manyRt iteritems(R tproptdtdomaintridtspace((s../../common/dataset.pyt userspace©s cCstjj|jƒS(sVInitialize the accounting information for userused@... and groupused@... properties.(RR)tuserspace_upgradeR(R ((s../../common/dataset.pyRE·scCstjj|j||ƒS(s'Add to the "zfs allow"-ed permissions on this Dataset. un is True if the specified permissions should be removed. d is a dict specifying which permissions to add/remove: { "whostr" -> None # remove all perms for this entity "whostr" -> { "perm" -> None} # add/remove these perms } (RR)t set_fsaclR(R tunR@((s../../common/dataset.pyRF¼s cCstjj|jƒS(sbGet the "zfs allow"-ed permissions on the Dataset. Return a dict("whostr": { "perm" -> None }).(RR)t get_fsaclR(R ((s../../common/dataset.pyRHĒscCstjj|jƒS(sGGet the user holds on this Dataset. Return a dict("tag": timestamp).(RR)t get_holdsR(R ((s../../common/dataset.pyRIĪs(snames__propsN(s filesystemsvolume(RRRRRRRRtNoneR6RR,R5R9RDRERFRHRI(((s../../common/dataset.pyR Ws "      c cs.x'|D]}d|krGtjjtjtdƒ|tdƒƒ‚nyt|ƒ}|VWn8tjjk r–}| s|jtjkr—‚q—nX|r|jdƒ\}}t|ƒ}xe|j ƒD]T}yt|j d|ƒVWqĖtjjk r}|jtjkr‚qqĖXqĖWqqWdS(NR$scannot open %ss#operation only applies to snapshots( RRR%R&R'R(R tENOENTtsplitR9R( tdsnamest recursivetdsnameR;R0tbasetsnapnameR5R<((s../../common/dataset.pytsnapshots_fromcmdlineÕs*         (Rt zfs.ioctlRtzfs.utilR&RR(tobjectRtdictRR)t get_proptableR>RRRR RR(((s../../common/dataset.pyts    $ " ~