Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/landscape/ui/controller/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/landscape/ui/controller/configuration.pyc


Tc@sddlZddlmZddlmZmZddlmZddlm	Z	de
fdYZdefd	YZ
dS(
iN(tgettext(tNOT_MANAGEDtCANONICAL_MANAGED(tRegistrationProxy(t
StateErrortConfigControllerLockErrorcBseZRS((t__name__t
__module__(((sI/usr/lib/python2.7/dist-packages/landscape/ui/controller/configuration.pyRstConfigControllercBs\eZdZdZdZdZdZdZdZdZ	dZ
d	ZRS(
s
    L{ConfigContoller} defines actions to take against a configuration object,
    providing starting values from the file, allowing them to be changed
    transiently, reverted or committed.
    t
standalonecCsg|_||_t|_dS(N(t
_observerst_configurationtTruet_initialised(tselft
configuration((sI/usr/lib/python2.7/dist-packages/landscape/ui/controller/configuration.pyt__init__s		cCs.||jkr|j|St|j|SdS(N(t__dict__tgetattrR(Rtname((sI/usr/lib/python2.7/dist-packages/landscape/ui/controller/configuration.pyt__getattr__scCsd|jkr"tj|||S|tjkrDtj|||Sy$t|j|||jjWn!tk
rtj|||SX|jjdS(NR
(Rtobjectt__setattr__RtsetattrRtmodifytAttributeError(RRtvalue((sI/usr/lib/python2.7/dist-packages/landscape/ui/controller/configuration.pyR#s
cCs
|jjS(s?
        Load the initial data from the configuration.
        (Rt	load_data(R((sI/usr/lib/python2.7/dist-packages/landscape/ui/controller/configuration.pytload2scCs6y|jjWntk
r1tjdnXdS(sU
        Revert settings to those the configuration object originally found.
        s@landscape-client-settings-ui reverted with no changes to revert.N(RtrevertRtloggingtinfo(R((sI/usr/lib/python2.7/dist-packages/landscape/ui/controller/configuration.pyR8s
cCsty|jjWntk
r1tjdnX|jjtkrZ|j|||n|j||||dS(s.Persist settings via the configuration object.sAlandscape-client-settings-ui committed with no changes to commit.N(	RtpersistRRRtmanagement_typeRtdisabletregister(Rt	on_notifyton_errort
on_succeedton_fail((sI/usr/lib/python2.7/dist-packages/landscape/ui/controller/configuration.pyR Cs
c	sfd}fd}td|d|d|d|}|jjtkrn|td|jjn|td|jj|j|jj|j	dS(	sF
        Perform registration using the L{RegistrationProxy}.
        csdtddS(NtactionsRegistering client failed(t_((tfail_method(sI/usr/lib/python2.7/dist-packages/landscape/ui/controller/configuration.pytregistration_fail_wrapperVscsdtddS(NR(s!Registering client was successful(R)((tsucceed_method(sI/usr/lib/python2.7/dist-packages/landscape/ui/controller/configuration.pytregistration_succeed_wrapperYston_register_notifyton_register_errorton_register_succeedton_register_failsAttempting to register at %sN(
RRR!RR)thosted_landscape_hosttlocal_landscape_hostR#tget_config_filenametexit(Rt
notify_methodterror_methodR,R*R+R-tregistration((R,R*sI/usr/lib/python2.7/dist-packages/landscape/ui/controller/configuration.pyR#Ps	cs[fd}fd}td|d|}|td|j|jdS(sH
        Disable landscape client via the L{RegistrationProxy}.
        csdtddS(NR(sDisabling client failed(R)((R*(sI/usr/lib/python2.7/dist-packages/landscape/ui/controller/configuration.pytdisabling_fail_wrapperoscsdtddS(NR(sDisabling client was successful(R)((R,(sI/usr/lib/python2.7/dist-packages/landscape/ui/controller/configuration.pytdisabling_succeed_wrapperrston_disable_succeedton_disable_fails'Attempting to disable landscape client.N(RR)R"R5(RR6R,R*R9R:R8((R*R,sI/usr/lib/python2.7/dist-packages/landscape/ui/controller/configuration.pyR"js	
(RRt__doc__tDEFAULT_DEDICATED_ACCOUNT_NAMERRRRRR R#R"(((sI/usr/lib/python2.7/dist-packages/landscape/ui/controller/configuration.pyRs						
	(RRR)tlandscape.ui.constantsRRt%landscape.ui.model.registration.proxyRt&landscape.ui.model.configuration.stateRt	ExceptionRRR(((sI/usr/lib/python2.7/dist-packages/landscape/ui/controller/configuration.pyt<module>s