Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/landscape/monitor/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/landscape/monitor/updatemanager.pyc

ó
ÍÿŠTc@sNddlZddlZddlZddlmZdefd„ƒYZdS(iÿÿÿÿN(t
MonitorPlugint
UpdateManagercBsSeZdZdZdZdZdZeZd	d„Z
d„Zd„Zd„Z
RS(
s 
    Report on changes to the update-manager configuration.

    @param update_manager_filename: the path to the update-manager
        configuration file.
    s$/etc/update-manager/release-upgradessupdate-managertpackageicCs|dk	r||_ndS(N(tNonetupdate_manager_filename(tselfR((sC/usr/lib/python2.7/dist-packages/landscape/monitor/updatemanager.pyt__init__scCs›tjj|jƒsdSt|jƒ}tjƒ}|j|ƒ|jddƒ}dddg}||kr—d}d|j|f}t	j
|ƒn|S(s.
        Retrieve the update-manager upgrade prompt which dictates when we
        should prompt users to upgrade the release.  Current valid values are
        "normal" (prompt on all the availability of all releases), "lts"
        (prompt only when LTS releases are available), and "never".
        tnormaltDEFAULTtPrompttltstnevers6%s contains invalid Prompt value. Should be one of %s.(tostpathtexistsRtopentConfigParsertSafeConfigParsertreadfptgettloggingtwarning(Rtconfig_filetparsertpromptt
valid_promptstmessage((sC/usr/lib/python2.7/dist-packages/landscape/monitor/updatemanager.pyt_get_prompts

cCsu|jƒ}||jjdƒkr(dS|jjd|ƒidd6|d6}tjdƒ|jjj||j	ƒS(sH
        Send the current upgrade release prompt to the server.
        RNsupdate-manager-infottypes4Queueing message with updated update-manager status.(
Rt_persistRtsetRtinfotregistrytbrokertsend_messaget_session_id(RRR((sC/usr/lib/python2.7/dist-packages/landscape/monitor/updatemanager.pyR"7s

cCs|jjjd|jƒS(sT
        Send the update-manager-info messages, if the server accepts them.
        supdate-manager-info(R R!tcall_if_acceptedR"(R((sC/usr/lib/python2.7/dist-packages/landscape/monitor/updatemanager.pytrunFsN(t__name__t
__module__t__doc__Rtpersist_nametscopetrun_intervaltTruetrun_immediatelyRRRR"R%(((sC/usr/lib/python2.7/dist-packages/landscape/monitor/updatemanager.pyRs		(RRRtlandscape.monitor.pluginRR(((sC/usr/lib/python2.7/dist-packages/landscape/monitor/updatemanager.pyt<module>s