ó i'dWc@sTdZddlZddlZddlZddlmZdefd„ƒYZdS(sm AbstractCheckpoint. This class should be parent-class of all checkpoints that want to be run by the engine i’’’’N(tINSTALL_LOGGER_NAMEtAbstractCheckpointcBsPeZdZejZd„Zejd„ƒZeje d„ƒZ d„Z RS(s@ AbstractCheckpoint class to be parent class of all checkpoints cCs6tjƒ|_||_tjtd|ƒ|_dS(s  Instantiates logger instance for the checkpoint. The logger instance is a child of the instance instantiated by the install engine. Input: name: name of the checkpoint Output: None Raise: None t.N(t threadingtEventt_cancel_requestedtnametloggingt getLoggerRtlogger(tselfR((s checkpoint.pyt__init__*s  cCs t‚dS(s} This function is required to be implemented by all subclasses. The function should return the number of seconds it takes to execute the checkpoint as measured by the wall-clock, on a standardized machine. If a checkpoint takes less than 1 second to complete, it should return 1 second as its progress estimate. The engine will always round up to the next integer if a decimal is provided as the weight. Input: None Output: The number of seconds it takes to execute the checkpoint. Raise: None N(tNotImplementedError(R ((s checkpoint.pytget_progress_estimate:scCs t‚dS(są This function is required to be implemented by all subclasses Input: dry_run(optional): The application has requested to do dry run. It's up to the checkpoint implementation to implement the required dry_run functionality. Output: None Raise: Dependent on the checkpoint. All raised exceptions will be passed back to the application. N(R (R tdry_run((s checkpoint.pytexecuteNscCs|jjƒdS(s§The default implementation is to set the _cancel_requested threading Event variable to true. Checkpoints that uses the default implementation of the cancel() function should check the value of the _cancel_requested variable periodically, and end execution as appropriate. Input: None Output: None Raise: None N(Rtset(R ((s checkpoint.pytcancel_s( t__name__t __module__t__doc__tabctABCMetat __metaclass__R tabstractmethodR tFalseRR(((s checkpoint.pyR&s  (RRRRtsolaris_install.loggerRtobjectR(((s checkpoint.pyts