i'dWc@srddljZddlmZddlmZddlmZddl m Z m Z dej fdYZ dS(iN(tApplicationData(tUnifiedArchive(tALT_POOL_DATASET(tbe_create_snapshottbe_listtCreateSnapshotcBs,eZdZdZedZdZRS(shICT checkpoint class creates an initial snapshot of the installed boot environment data set. cCs#tt|j|d|_dS(sInitializes the class Parameters: -name - this arg is required by the AbstractCheckpoint and is not used. tinstallN(tsuperRt__init__t snapshot_name(tselftname((screate_snapshot.pyR&sc Cs|jd }d }|jjjdt}|rI|jjt}n|j }|d k rg|}n |j }t ||}|s|st d|qn+t |dkrt d||fn|s|jjjdt}|d k r|jdjdkrd|_n|j|ddkrstjjj}|jd |7_|jjd ||jn|jjd ||jt||jd |nd S(s The AbstractCheckpoint class requires this method in sub-classes. Creates snapshots for the specified data set once the installation completes. Parameters: - the dry_run keyword paramater. The default value is False. If set to True, the log message provides the steps that would be run for the checkpoint. Returns: - Nothing On failure, a RuntimeError is raised by the cfunc interface. t class_typesTarget BE '%s' does not existis*Multiple BEs named '%s' found in pool '%s'itrecoveryt recoveredit-s:Creating additional install snapshot. be: %s, snapshot: %ss/Creating initial snapshot. be: %s, snapshot: %staltpoolN(t parse_doctNonetdoct persistenttget_first_childRt data_dicttgetRt boot_env_nametboot_env_poolnameRt RuntimeErrortlentvolatileRtarchive_objectst archive_typeR tdatetimetnowt isoformattloggertdebugR( R tdry_runtalt_pool_datasettapp_datatbe_nametpoolnametbelisttuat timestamp((screate_snapshot.pytexecute1s>           cCsdS(s The AbstractCheckpoint class requires this method in sub-classes. This returns an estimate of how long the execute() method will take to run. i((R ((screate_snapshot.pytget_progress_estimates (t__name__t __module__t__doc__RtFalseR,R-(((screate_snapshot.pyR"s P(tsolaris_install.ictticttICTtsolaris_installRtsolaris_install.archiveRt)solaris_install.target.instantiation_zoneRtsolaris_install.target.libbeRRt ICTBaseClassR(((screate_snapshot.pyts