Ñò i'dWc @sÌdZddklZddklZddklZddkl Z ddk l Z l Z l Z lZlZddklZlZdZd Zd Zd Zd efd „ƒYZdefd„ƒYZdS(ss varshare.py - /var /var/share dataset creation checkpoint. Creates BE /var dataset and global /var/share dataset. iÿÿÿÿ(tUnifiedArchive(t InstallEngine(tAbstractCheckpoint(tTarget(tBEt FilesystemtOptionstZvoltZpool(t ArchiveSpectSoftwaretvars/vartVARSHAREs /var/sharetVarShareDatasetErrorcBs eZdZd„Zd„ZRS(s6Error generated during var/share filesystem processingcCsti|ƒ||_dS(N(t Exceptiont__init__tmsg(tselfR((s../varshare.pyR/s cCs|iS(N(R(R((s../varshare.pyt__str__3s(t__name__t __module__t__doc__RR(((s../varshare.pyR ,s tVarShareDatasetcBsƒeZdZd„Zd„Zd„Zd„Zed„ƒZd„Z d„Z d„Z d „Z d „Z d „Zed „ZRS( s. class to create /var /var/share datasets cCsGtt|ƒi|ƒtƒ|_tƒ|_tƒ|_d|_dS(N( tsuperRRtlistt zpool_listt zvol_listtfs_listtNonet _root_pool(Rtname((s../varshare.pyR;s    cCsdS(sZ Returns an estimate of the time this checkpoint will take in seconds i((R((s../varshare.pytget_progress_estimateDscCsªtiƒi|_|iidtidtdtƒd|_|iidt dtƒ|_ |iidt ƒ|_ |iidt ƒ|_|iiidtƒ|_dS(s^ method for parsing data object cache (DOC) objects for use by the checkpoint Rt class_typetnot_found_is_erriN(Rt get_instancetdata_object_cachetdoctget_descendantsRtDESIREDtTruettargetRRRRRRtvolatileR tsw_nodes(R((s../varshare.pyt parse_docJs cCsfx&|iD]}|i|jo|Sq Wx6|iD]+}|i|jp|i|jo|Sq3WdS(s Search the list of Zvol's and Filesystems in the DESIRED tree for matching name or mountpoint. Return the first matching object found. Paramaters: dsname - Dataset name to check for dsmp - Dataset mountpoint to check for N(RRRt mountpointR(Rtdsnametdsmptzvtfs((s../varshare.pytin_dataset_listas     cCse|idj o|iSxCg}|iD]}|io ||q)q)~D]}||_qKW|iS(s& Return root pool from list of zpools N(RRRtis_root(Rt_[1]tzt root_pool((s../varshare.pyR5ws 3 cCsJ|idj o&|ii|d|ƒ}||_|Std|ƒ‚dS(sÛ Add filesystem to root pool. Paramaters: fsname - Filesystem name to add. fsmp - Filesystem mountpoint in_be - Filesystem within BE or not R,sIFailed to add '%s' filesystem object, the root pool could not be located.N(R5Rtadd_filesystemtin_beR (RtfsnametfsmpR7R0((s../varshare.pyR6‚s  c Cs‰d}|i||ƒ}|dj o‰t|tƒotd|ƒ‚q®|iip td||iifƒ‚n|i|jo td|i||fƒ‚n|i|jo>|idjo |t j o td|i||fƒ‚n|i o!|t jotd|ƒ‚n|i o!|t jotd|ƒ‚n|it joKt ƒ}|i t tdƒ}|i t tdƒ}|dj o|djo||dN(Rtsolaris_install.archiveRtsolaris_install.engineRt!solaris_install.engine.checkpointRt Checkpointtsolaris_install.targetRtsolaris_install.target.logicalRRRRRtsolaris_install.transfer.infoR R R?RCR@RDRR R(((s../varshare.pyts(